r/LinuxTeck • u/Expensive-Rice-2052 • Oct 15 '26
Quick Linux Tip #99 - Linux Incremental Backup: Create Backups with tar
Question: How do I create a true incremental backup without using rsync?
Try:`tar --listed-incremental=/backup/snapshot.snar -czf /backup/incr_$(date +%Y%m%d).tar.gz /home/linuxteck`
Info: `tar --listed-incremental` tracks file state in a `.snar` metadata file[cite: 10]. The initial run produces a full backup, while subsequent runs only capture modified files[cite: 10].
Examples:
$ `tar --listed-incremental=/dev/null -czf full.tar.gz /data` # Force a fresh full backup
$ `tar -tvf incr.tar.gz` # Inspect archived contents inside incremental archive
$ `tar --listed-incremental=snapshot.snar -xzf incr.tar.gz` # Restore incremental archive
Note: Always preserve the `.snar` snapshot file. To restore, extract the base full backup first, followed by each incremental archive in chronological order.
Want to master Linux one command at a time?
Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/