[lug] Migrating /home...rsync?

BC 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), 
do this:

     |# rsync -rupogtP --delete /src_dir/ /dest_dir/    ; copy 
everything *below* src_dir, deletes files & dirs
-OR-
     |# 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...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20160927/fa2866d6/attachment.html>


More information about the LUG mailing list