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:
On Windows: Press the Win + R keys on the keyboard to open the Run window. Type services. msc and then hit Enter.
Start the Micro Focus ZENworks Embedded Datastore – PostgreSQL service.
On Linux: 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:
NOTE:This step is required for Windows only.
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>
Example 7-1 Example for Windows Primary Server
Open the command prompt and set the following variables based on the existing configuration.
SET PGPORT=54327
SET PGDATA= %ZENSERVER_HOME%\database\pgsql\data
SET PGUSER=<super user retrieved from zman dgcs>
SET PGDATABASE=postgres
SET PGPASSWORD=<password retrieved from zman dgcs>;
Run the following commands to back up both the databases (ZENworks and Audit):
On Windows:
cd "%ZENSERVER_HOME%\share\postgres\bin\"
pg_dumpall.exe > "<path to sql file>"
Example: pg_dumpall.exe > c:\postgres_dump.sql
On Linux:
./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.