Backup and restore Web Modeler data
Create backup
To create a backup of Web Modeler data, you must back up the database that Web Modeler uses by following the instructions of the official PostgreSQL documentation.
For example, to create a backup of the database using pg_dumpall
, use the following command:
pg_dumpall -U <DATABASE_USER> -h <DATABASE_HOST> -p <DATABASE_PORT> -f dump.psql --quote-all-identifiers
Password: <DATABASE_PASSWORD>
pg_dumpall
may ask multiple times for the same password.
The database will be dumped into dump.psql
.
Database dumps created with pg_dumpall
/pg_dump
can only be restored into a database with the same or later version of PostgreSQL, see PostgreSQL documentation.
Restore
Backups can only be restored with downtime. To restore the database dump, first ensure that Web Modeler is stopped. Then, to restore the database use the following command:
psql -U <DATABASE_USER> -h <DATABASE_HOST> -p <DATABASE_PORT> -f dump.psql <DATABASE_NAME>
After the database has been restored, you can start Web Modeler again.
When restoring Web Modeler data from a backup, ensure that the ids of the users stored in your OIDC provider (e.g. Keycloak) do not change in between the backup and restore. Otherwise, users may not be able to log in after the restore (see Web Modeler's login troubleshooting guide).
Some vendors provide tools that help with database backups and restores, such as AWS Backup or Cloud SQL backups.