XamFlow Workstation Backup Guide¶
Warning
Backups are critical and require expert handling. Please carefully read this document and consult with your system administrator or IT department.
This backup guide describes the process to backup XamFlow Workstation.
It is important that the user of XamFlow Workstation periodically creates backups of all important data.
General recommendations¶
Keep multiple daily / weekly / monthly backups
Store backups on-site and off-site on different storage mediums
Automate backups
Test restoring from backups periodically
Database Backup¶
XamFlow Workstation uses its own private PostgreSQL database.
Study the PostgreSQL Documentation about pg_dump
Start XamFlow Workstation (so the database service is running).
Create a folder.
Open a console in that folder and run for example the following commands:
set PG_BIN="%localappdata%\Lucid_Concepts_AG\Workstation\PostgreSQL\15\bin"
%PG_BIN%\pg_dump.exe --dbname=xamflow --file="database.dump" --format=custom --port=44304 --username=postgres --verbose >pg_dump_stdout.log 2>pg_dump_stderr.log
type pg_dump_stdout.log
type pg_dump_stderr.log
Type the password (default:
postgres
) when prompted.Check the
pg_dump_stdout.log
andpg_dump_stderr.log
files for any error message.This creates a consistent backup of the database i.e.
%localappdata%\Lucid_Concepts_AG\Workstation\Database
.PGPASSFILE can be used to configure the password if needed.
Example batch files:
@ECHO OFF
CHCP 65001
CALL %LOCALAPPDATA%\Lucid_Concepts_AG\Workstation\PostgreSQL\set_pg_bin.bat
SET DUMPFILE=database_%DATE%.dump
SET PGPASSFILE=pgpass.txt
ECHO pg_dump started at %DATE% %TIME%
%PG_BIN%\pg_dump.exe --dbname=xamflow --file=%DUMPFILE% --format=custom --port=44304 --username=postgres --verbose >pg_dump_stdout.log 2>pg_dump_stderr.log
SET EXITCODE=%ERRORLEVEL%
ECHO pg_dump ended at %DATE% %TIME% with exit code %EXITCODE%
TYPE pg_dump_stdout.log
TYPE pg_dump_stderr.log
EXIT /B %EXITCODE%
Schedule regular backups¶
For example via Windows Task Scheduler. It can be opened via Windows Start Menu or taskschd.msc.
Click ‘’Create Basic Task…’’ in the sidebar.
Set the name.
Set the trigger intervall (e.g. weekly) and start time.
Set the action to start a program and select for example a batch file as shown above.
Monitor the Windows Event Viewer for problems.
File Storage Backup¶
Copy the files from the File Storage mappings.
By default in
%localappdata%\Lucid_Concepts_AG\Workstation\FileStorage
.Consult the WebAdmin panel for File Storage mappings in case the location was adjusted.
Other Files¶
Copy other files like config, license or log files from
%localappdata%\Lucid_Concepts_AG
.
Restore Database from Backup¶
Warning
Restoring the database is a critical operation. A clean database is required as a starting point. Dropped database objects not present in the backup cannot be restored.
Consider adjusting flags like –create below according to the specific scenario.
Start XamFlow Workstation (so the database service is running).
Stop the worker service.
Open a console and run for example the following commands:
set PG_BIN="%localappdata%\Lucid_Concepts_AG\Workstation\PostgreSQL\15\bin"
%PG_BIN%\pg_restore.exe --create --dbname=postgres --port=44304 --username=postgres --verbose --exit-on-error database.dump >pg_restore_stdout.log 2>pg_restore_stderr.log
type pg_restore_stdout.log
type pg_restore_stderr.log
Type the password (default:
postgres
) when prompted.Check the
pg_restore_stdout.log
andpg_restore_stderr.log
files for any error message.
Restore Files¶
Warning
Restoring the files is a critical operation. The files should be consistent with the database.
Restore the files at the same time as the database backup, so they are consistent.