Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using tar along with openssl to create encrypted tar archives of some large directories (about 30GB). What is the possibility of corruption in this process, and how would I verify that the encrypted tar archives are not corrupted?

This is the command I'm using to make the encrypted archives:

tar cvzf - /secret_dir | openssl enc -aes256 -salt -pass file:passfile > encrypted_data.tar.gz

share|improve this question

1 Answer 1

What is the possibility of corruption in this process?
Minimal. Note the standard caveats of tar though (may not deal well with files that are open and changing).

how would I verify that the encrypted tar archives are not corrupted?
Easiest way? Decrypt them and pipe them through tar -tf -. If tar is satisfied, the archive is OK (again, subject to the standard caveats of tar, i.e. "I can restore what was stored in the archive, no problem! Now whether that's what you WANT, that's another story…").


If this is something you may be doing regularly you probably want to look into more comprehensive backup software (Bacula can do encryption - things are crypted on their way off the client - and has a pretty robust feature set).
If it's just a one-shot deal what you're proposing is fine (just don't lose that key!)

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.