Rsync again
rsync is something I always use, but always end up looking up the arguments I want to use. Here are my favorites:
- -v / —verbose
- -a / —archive (-rlptgoD)
- -r / —recursive
- -l / —links (copy symlinks as symlinks)
- —copy-unsafe-links (copy hard files from symlinks that point outside the source tree)
- -p / —perms preserve permissions
- -g / —group presreve group
- -o / —owner preserve owner
- —devices copy devices
- —specials copy special files
- -t / —times preserve modification times
- -u / — update (skip files that are newer on reciever)
- -H / —hard-links (preserve hard links)
- -E / —executability (preserve executability)
- -A / —acls preserve ACLs
- -X / —xattrs preserve extended attributes (some systems will give an error about operation not permitted with this argument)
- -S / —sparse handle sparse files efficiently
- —partial keep partially transfered files
- —exclude-from=FILE
- -F filter rules on per directory basis in .rsync-filter files
- -T / —temp-dir=DIR (temporary directory for files, ramdisk?)
- —stats
- —progress
Recently I was decomisioning a machine and I went with:
rysnc -vrlpDtuHEASF —temp-dir /mnt/ramdisk —partial —stats —progress —copy-unsave-links src dest
Since I was on a local network, I turned off compression on ssh