Exporting Site Recovery Manager (SRM) Configuration and Backing up the SRM Database
search cancel

Exporting Site Recovery Manager (SRM) Configuration and Backing up the SRM Database

book

Article ID: 397921

calendar_today

Updated On:

Products

VMware Site Recovery Manager 8.x

Issue/Introduction

This article explains how to export the Site Recovery Manager (SRM) configuration and back up of the SRM database on your production or your primary SRM server.

Note: Performing these tasks regularly helps ensure that your SRM environment can be restored quickly in case of failure or disaster, supporting effective disaster recovery planning.

Environment

VMware Site Recovery Manager 7.x and 8.x.

Prerequisites

  • Access credentials with sufficient permissions to log in to the production/primary SRM server.
  • WinSCP or another secure file transfer tool installed on your local machine.
  • Basic familiarity with Linux command line operations.
  • Ensure there is enough disk space on the SRM server for exporting configuration files and database backups.

Cause

Site Recovery Manager (SRM) configurations and databases contain critical information required for disaster recovery operations. Without regularly exporting the SRM configuration and backing up the SRM database, there is a risk of losing important recovery plans, settings, and data in the event of server failure, corruption, or other unexpected issues.

This can lead to extended downtime and complicate recovery efforts. Performing these exports and backups proactively helps ensure that your SRM environment can be restored quickly and reliably when needed.

Resolution

Export the SRM Configuration

  1. Log in to the production/primary/source SRM server.
  2. Run this command to export the SRM configuration:
    sh /opt/vmware/impex/bin/export.sh
  3. The exported XML file will be saved in the directory:
    /opt/vmware/impex/exports/ with a filename similar to <Prod_DR_date-#.xml>
  4. Change the permissions of the exported file to allow access by running this command:
    chmod 777 Prod_DR_date-#.xml
  5. Use WinSCP or another secure file transfer tool to copy the exported XML file off the SRM server for backup.

Backup the SRM Database

  1. Log in to the SRM server.
  2. Navigate to the SRM configuration directory by running this command:
    cd /opt/vmware/srm/conf/
  3. Verify the database user by running this command:
    cat db:srmdb
  4. Create a backup of the SRM PostgreSQL database by running this command:
    /opt/vmware/vpostgres/current/bin/pg_dump -Fc -U srmdb -d srmdb > /tmp/srmdb.backup
  5. Modify the permissions of the backup file to ensure accessibility by running this command:
    chmod 777 /tmp/srmdb.backup
  6. Use WinSCP or an equivalent tool to securely copy the backup file off the SRM server.

Troubleshooting Tips

  • Export script fails to run
    • Verify you have execute permissions on /opt/vmware/impex/bin/export.sh and that you are logged in as a user with appropriate privileges.
  • Cannot find exported XML file
    • Confirm the export completed successfully and check the /opt/vmware/impex/exports/ directory for the correct filename pattern.
  • Database backup command fails
    • Ensure the PostgreSQL service is running and that the srmdb user has the necessary permissions to perform the dump. Check for typos in the command syntax.
  • Permission denied errors when copying files
    • Double-check that the command chmod 777 was applied correctly to the exported and backup files before attempting to transfer them.

Additional Information