1

I have a script to create backup that uses rsync. Now I'd like to organize the folder moving the older backups to a empty folder above. And I'd like to keep all hard-links and use that as reference to rsync news backups. In sumary I'd like to move the complete backup structure that I have to a new folder (same volume), and my doubt what I could use for that.

3 Answers 3

0

It sounds like you're trying to reinvent rsnapshot - have you looked at that to do what you want?

0

So you want to do...

pax -rwl /some/tree /hardlinked/tree

I think you should go for it.

0

Thank you so much for the answers, I found a simpler solution, since I'm moving to the same disc, mv did the work perfectly for me. And the answer is in the wiki page

https://en.wikipedia.org/wiki/Mv

"Moving files within the same file system is generally implemented differently than copying the file and then removing the original. On platforms that do not support the rename syscall, a new link is added to the new directory and the original one is deleted. The data of file is not accessed."

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.