hs.samix at gmail.com
Wed Dec 31 16:38:51 UTC 2008
> Given a freshly restored machine that has been out of service for a good
> while, containing a large collection of data files "A", and "B" a in
> service machine thta has a subset of these data files, but has some newer
> files that are ont on "A". How can I invoke rsync such that only the new
> filee are trnasfered from "B" to "A"?
I usually use the following command to see what will be transfered ('-n'
only shows what will be done):
$> rsync -n -avue ssh bob_a at A:/home/bob_a/ /home/bob_b/
where bob_a is your username on A and bob_b is the username on B. You
must ssh server running on A.
NB: If you put a trailing slash at the end of the first path (source
path), the *contents* of that path are transfered to the destination
path. In the above example, everything in /home/bob_a will be checked
for transfer to /home/bob_b. Trailing slash on the destination path does
not matter. If the trailing slash is not there in the source path, then
the source *directory* is checked for transfer. So if you missed the
trailing slash in the above example, bob_a directory will be transfered
and you will get /home/bob_b/bob_a on B.
Also, ssh must come right after option e.
Now, if you are okay with the above command in what it will be
transfered, remove the "-n" for actual transfer.
Next, you can add a -z option if you want rsync to use compression. -C
option will exclude the usual backup and other temporary system files.
You can exclude a pattern to be transfered using --exclude thus:
Finally, for more details on these options, see man rsync.
Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.
More information about the ubuntu-users