Cheatsheet for doing rsync for archiving

# -avHAX:
# -a = archive (equivalent to -rlptgoD)
#      -r = recurse into directories
#      -l = copy symlinks as symlinks
#      -p = preserve permissions
#      -t = preserve modification times
#      -g = preserve group
#      -o = preserve owner (requires sudo)
#      -D = --devices --specials
#           --devices = preserve device files (requires sudo)
#           --specials = preserve special files
# -v = verbose
# -H = preserve hard links
# -A = preserve ACLs
# -X = preserve xattrs
#
# Before actual work, you may want to use --dry-run.
sudo rsync -avHAX --progress --exclude-from=- $SRCDIR $DESTDIR <<EOF
- /temp/***
- /trash_script.sh
EOF

Author: Omer Zak

I am deaf since birth. I played with big computers which eat punched cards and spew out printouts since age 12. Ever since they became available, I work and play with desktop size computers which eat keyboard keypresses and spew out display pixels. Among other things, I developed software which helped the deaf in Israel use the telephone network, by means of home computers equipped with modems. Several years later, I developed Hebrew localizations for some cellular phones, which helped the deaf in Israel utilize the cellular phone networks. I am interested in entrepreneurship, Science Fiction and making the world more accessible to people with disabilities.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.