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
This will encrypt the opsview.sql file and to decrypt the opsview.sql file use :
[root@opsview-test ~]# cat opsview.sql | ccrypt -d -k /root/.backup_keyfile > opsview1.sql
This will decrypt the opsview.sql file, easy isn’t it,
No comments:
Post a Comment