Follow the below simple steps to achieve the database dump encryption and decryption :
- Create a encryption key file as /root/.backup_keyfile and add the password/key in that file.
- This keyfile will be used to encrypt and decrypt the data [dump.sql file]
mysqldump --opt opsview | ccrypt -k /root/.encryptkeyfile > opsview.sql