Backup & Recovery (Rsync/Tar/Dd)
Stop rsync from blowing up your destination disk permissions
đź§© The Challenge
You finally get a massive rsync job running as root to mirror a production volume, only to find out it messed with the UID/GID mapping on the backup server and broke everything. It happens way more often than it should when you forget that rsync is aggressively helpful about metadata.
đź’ˇ The Fix
Throw the right flags to keep the file owners local to the backup target rather than forcing them to match the source. You want the files to belong to the user who actually runs the backup process.
rsync -av --no-owner --no-group /source/ /backup/
⚙️ Why It Works
Adding those two flags stops rsync from trying to recreate the original user IDs on the destination, which is a life-saver when your backup server doesn’t have the same user list as your web head.
🚀 Pro-Tip: Use –numeric-ids if you actually want to preserve them, but only if you’re sure your destination has the right passwd entries.
Linux Tips & Tricks | © ngelinux.com | 10/5/2026
