Discussion:
[rsnapshot-discuss] Fixing Broken Links and Reclaiming Disk Space
Brian J. Murrell
2016-08-31 17:14:07 UTC
Permalink
Back in 2009 there was a discussion about Fixing Broken Links and
Reclaiming Disk Space:

https://sourceforge.net/p/rsnapshot/mailman/rsnapshot-discuss/thread/4AFCCF99.8060208%40edcint.co.nz/#msg23965338

There were all kinds of solutions and discussions.

Isn't it really as simple as:

# chdir /export/backups/
# mkdir /export/backups/monthly.1.new
# rsync -aiSPHAX --link-dest /export/backups/monthly.0/ --link-dest /export/backups/monthly.1/ monthly.1/ monthly.1.new/
# rm -rf monthly.1
# mv monthly.1.new monthly.1

to recreate monthly.1, fixing broken hard-links to monthly.0 where
possible.   Additionally, it does not consume any additional space (or
time to consume that additional space making copies) while creating it
since anything that cannot be hard-linked to monthly.0 is hard-linked
to monthly.1.

Once monthly.1.new monthly.1 any space wasted by broken hard-links is
recovered.

Am I missing something?

Cheers,
b.

Loading...