[lug] Migrating /home...rsync?
bcarr at purgatoire.org
Tue Sep 27 19:58:09 MDT 2016
On 9/27/2016 7:52 PM, stimits at comcast.net wrote:
> This is my command which seems to come closest to a good copy of
> /home to /mnt (performed as root in text mode on Fedora 23):
> rsync -avcrxXl --delete /home /mnt/home
> The above command fails to back up the directory correctly, so is
> rsync not suitable for this? Should I use something different?
> Perhaps just a different rsync argument? Does anyone recommend
> something like a backup program instead?
If I'm understanding what you are trying to do, I use rsync this way:
to copy between two directories on the SAME machine (same IP address),
|# rsync -rupogtP --delete /src_dir/ /dest_dir/ ; copy
everything *below* src_dir, deletes files & dirs
|# rsync -rupogtP --delete /src_dir /dest_dir/ ; copy
everything *including* src_dir, deletes only files
-r = recurse through subdirectories
-u = skip files newer on dest_dir
-p = preserve permissions
-o = preserve owner
-g = preserve group
-t = preserve modification times
-P = show progress
-z = use compression during xfer
--delete = delete files/directories on dest that don't exist on src
-n, --dry run = shows what it would do, but does nothing
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LUG