Stop your incremental backups from grinding to a halt because of small file thrash
Backup & Recovery (Rsync/Tar/Dd)
Stop your incremental backups from grinding to a halt because of small file thrash
🧩 The Challenge
You know that feeling when you run rsync on a massive maildir or a folder with millions of tiny logs, and it spends forty minutes just checking file stats before it moves a single byte? I’ve burned through way too much time staring at that blinking cursor wondering if the process actually hung or if it’s just crying for help.
💡 The Fix
Use the –itemize-changes flag along with –checksum to force rsync to compare file signatures rather than just mtime and size, and pair it with a file list to skip the recursive crawl of the entire directory tree. It’ll make the process way more predictable when dealing with high-frequency writes.
rsync -av --checksum --itemize-changes --files-from=files_to_sync.txt /source/ /destination/
⚙️ Why It Works
By providing a hard list of files to check, you cut the kernel’s overhead of scanning thousands of subdirectories and effectively turn rsync into a surgical tool instead of a blunt instrument. Skipping the directory traversal is the only way to keep your sanity when the file count hits the millions.
🚀 Pro-Tip: Pipe that file list into a temp file using find or locate before starting the sync if you want to avoid hitting the same disk blocks twice.
Linux Tips & Tricks | © ngelinux.com | 12/1/2026
