I'm doing a backup of multiple external servers on a local machine using rsnapshot and it's working beautifully. Now, I'd like to clone the destination snapshots on an external disk that will be rotated. The thing is, I'd like to maintain the hard links structure to save space on the external disk.

I can clone the snapshots on the local machine to the external disk, but what weights 10GB on the local machine becomes 70GB on the external disk because the hard links structure is not reproduced. I don't want the external disk snapshots to link towards the local machine, but I'd like the same hard link logic without having to transfer the data twice from my multiple external servers:

daily.1/ -> only differences from daily.0/
daily.2/ -> only differences from daily.1/

Is it possible using rsync (or another tool) to replicate the structure of my local snaphosts elsewhere? Or just to simply tell rsnapshot to put the snapshots in two different destinations using the same rotation mechanism?

Thank you for your ideas!


If you use rsync with -H to copy the entire directory (i.e. the parent of your daily.n directories) it will preserve the hard links when copying to a new location.

I don't know of a nice way to only copy individual snapshots to an external disk and preserve the hard links - hard links only work on the same filesystem.

  • Excellent, I'll try it out but seems like the option I wanted after looking it up in the man. I initially thought the hard links would be maintained but with the same source, i.e. the local filesystem and not the new copy on the external hard disk. – lpfavreau Mar 2 '10 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.