Created
February 14, 2017 12:14
-
-
Save Stefan-Code/7851be7a8e8d84fda4973e6662995572 to your computer and use it in GitHub Desktop.
Backup bacula database and encrypt it with openssl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Encrypt | |
pg_dump -d bacula -Z 5 | openssl smime -encrypt -binary -aes-256-cbc -out /var/db/bacula/bacula.sql.gzip.enc -outform DER /usr/local/etc/bacula/fd.pem /usr/local/etc/bacula/master.cert | |
#Decrypt | |
openssl smime -decrypt -in bacula.sql.gzip.enc -inform DER -binary -inkey master.key | gunzip > bacula.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment