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.
More on Disk, Capacity & Backups
How do you lay out filesystems on a production server?IntermediateHow do you do capacity planning for disk?IntermediateWhat disk usage alert thresholds do you use?BeginnerA disk is 100% full in production. What do you do first?BeginnerHow do you clean up disk space safely on Docker hosts?IntermediateWhat is the 3-2-1 backup rule?Beginner