8.3 Using the zman command to Take a Backup of the Database

To back up an embedded database, run the zman db command on the server that has the database role.

The backup is created in the following location:

/var/opt/microfocus/zenworks/common

To configure the backup location and automatic backup schedule, go through the following steps:

  1. Go to the backup folder location.

    • /var/opt/microfocus/zenworks/common

    By default, the backup should be available in the ZCMDB_pg_dump or AuditDB_pg_dump folder.

  2. Go to the following location:

    On Linux: /etc/opt/microfocus/zenworks/pgsql/pgsql-maintenance.xml

  3. Edit the backup location in the pgsql-maintenance.xml file.

  4. After editing the XML file, run microfocus-zenworks-configure -c AutomaticPostgresMaintenanceConfigureAction

  5. Restart the PostgreSQL service.

    Run the systemctl restart zenpostgresql.service command.

  6. Run the command zman db. The database backup should be created in the location that was updated in the pgsql-maintenance.xml file.

  7. Modify the schedule in the pgsql-maintenance.xml file, and restart the ZENworks PostgreSQL service.

    Automatically the backup will be created in the location and schedule specified in the pgsql-maintenance.xml file.