Hi, folks!
First, I know rsync do not move dirs. But I can copy them and them delete the source, right?
I am making backups from a directory (let's say /Daily/)in the following way:
I make a full copy into a /Daily.1/ directory, using
Then, the next day, I make a backup into /Daily.2/ using hard links, with
Code:
rsync -azSvyPpE --link-dest=/Daily.1
And so on, until I have 8 /Daily.?/ directories. Then, I want to move the oldest /Daily.?/ (in this case it would be /Daily.1/) to a /Weekly.1/
The problem is that I cannot do this using cp or mv, because of the hard links. I need to keep them. So, I am trying this:
Code:
rsync -HzSvrpPE /Daily.1/ /Weekly.1/
as the -H says it keeps the hard links.
The copy goes on, but I've noticed that the dirs' sizes are different beetween the original copy (Daily ones) and the Weekly ones. It seems rsync is not keeping the links, but making new full copies. If, after a few days, I look into the Daily dirs, their total size will be smaller than the Weekly dirs' total size (even if the copies are supposed to be exactly the same -- a test situation, of course))
My questions:
1. Is there a way to prove that? Can I tell if a file is a hard link or a full copy of another file?
2. Do I have to use any other option to make the -H option work this way I need?
Thanks a lot!
As soon as I get this to work I'll share with the comunity and maybe make a GUI to my backup script
Bookmarks