rsync

From Peyton Hall Documentation

(Difference between revisions)
Jump to: navigation, search
m (Rsync moved to rsync: Anticapitalizationism)
m (Tagging inuse)
Line 1: Line 1:
 +
{{inuse|a little while  --[[User:Huston|huston]] 10:50, 11 May 2007 (EDT)}}
{{oldfaq|NUM=93}}
{{oldfaq|NUM=93}}

Revision as of 14:50, 11 May 2007

This article is actively undergoing a major edit for a little while --huston 10:50, 11 May 2007 (EDT).

As a courtesy, please do not edit this page while this message is displayed. The person who added this notice will be listed in its edit history or has placed their signature above.

If this page has not been edited recently (several hours!), please remove this template (or replace it with {{underconstruction}}).

This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to improve this page.

Template:oldfaq

Need to synchronize files between two places quickly? Use rsync. Also good for copying files from one location to another.

rsync -avue ssh source_machine:/dir dest

This will synchronize all the files from "machine"'s "/dir" directory to the local directory "dest". Note that this is one way, so if you want to sync files in both directions, you have to repeat the command, swapping the order of source and destination. The '-e' option, and corresponding 'ssh', tells rsync to use ssh to do the transfer.

Please note that the presence or absence of a trailing slash on the directories *DOES* make a difference! For example:

rsync -avue ssh coma:/u/user/WWW .

..will create a directory in the current directory named WWW, and copy the contents of the remote dir to the source. It's like copying /u/user/WWW to the current directory. However,

rsync -avue ssh coma:/u/user/WWW/ .

..will copy the *contents* of /u/user/WWW to the current directory, and not the directory itself! This is important if you're trying to synchronize two filesystems that started as a copy of each other, but are now slightly different, as you want to make sure the source and destination are the same as they were in the original copy.

'man rsync' for more (lots more) details.

Also have a look at the rsync homepage: http://rsync.samba.org (especially if you're looking for a binary compiled version to run on a remote machine)

Lastly, there's a rsync tutorial at http://everythinglinux.org/rsync/ which is very informative.

Personal tools