To restore backup:
  1. Stop Siemplify services.
    systemctl stop Siemplify.*
  2. Change directory to the directory with your backup files (in the following example it’s /tmp/backup/)
    cd /tmp/backup/
  3. Make sure, that you have all your backup files in the folder (.bak)
  4. Log in as a postgres user
    su postgres
  5. Restore backup (details about the arguments for pg_restore appear at the bottom of the page)
    pg_restore -C -c -d postgres siemplify_agents_db.bak;
    pg_restore -C -c -d postgres siemplify_command_center_db.bak;
    pg_restore -C -c -d postgres siemplify_dashboards_db.bak;
    pg_restore -C -c -d postgres siemplify_entityexplorer_db.bak;
    pg_restore -C -c -d postgres siemplify_homepage_db.bak;
    pg_restore -C -c -d postgres siemplify_integrations_db.bak;
    pg_restore -C -c -d postgres siemplify_jobs_db.bak;
    pg_restore -C -c -d postgres siemplify_layout_view_db.bak;
    pg_restore -C -c -d postgres siemplify_metadata_db.bak;
    pg_restore -C -c -d postgres siemplify_monitoring_db.bak;
    pg_restore -C -c -d postgres siemplify_notifications_db.bak;
    pg_restore -C -c -d postgres siemplify_ontology_db.bak;
    pg_restore -C -c -d postgres siemplify_orchestration_db.bak;
    pg_restore -C -c -d postgres siemplify_queues_db.bak;
    pg_restore -C -c -d postgres siemplify_report_system_db.bak;
    pg_restore -C -c -d postgres siemplify_search_everything_db.bak;
    pg_restore -C -c -d postgres siemplify_system_db.bak;
    pg_restore -C -c -d postgres siemplify_configuration_db.bak;
    pg_restore -C -c -d postgres siemplify_simulation_db.bak;
    pg_restore -C -c -d postgres siemplify_usecases_db.bak
  6. Logout from postgres user
  7. Start Siemplify services:
    systemctl start Siemplify.Connectors.service;
    systemctl start Siemplify.Server.ETL.DataProcessingEngine.service;
    systemctl start Siemplify.Server.Indexer.service;
    systemctl start Siemplify.Server.PlaybookActions.service;
    systemctl start Siemplify.Server.PythonExecution.service;
    systemctl start Siemplify.Server.service

    The following options use pg_restore:

     -c  Clean (drop) database objects before recreating them. (This might generate some harmless error messages if any objects were not present in the destination database.)

    -C   Create the database before restoring it into it. If -c  is also specified, drop and recreate the target database before connecting to it.

    -d dbname Connect to database dbname and restore directly into the database.