Stop rsync from choking when the filesystem runs out of inodes

Backup & Recovery (Rsync/Tar/Dd)

Stop rsync from choking when the filesystem runs out of inodes

🧩 The Challenge

You’re backing up a web directory full of millions of tiny cache files and suddenly the whole thing hangs because the target partition hit its inode limit, even though you have gigabytes of space left. I’ve wasted hours manually checking disk usage only to realize the directory structure was the real culprit.

💡 The Fix

Use a tar stream piped through ssh to bypass the overhead of thousands of small file handshakes. It’s significantly faster for these specific types of massive, fragmented data sets.

tar -cf - /path/to/data | ssh user@remote "tar -xf - -C /destination/path"

⚙️ Why It Works

Moving a single stream of bits avoids the expensive filesystem metadata lookups that rsync performs for every single small file in the tree. You’re effectively trading filesystem complexity for raw sequential I/O.

🚀 Pro-Tip: Add the -z flag to the tar commands if you are on a slow link, but skip it for local network transfers to save your CPU cycles.

Linux Tips & Tricks | © ngelinux.com | 8/28/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted