Navigation
Table of Contents
Guide That Contains This Content
[+] Expand All
[-] Collapse All
Restoring the PSM Server Database from a Backup
Use this procedure to restore the PSM server database from a backup.
The PSM server database is automatically backed up
daily as a cron job (/etc/cron.daily/mysqlbackup
). By default, the backup is run every morning between 3:00 and 4:00
AM. The backups are stored in /backups/daily/ems
.
The backups are gzipped and stored using the following naming convention:
daily_ems_date_time.day_of_week.sql.gz
For example:
daily_ems_2016-12-06_03h11m_Tuesday.sql.gz
- Stop the PSM server.
psm-stop
- Uninstall the PSM server.
rpm -e ems9001
- Drop the ems database. For example:
mysql -u<user> -p -e "DROP DATABASE ems"
- Change directory to where the backups are stored.
cd /backups/daily/ems
- Unzip the desired backup.
For example:
gunzip daily_ems_2016-12-06_03h11m_Tuesday.sql.gz
The backup file is unzipped into the local directory. For example:
[user ems]# ls daily_ems_2016-12-06_03h11m_Tuesday.sql
- Restore the backup.
For example:
mysql –u<user> -p < daily_ems_2016-12-06_03h11m_Tuesday.sql
- Reinstall the PSM server.
For example:
[user ~]# cd /usr/local [user local]# ls ems* ems9001-7.4-0.x86_64.rpm [user local]# rpm -ivh ems9001-7.4-0.x86_64.rpm
- Reboot the server.
reboot
The backup is restored.