[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#174525: ITP: dar -- Disk ARchive: Backup directory tree and files.

Brian May <bam@debian.org> writes:

> > > - ssh can be used for backups (just pipe the data via ssh to the
> > >   destination file), for incremental backups (generate catalog at server
> > >   and send it to client first). However, I am not certain about restores
> > >   (client requires 2 pipes to server, one in each direction; this makes
> > >   me nervous about potential deadlocks).
> > 
> > Shouldn't be a problem, just do "ssh client restore-comand" and then the 
> > client's stdin and stdout are the two pipes you need.  Gotta test it first of 
> > course, but I expect it to work.
> That only brings STDOUT and STDIN to the local computer.
> The hard part will be doing:
> dar ... | ssh client darr_slave | dar ...
> where both dars represent the one process (so the above
> command line wont work).

Isn't this what named pipes are for?

mkfifo /tmp/darpipe
dar ... < /tmp/darpipe | ssh client darr_slave > /tmp/darpipe

> I have heard that Bi-Directional communications like this is a risky,
> and buffering issues have caused big problems even for programs like
> rsync (hopefully resolved now).

True; unusual deadlocks can sometimes happen where one side is waiting
for the other side to read its data, but the reader side is gone.  You
might try this if darr_slave suffers from that type of problem:

mkfifo /tmp/darpipe
(dar ... ; cat > /dev/null) < /tmp/darpipe | \
            ssh client darr_slave > /tmp/darpipe

Reply to: