diff --git a/docs/backup.md b/docs/backup.md index 587746f8..91070ec8 100644 --- a/docs/backup.md +++ b/docs/backup.md @@ -355,12 +355,3 @@ fi **Important:** For post-processing, remember that at the end of the script, the dump file must be in the location specified by the `DUMPFILE` variable. If you move it, you **must** move it back. - -### Encrypting the Backup - -Post-processing gives you options to encrypt the backup using openssl or any other tools. You will need to have it -available on your system. When running in the `mysql-backup` container, the openssl binary is available -to the processing scripts. - -The sample [examples/encrypt.sh](./examples/encrypt.sh) provides a sample post-processing script that you can use -to encrypt your backup with AES256. diff --git a/examples/post-processing/encrypt.sh b/examples/post-processing/encrypt.sh deleted file mode 100644 index e7f1f1a8..00000000 --- a/examples/post-processing/encrypt.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# -# post-processing backup script used to encrypt the backup file. -# Many thanks to Sascha Schieferdecker https://github.com/sascha-schieferdecker -# for providing it. -# -# to use, make available to the path of DB_DUMP_POST_BACKUP_SCRIPTS -# or --post-backup-scripts -# -# the symmetric encryption key should be available at /scripts.d/post-backup/mysqldump-key.pub.pem - -# Encrypt and chmod backup file. -if [[ -n "$DB_DUMP_DEBUG" ]]; then - set -x -fi - -if [ -e ${DUMPFILE} ]; -then - openssl smime -encrypt -binary -text -aes256 -in ${DUMPFILE} -out ${DUMPFILE}.enc -outform DER /scripts.d/post-backup/mysqldump-key.pub.pem - mv ${DUMPFILE}.enc ${DUMPFILE} - chmod 600 ${DUMPFILE} -else - echo "ERROR: Backup file ${DUMPFILE} does not exist!" -fi -