Run the following commands and note down the ZENworks database credentials of the source machine:
zman dgv
zman dgca
zman dgcs
zman dgcam
Stop the ZENworks Services on all the Primary Servers by running the following configure action:
microfocus-zenworks-configure -c Start
After running the command, under Action, select Stop.
On the Primary Server on which the Embedded Database is installed, start the Micro Focus ZENworks Embedded Datastore service using the following steps:
Run the following command to start the Micro Focus ZENworks Embedded Datastore – PostgreSQL service.
On SLES 12 and later: systemctl start zenpostgresql.service
Login to the Primary Server that has the database role.
Initiate the backup by setting the following variables:
PGPORT: <existing source DB port configured>
By default, ZENworks uses 54327
PGDATA: <embedded_database_location>
PGUSER: <existing super user for ZENworks postgres DB> The default user for ZENworks is zenpostgres.
PGDATABASE: <existing database name> ZENworks default is postgres
PGPASSWORD: <password for the above super user PGUSER>
Run the following commands to back up both the databases (ZENworks and Audit):
./pg_dumpall > "<path to sql file>"
Example: ./pg_dumpall > /tmp/postgres_dump.sql
docker exec -e PGUSER=<super user retrieved from zman dgcs> -e PGDATABASE=postgres -e PGPASSWORD=<password retrieved from zman dgcs> zenpostgres /opt/microfocus/zenworks/share/pgsql/bin/pg_dumpall > /tmp/dump.sql
Example: docker exec -e PGUSER=zenpostgres -e PGDATABASE=postgres -e PGPASSWORD=Zw0#43cf4525d0f5df6395bbbec9c zenpostgres /opt/microfocus/zenworks/share/pgsql/bin/pg_dumpall > /tmp/dump.sql
NOTE:You can ignore the no version information available error message.