rsync -aHAX source dest
-uflag will "copy only when the SOURCE file is newer than the destination file or when the destination file is missing". And the
-a(archive) flag will be recursive -P or --progress shows progress for each file individually.
Xcopies extended attributes.
rsync -avhW --no-compress --progress /src/ /dst/
-a is for archive, which preserves ownership, permissions etc. -v is for verbose, so I can see what's happening (optional) -h is for human-readable, so the transfer rate and file sizes are easier to read (optional) -W is for copying whole files only, without delta-xfer algorithm which should reduce CPU load --no-compress as there's no lack of bandwidth between local devices --progress so I can see the progress of large files (optional)
rsync /path/to/local userX@remote.com/path/to/remoteIf you want to do this user mapping and not lose permissions settings, don't use
-a. First, run the rsync with
firstname.lastname@example.org get the right username. Then, instead of
-awhich will cause you to preserve ownership, specify the options manually. From
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X) -r, --recursive recurse into directories -l, --links copy symlinks as symlinks -p, --perms preserve permissions -t, --times preserve modification times -g, --group preserve group -o, --owner preserve owner (super-user only) -D same as --devices --specials
-a activates all of the above options but you don’t want to preserve the group or owner. This command should do what you want:
rsync -rlptDvz /path/to/local email@example.com:/path/to/remote
Since you are now logging in as
mywww and no longer preserving owner/group information, the copies made by
rsync will belong to the