If you select the option to use an embedded database for Site Recovery Manager, the Site Recovery Manager installer creates a vPostgres database during the installation process. You can back up and restore the embedded vPostgres database by using PostgreSQL commands.
Always back up the Site Recovery Manager database before updating or upgrading Site Recovery Manager. You also might need to back up and restore the embedded vPostgres database if you need to uninstall then reinstall Site Recovery Manager and retain data from the previous installation, migrate Site Recovery Manager Server to another host machine, or revert the database to a clean state in the event that it becomes corrupted.
Procedure
- Log into the system on which you installed Site Recovery Manager Server.
- Stop the Site Recovery Manager service.
- Navigate to the folder that contains the vPostgres commands.
If you installed
Site Recovery Manager Server in the default location, you find the vPostgres commands in
C:\Program Files\VMware\VMware vCenter Site Recovery Manager Embedded Database\bin.
If you are using the
Site Recovery Manager Appliance, you find the vPostgres commands in the
/opt/vmware/vpostgres/current/bin folder.
- Create a backup of the embedded vPostgres database by using the pg_dump command.
For
Site Recovery Manager for Windows use
pg_dump -Fc --host 127.0.0.1 --port port_number --username=db_username srm_db > srm_backup_name
.
You set the port number, username, and password for the embedded vPostgres database when you installed Site Recovery Manager. The default port number is 5678. The database name is srm_db
and cannot be changed.
For the
Site Recovery Manager Appliance use
pg_dump -Fc --username=db_username srmdb > srm_backup_name
.
You set the password for the embedded vPostgres database when you installed Site Recovery Manager, the default user name for the database is srmdb
. The database name is srmdb
and cannot be changed.
- Perform the actions that necessitate the backup of the embedded vPostgres database.
For example, update or upgrade
Site Recovery Manager, uninstall and reinstall
Site Recovery Manager, or migrate
Site Recovery Manager Server.
- (Optional) Restore the database from the backup that you created in Step 4 by using the pg_restore command.
For
Site Recovery Manager for Windows use
pg_restore -Fc --host 127.0.0.1 --port port_number --username=db_username --dbname=srm_db srm_backup_name
.
For the
Site Recovery Manager Appliance use
pg_restore -Fc --username=db_username --dbname=srmdb srm_backup_name
.
- Start the Site Recovery Manager service.