Tar and gzip together, but the other way round?
Gzipping a tar file as whole is drop dead easy and even implemented as option inside tar
. So far, so good. However, from an archiver's point of view, it would be better to tar the gzipped single files. (The rationale behind it is, that data loss is minified, if there is a single corrupt gzipped file, than if your whole tarball is corrupted due to gzip or copy errors.)
Has anyone experience with this? Are there drawbacks? Are there more solid/tested solutions for this than
find folder -exec gzip '{}' \;
tar cf folder.tar folder
If you're going to do it this way, then use the tried-and-true method:
zip -r folder.zip folder
The key disadvantage is reduce compression, especially if your archive will contain many small files.
You might be better off compressing the data the usual way (or if you have CPU cycles to spare, the slower but more space efficient 7zip) then wrapping the result in a parity based fault-tolerant format such as http://en.wikipedia.org/wiki/Parchive. This will give you much greater potential for complete recovery after data corruption due to media failure or problems in transit over the network, possibly while not compromising too much on the size of the resulting archives.