klappradla / dotfiles

🏗 how I set up my system
5 stars 0 forks source link

Better rsync options #2

Closed klappradla closed 5 years ago

klappradla commented 5 years ago

Come up with better (more thought through and better documented) options for rsync (and logging).

The current options are:

rsync -atvz --delete --exclude-from \
      $EXCLUDE_LIST \
      -e "ssh -T -c aes128-gcm@openssh.com -o compression=no -x"\
      "$dir" max@"$NAS":"$BACKUP_VOLUME"

Maybe the a flag already does everything I need 🤷‍♂️

-a, --archive
      This  is equivalent to -rlptgoD. It is a quick way of saying you want recursion
      and want to preserve almost everything (with -H being a notable omission).  The
      only  exception  to the above equivalence is when --files-from is specified, in
      which case -r is not implied.

      Note that -a does not preserve hardlinks, because finding multiply-linked files
      is  expensive.   You  must  separately specify -H.  Note also that for backward
      compatibility, -a currently does not imply the --fileflags option.

(rsync man page)

klappradla commented 5 years ago

Some links for the topic: