When you deploy the Site Recovery Manager appliance, Site Recovery Manager 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 unregister and 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.

Prerequisites

For information about the commands that you use to back up and restore the embedded vPostgres database, see the pg_dump and pg_restore commands in the PostgreSQL documentation at https://www.postgresql.org/docs/9.3/static/index.html.

Procedure

  1. Log in to the Site Recovery Manager Appliance Management Interface as admin.
  2. In the Site Recovery Manager Appliance Management Interface, click Services, and stop the Site Recovery Manager service.
  3. Log into the Site Recovery Manager host machine.
  4. Create a backup of the embedded vPostgres database by using the pg_dump command.
    /opt/vmware/vpostgres/current/bin/pg_dump -Fc --username=db_username srmdb > srm_backup_name

    The default user name for the database is srmdb. The database name is srmdb and cannot be changed.

  5. 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.
  6. (Optional) Restore the database from the backup that you created in Step 4 by using the pg_restore command.
    /opt/vmware/vpostgres/current/bin/pg_restore -Fc --username=db_username --dbname=srmdb srm_backup_name
  7. (Optional) To restore the database on the same system from which you created the backup, you must use the --clean option with the pg_restore command.
    /opt/vmware/vpostgres/current/bin/pg_restore --clean -Fc --username=db_username --dbname=srmdb srm_backup_name
  8. Start the Site Recovery Manager service.