Rsync backup to tar or gzip archive

Mikkel L. Ellertson mikkel at infinity-ltd.com
Tue Jan 24 22:18:36 UTC 2006


akonstam at trinity.edu wrote:
> I agree that for backing up to a mounted filesystem archive rsync is not
> needed.
> 
> I , however, am having a blank in figuring out how to backup to a
> filesystem that is not mounted but is on another machine. It seems like
> some combination of rsync (or scp) and tar aught to be able to do
> this. But the method eludes me. I mean something other than creating
> the tar file on the local machine and then copying to a remote
> filesystem on another machine.
> 
Something like:

tar -cf - <some files> | ssh <remote machine> "tar -uf <archive>"

You will end up transferring extra files because tar on the local
machine does not know what is in the archive. If you just want to
create an archive on the remote machine, then use:

tar -cf - <some files> | ssh <remote machine> "tar -cf <archive>"

You may need <user>:<remote machine> instead of just
<remote machine>...

You can pipe just about any command that outputs to standard out
over an ssh link to a program that accepts standard in.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!




More information about the fedora-list mailing list