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.

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 into the system on which you installed Site Recovery Manager Server.
  2. Stop the Site Recovery Manager service.
  3. 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.
  4. 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.

  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.
    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.
  7. Start the Site Recovery Manager service.