Does rsync support hot transfer while the system is running?

I want to use rsync for creating complete, bootable backups of a LUKS-encrypted Linux disk. Does it support hot-transferring of files, i.e. can I use rsync from a running (idling) system with opened files, processes etc.?

Answer

Yes.

There is rarely exclusive file locking as there is on Windows systems. The up side of this is that it’s easy to copy files that are open by other processes – even files that are being written. The down side is that it’s easy to copy files that are open by other processes and that are being written.

rsync does notice when a file it’s copying has been updated underneath it, and will fail the copy of that file. A re-run will usually succeed – provided of course that the file isn’t still being updated.

Remember rsync -a to ensure you copy timestamps and permissions. Also be aware that rsync between two local devices/filesystems is nowhere near as efficient as copying between two systems. It trades network efficiency for disk efficiency.

Leave a Reply

Your email address will not be published. Required fields are marked *