Versions:
Latest
/
Quinteros
/
Petrosian
/
Oparin
/
Najdorf
/
Morphy
/
Lasker
/
Kasparov
/
Jansa
/
Ivanchuk
/
Hammer
/
Gaprindashvili
/
Fine
/
Euwe
Backup
Creating a backup of the appliance will be done using SSH or the console.
- Launch
appliance_console
- Select
Create Database Backup
and choose a backup location (/tmp/evm_db.backup is the default) - Select
Quit
to return to the shell
- Select
- For convenience, create a TGZ containing all files required to restore the database
tar -czvf /root/backup.tgz /tmp/evm_db.backup /var/www/miq/vmdb/GUID /var/www/miq/vmdb/certs/v2_key
- Save and/or rename
/root/backup.tgz
Scheduling Database Backups
Scheduling a database backup using crontab and pg_dump.
This example will create a backup file in /tmp
named something like db_dump20231009T145028.dump
.
Before adding the cron job it would be best practice to mount an external storage and adjust the example accordingly.
- SSH into the appliance and edit the root user crontab
crontab -e
- Press
i
to insert and add a line with the desired schedule to run the backup job. Examples:# Every hour on the hour 0 * * * * pg_dump -Fc vmdb_production > /tmp/db_dump$(date +\%Y\%m\%dT\%H\%M\%S).dump # Every day at midnight 0 0 * * * pg_dump -Fc vmdb_production > /tmp/db_dump$(date +\%Y\%m\%dT\%H\%M\%S).dump # Every week at midnight on Sunday 0 0 * * 0 pg_dump -Fc vmdb_production > /tmp/db_dump$(date +\%Y\%m\%dT\%H\%M\%S).dump
- Press
Esc
to exit insert mode then:wq
and hitEnter
to write and quit. If successful, it will outputcrontab: installing new crontab
- Done. If needed, logs can be found at
/var/log/cron
Restore
Restoring a backup of the appliance will be done using SSH or the console.
- Download a backup TGZ and place it in
/
- On the command line:
cd / tar -zxf /backup rm -f /backup # if desired to save space
- Launch
appliance_console
- If this is a brand new appliance and the database has not yet been initialized, select
Configure Application
. If this is an existing database appliance, this step can be skipped.- When prompted to configure the database, select
Create Internal Database
- When prompted to configure messaging, select
Make No messaging changes
- Choose a database disk
- Answer y or n to “Should this appliance run as a standalone database server?”
- Enter a region number (0), this is not important and will be overwritten on restore
- Set a database password
- Wait for database initialization to complete.
- When prompted to configure the database, select
- Select
Stop EVM Server Processes
- Select
Restore Database From Backup
- Decide whether you want to delete the backup file in /tmp after restore. (Yes)
- Select
Start EVM Server Processes
- If this is a brand new appliance and the database has not yet been initialized, select
- After a few minutes, you can log into the web UI and see all of the data contained in the backup.