Hi there!
Сurrent version of Duplicity doesn’t preserve hard-links, so I’ve created a workaround to make it possible.
Why hard-links are important ? Any Linux distribution has many system hard-links. If you want to do a Full System Backup of Linux you must backup hard-links carefully, or you will meet nasty problems after restore. For example my Gentoo Linux has >3000 hard-links! Imagine what will happen if I ignore that.
I have written a small script which can backup/restore structure of hard-links.
You can download it: duplicity-hardlinks.py (modify python version in the first line if it fails to run. It requires Duplicity installation to work correctly.)
Usage:
So, generally you should save hard-links structure into the dump_file, add dump_file into your backup, and use that file after restore.
Script is not stupid, it respects all Duplicity’s filter options.
Example:
This will save a dump of all hard-links from /home and /etc directories into the file /hardlinks_dump.txt.
Include /hardlinks_dump.txt in the list of files backup-ed by Duplicity. Use Duplicity to backup these files:
Restore ordinal duplicity backup into some directory, for example /mnt/restore/. The file hardlinks_dump.txt should be there:
Finally, restore hard-links structure:
Done!
Leave a Reply
You must be logged in to post a comment.