Use it to back up directories and servers at the file level.
Filesystem Backup
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.
1. Tool and options preserve owner, ACLs, xattrs, hard links (rsync -aHAX)?
2. Consistent source (snapshot or quiesced app)?
3. Excludes for virtual and cache directories.
4. Job ran successfully (log, exit code)?
5. Spot-check a restored file's content and metadata.
snapshot/quiesce → copy with metadata → store versioned and off-site → logs record success
For Backup & Restore → Filesystem Backup, continue with the first unproven Topic check: Define included/excluded paths, mount boundaries, consistency requirements and metadata that must survive restore. If that boundary is healthy, advance to the adjacent check: Inspect tool exit status plus skipped/error output and independently enumerate/read the destination. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
path/filesystem scope → consistency/quiesce decision → traversal/filtering → data + metadata capture → destination write → manifest/integrity read-back → restore sample → workload
Healthy evidence: expected files, links, ownership, modes, ACL/xattrs and required sparse/special handling are represented in a readable destination and a sample restore matches the acceptance criteria
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Define included/excluded paths, mount boundaries, consistency requirements and metadata that must survive restore.
- Inspect tool exit status plus skipped/error output and independently enumerate/read the destination.
- Restore representative files including links and permission-sensitive objects into an isolated location.
- Verify the restored data with the real consumer or an application-specific validation step.
Verification chain. path/filesystem scope → consistency/quiesce decision → traversal/filtering → data + metadata capture → destination write → manifest/integrity read-back → restore sample → workload
Step 3 Commands Verify boundary
tar --xattrs --acls -czpf /backup/home.tgz /home
rsync -aHAX /srv/ /backup/srv/
xfsdump -l 0 -f /backup/root.dump /
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: exclude rules, mount boundaries, live writes, permission errors, dereferenced links, lost xattrs/ACLs or destination-full conditions silently reduce the usable recovery set
Step 5 Common mistakes Narrow the fault
- Not preserving ACLs, xattrs and hard links.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
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.
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
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
The limit of what it shows is the required file set plus metadata at a known point in time and a readable destination; a successful tar, rsync or dd process alone does not show completeness or recoverability.
In depth
File system backups with tar and rsync
File-level backups copy files and their metadata. Done right, a restore gives back the same tree, with the same permissions and labels. The tar(1) manual page documents what's needed for that:
-c,-xand-tcreate, extract and list.-z,-jand-Jcompress with gzip, bzip2 and xz.-ppreserves permissions on extraction (the default for root).--acls,--xattrsand--selinuxinclude ACLs, extended attributes and SELinux contexts.--numeric-ownerstores IDs instead of names.--one-file-systemstays on one file system.--excludeskips patterns.--listed-incremental(-g) makes incremental backups with a snapshot file. The first run is a full (level 0) backup.
The rsync(1) manual page adds the rules for rsync:
-apreserves most metadata, but not ACLs, xattrs or hard links unless-A,-Xand-Hare added.- A trailing slash on the source copies its contents, not the directory itself.
--deleteremoves files that are gone from the source, and-ndoes a dry run first.
Incremental tar backups
| Run | Command | Content |
|---|---|---|
| Sunday (level 0) | tar -czg /var/backup/etc.snar -f etc-full.tgz /etc | Everything |
| Monday | tar -czg /var/backup/etc.snar -f etc-mon.tgz /etc | Changes since Sunday |
| Restore | Extract full, then each incremental in order with -g /dev/null | — |
Snapshots with rsync and hard links
rsync --link-dest=<previous> creates a new dated directory each night. Unchanged files are hard links to the previous backup, so each snapshot looks complete but only changed files use new space.
Consistency
Copying files that are being written gives an inconsistent backup. Pause or flush the application, use a database dump, or snapshot the volume (LVM, Btrfs) and back up the snapshot.
host$ sudo tar --acls --xattrs --selinux --numeric-owner --one-file-system -czpf /srv/backup/srv1-etc-$(date +%F).tgz -C / etc
host$ tar -tzvf /srv/backup/srv1-etc-2026-11-28.tgz | head -3
host$ today=$(date +%F); yesterday=$(date -d yesterday +%F)
host$ sudo rsync -aAXH --numeric-ids --delete --link-dest=/srv/backup/srv1/$yesterday /srv/data/ /srv/backup/srv1/$today/
host$ du -sh /srv/backup/srv1/$yesterday /srv/backup/srv1/$today
38G /srv/backup/srv1/2026-11-27
412M /srv/backup/srv1/2026-11-28
host$ sudo rsync -aAXHn --delete /srv/backup/srv1/$today/ /srv/data/ | head
Reading the du output
The new snapshot looks like a complete copy, but used only 412 MB, because unchanged files are hard links into yesterday's directory. du counts each shared file once, in the first directory listed. The last command is a dry-run restore, which shows what a real restore would change, before anything is touched.
Documented example, not captured output.
How it works at runtime
Filesystem Backup is part of Backup & Restore → Filesystem Backup. Filesystem Backup covers Linux file-tree copies and archives, including scope, consistency, metadata preservation, exclusions, sparse files, links, ACL/xattrs and destination durability.
Topic-specific state model. Filesystem Backup covers Linux file-tree copies and archives, including scope, consistency, metadata preservation, exclusions, sparse files, links, ACL/xattrs and destination durability.
Interpretation rule. - Archive created ≠ required scope captured.
- rsync exit without visible error ≠ metadata/consistency requirements met.
- Block image copied ≠ filesystem/application consistency.
- Destination mounted ≠ backup bytes durable and readable.
Quick reference
Filesystem backup examples:
# restic: init once, then daily
export RESTIC_REPOSITORY=s3:https://s3.example.com/backups/web01 RESTIC_PASSWORD_FILE=/root/.restic-pw
restic init
restic backup /etc /srv /var/lib/app --exclude-caches --one-file-system
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune
restic check --read-data-subset=5%
# rsync mirror with hard-linked snapshots
rsync -aHAX --delete --link-dest=/backup/web01/latest /srv/ /backup/web01/2026-11-05/
# tar with ACLs/xattrs/SELinux labels
tar --acls --xattrs --selinux -czpf etc-$(date +%F).tgz /etc
For databases, dump or snapshot consistently first; copying live database files gives unusable backups.
Limits and how it fails
Primary failure point. The limit of what it shows is the required file set plus metadata at a known point in time and a readable destination; a successful tar, rsync or dd process alone does not show completeness or recoverability.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Filesystem Backup owns generic Linux file/block copy evidence; database/application consistency belongs to the application and storage snapshots belong to Storage.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Backup & Restore → Filesystem Backup. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://download.samba.org/pub/rsync/rsync.1 · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Filesystem Backup operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Filesystem Backup.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Filesystem Backup covers Linux file-tree copies and archives, including scope, consistency, metadata preservation, exclusions, sparse files, links, ACL/xattrs and destination durability. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact source/revision or recovery point → verify inputs/consistency → observe copy/build/link result → read back destination/artifact and metadata/dependencies → restore/run in intended environment → repeat original workload + regression check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | path/filesystem scope → consistency/quiesce decision → traversal/filtering → data + metadata capture → destination write → manifest/integrity read-back → restore sample → workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | The proof boundary is the required file set plus metadata at a known point in time and a readable destination; a successful tar, rsync or dd process alone does not prove completeness or recoverability. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux backup/source evidence can establish this proof path: path/filesystem scope → consistency/quiesce decision → traversal/filtering → data + metadata capture → destination write → manifest/integrity read-back → restore sample → workload | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove unobserved data, metadata, revisions, dependencies, consumers or time periods. The proof boundary is the required file set plus metadata at a known point in time and a readable destination; a successful tar, rsync or dd process alone does not prove completeness or recoverability. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven backup/source/build boundary, capture adjacent identity/read-back/runtime evidence, make only the demonstrated persistent change, then repeat the original workload plus a regression check. | Continue to the next unresolved boundary while preserving the original test condition. |
Filesystem Backup · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Filesystem Backup |
|---|---|
| Topic path | Backup & Restore → Filesystem Backup |
| Runtime state | Filesystem Backup covers Linux file-tree copies and archives, including scope, consistency, metadata preservation, exclusions, sparse files, links, ACL/xattrs and destination durability. |
| Fast checks | - Define included/excluded paths, mount boundaries, consistency requirements and metadata that must survive restore. - Inspect tool exit status plus skipped/error output and independently enumerate/read the destination. - Restore representative files including links and permission-sensitive objects into an isolated location. - Verify the restored data with the real consumer or an application-specific validation step. |
| Verification chain | path/filesystem scope → consistency/quiesce decision → traversal/filtering → data + metadata capture → destination write → manifest/integrity read-back → restore sample → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | The proof boundary is the required file set plus metadata at a known point in time and a readable destination; a successful tar, rsync or dd process alone does not prove completeness or recoverability. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |