git, hardlinks and backups
Hi!
I know this may be stupid, but...
I'm backing up my linux kernel trees, and found out that backup (done by rsync) is twice as big as original. That's quite bad... it is because git uses hardlinks heavily but rsync can't preserve them.
I'm pretty sure someone hit this before... what is the trick?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 9 lines · Pavel Machek
Hi!
I know this may be stupid, but...
I'm backing up my linux kernel trees, and found out that backup (done by rsync) is twice as big as original. That's quite bad... it is because git uses hardlinks heavily but rsync can't preserve them.
I'm pretty sure someone hit this before... what is the trick?
$ rsync --help | grep "preserve hard links" -H, --hard-links preserve hard links $
Quoted 1 line
Pavel
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedA message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 9 lines
Quoted 7 lines
I know this may be stupid, but...
I'm backing up my linux kernel trees, and found out that backup (done by rsync) is twice as big as original. That's quite bad... it is because git uses hardlinks heavily but rsync can't preserve them.
I'm pretty sure someone hit this before... what is the trick?
The -H option of rsync?
Okay, I was blind, sorry.
For those who made same mistake... utility called freedups should be able to clean that up.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 10 lines · Pavel Machek
Hi!
I know this may be stupid, but...
I'm backing up my linux kernel trees, and found out that backup (done by rsync) is twice as big as original. That's quite bad... it is because git uses hardlinks heavily but rsync can't preserve them.
I'm pretty sure someone hit this before... what is the trick?
Pavel
Why can't rsync preserve them? Doesn't 'rsync --hard-links' work? (however, it can only work if you rsync all paths at once so rsync gets to see that the inodes match)
Signature · 3 lines
Rutger Nijlunsing ---------------------------------- eludias ed dse.nl never attribute to a conspiracy which can be explained by incompetence ----------------------------------------------------------------------