Site icon New Generation Enterprise Linux

Speed up your local backups with sparse file awareness

Backup & Recovery (Rsync/Tar/Dd)

Speed up your local backups with sparse file awareness

đź§© The Challenge

You’re trying to back up a massive virtual disk or a database file that says it’s 500GB on disk but only has 20GB of actual data. Copying the whole thing normally takes forever and fills up your backup drive with nothing but zeroes.

đź’ˇ The Fix

Use rsync’s sparse file detection to skip those empty blocks. It keeps your backups thin and saves you from running out of space on your backup target.

rsync -avS --sparse /source/large-sparse-file /destination/

⚙️ Why It Works

Sparse files store metadata about empty segments rather than writing actual null bytes to the disk. By telling rsync to handle them correctly, it intelligently recreates those gaps on the destination instead of treating them as actual data that needs a full write cycle.

🚀 Pro-Tip: Pair this with –inplace to save even more time if you’re updating an existing file instead of creating a new one.

Linux Tips & Tricks | © ngelinux.com | 7/16/2026

0 0 votes
Article Rating
Exit mobile version