Re: PITR backup to Novell Netware file server - Mailing list pgsql-admin

From Andrew Kroeger
Subject Re: PITR backup to Novell Netware file server
Date
Msg-id 46B93907.3060401@sprocks.gotdns.com
Whole thread Raw
In response to PITR backup to Novell Netware file server  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: PITR backup to Novell Netware file server  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-admin
Kevin Grittner wrote:
> The Netware server supports ssh, scp, and an rsync daemon.  I don't see how
> the ssh implementation is helpful, though, since it just gets you to the
> Netware console -- you can't cat to a disk file through it, for example.
> (At least not as far as we have been able to see.)  It appears that the scp
> and rsync techniques both require the initial copy of the file to be saved
> on the database server itself, which we were hoping to avoid for performance
> reasons.

scp & rsync can't really deal well with stdin.  However, you can
accomplish something with ssh like the following (on Linux):

    cat source_file | ssh remote_host "cat >/path/to/file"

The ssh command will pass everything from its stdin to the cat command
on the remote host.  You can take the input from any command you want
that generates its output on stdout.

There are a few caveats though:

1.  I have no idea how this will work with Netware.  I'd assume it would
have the equivalent of "cat" but I have absolutely zero Netware knowledge.

2.  I have no idea how robust this is with respect to error detection.
My simple tests do return an error back to the calling shell if I don't
have permission to create the file on the target server, but I'm not
sure if there are any corner cases that may slip by unnoticed.  Again,
I'm also unsure how Netware will handle any errors.

3.  This approach unconditionally clobbers the target file on the remote
server.  If something dies part-way through, the original file is gone
and you will only have part of the new file on the remote server.  There
are no built-in backup or all-or-nothing capabilities like you have with
rsync.  You may be able to build a script or use shell operators like &&
and || to build and pass a compound command to ssh, but again I don't
know what Netware can do along those lines.

Hope this helps.

Andrew

pgsql-admin by date:

Previous
From: Andreas
Date:
Subject: Re: ssl and odbc standar driver
Next
From: "Joshua D. Drake"
Date:
Subject: Re: PITR backup to Novell Netware file server