Filesystem Backup
Cheat sheet · https://pcornel.dk/topic.php?topic=2903
Answer
Filesystem backup copies files with their metadata (owner, permissions, ACLs, xattrs, SELinux labels, hard links) using tools like rsync, tar, Borg, restic or filesystem snapshots.
Remember
Preserve metadata: rsync -aHAX, tar --acls --xattrs --selinux. Use snapshots (LVM, Btrfs) for consistency on busy filesystems. Exclude /proc, /sys, /dev, /run and caches. Encrypt off-site copies.
First checks
rsync -aHAX --delete --dry-run <src> <dst>— preview a metadata-preserving synctar --acls --xattrs -czf <file> <dir>— archive with ACLs and xattrssha256sum <file>— checksum to verify copiessystemctl list-timers— scheduled backup jobs
Verify in this order
snapshot/quiesce → copy with metadata → store versioned and off-site → logs record success
Where it usually breaks
First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2903