Database Backup

(Procedure applicable only for builds prior to 6301. For later versions, click here)

Data stored in PMP database are of critical importance and in any production environment, there would be constant requirements for backing up the data for reference purposes or for disaster recovery.   To achieve this, PMP provides two features:

Live Backup

Whenever there happens an addition or modification of the entries in the PMP database, the data gets immediately backedup. PMP achieves this live backup by leveraging the database replication feature offered by MySQL.

A live 'slave' database could be configured in a remote location and it will get instantaneously updated whenever the 'master' database running with PMP undergoes a change. At any point of time, the data in both the databases will be in synchronization with each other. In the unlikely event of any disaster to the primary database, you can rely on the slave database and recover the data.

To enable Live Backup,

Prerequisite

 

Step 1: Setup master and slave databases

 
 

Step 2: Start master and slave databases

 

startDB.bat 2345 (For Windows)

startDB.sh 2345 (For Linux)
 

 

Step 3: Start PMP server

 
 

Verify Live Backup Setup

 

After carrying out the above steps, you can verify if the Live Backup setup is working properly by looking at the message in "Admin >> General >> Database Backup" page. If the setup is proper, you will see the following:

 

Connection Status: Alive and Live Backup is in progress now

Slave database is running in host: <Host Name>

Recovering data from slave when master database crashes

In the rare event of master database crash, you can recover data from the slave database.

 

To recover the data,

 

 

 

 

 

 

 

 

Note: Once you recover the data from the slave and give life to the master database, the slave database will no longer be valid. Just delete the mysql folder in the remote machine. If you want to have the Live Backup enabled again, you need to follow the steps once again.

Scheduled Backup

You can schedule database backup to be executed at any specific point of time.

To schedule database backup,

In the UI that opens up,

To schedule backup in specific day(s) interval,

  1. If your requirement is to backup the database contents in specific day intervals - say, once in three days, this option would come in handy. You can choose any interval between 1 and 28 and also specify the time at which backup has to be taken.
  2. To enable this option, click the radio button "Day"
  3. Select the day interval
  4. Select the time at which backup has to be taken
  5. Backed up data are stored as a .zip file under <PMP_Home>/backUp directory by default. If you want, you can specify the destination directory where you wish to store the backedup contents.
  6. Every time backup is executed, one backup file will be created. You can specify the maximum number of such backup files to be kept in this directory. For example, if you choose "10" in the drop-down against the field "Maintain latest --- backups only", only the latest 10 backup files would be kept under this directory
  7. Click "Save". The required backup schedule is created

 

  • Where does the backup data get stored? Is it encrypted?
     

All sensitive data in the backup file are stored in encrypted form in a .zip file under  <PMP_Home/backUp> directory or under the directory specified by you. It is recommended that you backup this file in your secure, secondary storage for disaster recovery.
 

  • What is the best option for database backup schedule?
     

Database backup operation is both time and resource consuming. Hence, it is recommended to schedule it to run during off-peak traffic timings. While the operation is in progress, no configuration change could be performed in PMP.

 

  • Can I replicate the data to another server and have the permissions stay intact?

    Yes. PMP application is stateless and all the data are stored in the database and just replicating the database against a fresh installation of the application gets you all the data intact.

 

To schedule backup on a specific day every week,

  1. If your requirement is to backup the database contents on a specific day every week - say, on Mondays, this option would come in handy. You can choose any day from Sunday to Saturday and also specify the time at which backup has to be taken. To enable this option,
  2. click the radio button "Weekly"
  3. select the day of the week
  4. select the time at which backup has to be taken
  5. Backed up data are stored as a .zip file under <PMP_Home>/backUp directory by default. If you want, you can specify the destination directory where you wish to store the backedup contents.
  6. Every time backup is executed, one backup file will be created. You can specify the maximum number of such backup files to be kept in this directory. For example, if you choose "10" in the drop-down against the field "Maintain latest --- backups only", only the latest 10 backup files would be kept under this directory
  7. Click "Save". The required backup schedule is created
 

To schedule backup on a specific day every month,

  1. If your requirement is to backup the database contents on a specific date every month - say, on 13th, this option would come in handy. You can choose any date from 1st to 31st and also specify the time at which backup has to be taken. To enable this option,
  2. Click the radio button "Monthly"
  3. Select the date of the month
  4. Select the time at which backup has to be taken
  5. Backed up data are stored as a .zip file under <PMP_Home>/backUp directory by default. If you want, you can specify the destination directory where you wish to store the backedup contents.
  6. Everytime backup is executed, one backup file will be created. You can specify the maximum number of such backup files to be kept in this directory. For example, if you choose "10" in the drop-down against the field "Maintain latest --- backups only", only the latest 10 backup files would be kept under this directory
  7. Click "Save". The required backup schedule is created

 


© 2014, ZOHO Corp. All Rights Reserved.