3

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

pzod
  • 117
  • 2

1 Answers1

3

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!)

voretaq7
  • 79,879
  • 17
  • 130
  • 214