Linux Incremental Backup: Create Backups with tar

Quick Linux Tip #99:

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. The initial run produces a full backup, while subsequent runs only capture modified files.

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.




LinuxTeck.com
linuxteck:~$ tar --listed-incremental=/backup/snapshot.snar -czf /backup/incr_$(date +%Y%m%d).tar.gz /home/linuxteck
tar: /home/linuxteck: Directory is new
tar: /home/linuxteck/Documents: Directory is new
tar: /home/linuxteck/Documents/report.pdf: Added

linuxteck:~$ ls -lh /backup/
-rw-r--r-- 1 root root 2.3G Oct 06 09:00 incr_20261006.tar.gz
-rw-r--r-- 1 root root  45K Oct 06 09:00 snapshot.snar

linuxteck:~$ tar --listed-incremental=/backup/snapshot.snar -czf /backup/incr_$(date +%Y%m%d_%H%M).tar.gz /home/linuxteck
tar: /home/linuxteck/Documents/new_file.txt: Added

linuxteck:~$ ls -lh /backup/incr_*
-rw-r--r-- 1 root root 2.3G Oct 06 09:00 incr_20261006.tar.gz
-rw-r--r-- 1 root root  12M Oct 06 10:00 incr_20261006_1000.tar.gz
linuxteck:~$

PREVIOUS ARTICLE Quick Linux Tip #98: Linux Process Monitoring: Catch Hidden Processes in Real Time NEXT ARTICLE Quick Linux Tip #100: Linux Shutdown Protection: Prevent Accidental Server Shutdowns
About John Britto

John Britto Founder & Chief-Editor @LinuxTeck. A Computer Geek and Linux Intellectual having more than 20+ years of experience in Linux and Open Source technologies.

View all posts by John Britto →

Leave a Reply

Your email address will not be published.