Interview Prep/Linux/Disk, Capacity & Backups

How do you use rsync for backups?

IntermediateProductionDisk, Capacity & Backups
Answer
rsync -aHAX --numeric-ids --delete --info=progress2 \
  /srv/data/ backup@nas:/backups/web1/data/

-a preserves perms, times, symlinks; -H hard links; -A ACLs; -X xattrs (SELinux labels); --numeric-ids avoids UID remapping; --delete mirrors deletions. A mirror alone is not a backup: a deletion or ransomware encryption is replicated too. Use --link-dest snapshots or a versioned tool.

All Linux questions Roadmap: Linux

More on Disk, Capacity & Backups