Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Like most of you, I have a few daily tag.gz snapshot of a folder (of any application). There is only a few different each other but the tar.gz is not a diff/delta friendly format.

Most data in the file should be redundant. Is there a smarter way to repack/re-compress these tar.gz files (e.g. 7 days into one) into a smaller file that could save up to 6/7 disk capacity?

PS. I don't want to change the snapshot part, which is better simple stupid.

PS2. I don't want to delete or cycle either. I have capacity, but dislike redundant.

share|improve this question
4  
You are doing a backup with a tool manifestly unsuited to what you're trying to use it for, but when asking for help you refuse to consider things that are actually designed for this. –  Alan Shutko Aug 30 '13 at 2:22
    
Sadly truth, sometime you must by policy or by people. But keeping those snapshot tar.gz should be an general use case. There is few idea in my mine but seem stupid (e.g. git them) –  Dennis Cheung Aug 30 '13 at 2:41
    
If you didn't gz them, git would actually work.... You might look for a version of gzip with the rsyncable patch, pads blocks so it's more likely that small changes in the input will result in smaller changes in the output. –  Alan Shutko Aug 30 '13 at 3:31

1 Answer 1

tar tool has limitations unfortunately. If you want repack, you must unpack grabing a lot of hdd space and performance, and again make differential backup. not effective.

better make both the same backup. at first, save young files for diff backup:

never=/var/run/never
neverold=/var/run/never-old
rm $neverold
mv $never $neverold
touch $never
tar cvzf differential.tar.gz --never $neverold

and after this full backup

tar as usual

then you should simply remove old full dayly backup. notice, leave full backups for specified day of week. otherwise differentials may be unusable. at the days you should remove unneeded differentials.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.