Pages

Saturday, September 16, 2017

Encrypting MySQLDump

If  you are looking to Encrypt your MySQL database dump for security reasons than you can  use the ccrypt tool  to encrypt your dump.sql file.

Follow the below simple steps to  achieve the database dump encryption and decryption :

  1. Create a  encryption key file as /root/.backup_keyfile and add the password/key in  that file.
  2. This keyfile  will be used to  encrypt and decrypt the data [dump.sql file]
Now, that we have created the encryption  file we just need to  execute the below commands:

mysqldump --opt  opsview |  ccrypt  -k /root/.encryptkeyfile > opsview.sql

Can’t locate DateTime perl module

If you are getting below error while installing any application on linux then perl date time module is missing.

    Can’t locate DateTime.
    pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at gatherbot_en.pl line 13.
    BEGIN failed–compilation aborted at gatherbot_en.pl line 13.

You can use below command to install Datetime on server.

    yum install perl-DateTime-TimeZone

dd command to migrate VPS on linux platform

First create new vps with same configuration on another node. It doesn’t matter new vps is having os or not or you can choose any OS.

Once same configuration VPS setup done then use below command to migrate VPS.

    dd if=/dev/guestos/kvm2351_img | ssh 10.10.10.10 “dd of=/dev/guestos/kvm2520_img

Once migration is completed then try starting VPS on new node.