Workspace backup
This article covers the CloudBeaver workspace and the cloudbeaver PostgreSQL database. The workspace is stored in the
/opt/cloudbeaver/workspace directory, which is typically mounted to a folder on the host machine
(/var/cloudbeaver/workspace or /var/cloudbeaver-ee/workspace).
A complete server recovery may also require PostgreSQL roles and memberships, deployment configuration, certificates, keys, proxy data, and other active mounts.
InfoFor Enterprise Edition only
For the complete recovery workflow, see Server backup and restore.
Back up the database¶
Important
A complete recovery set requires a consistent database and workspace state. Stop CloudBeaver, the proxy, jobs, integrations, and all other writers. Keep PostgreSQL running only while creating the logical dump, then stop PostgreSQL before finalizing the recovery set. Before creating either artifact, select a new, empty host backup directory for this recovery point. Don't reuse artifacts from an earlier recovery set.
- Identify the configured PostgreSQL database and its owner. The CloudBeaver database is named
cloudbeaverby default. -
Create a logical backup of the
cloudbeaverdatabase before stopping PostgreSQL.Info
This workflow uses a logical dump to restore the individual application database into a fresh PostgreSQL cluster. Physical backups capture the entire cluster. For information on these backup methods, see the PostgreSQL documentation on SQL dumps and file system backups.
-
Preserve PostgreSQL roles and memberships separately as part of a complete recovery set.
- Store the database backup in the current recovery-point directory, and verify that the artifact is readable.
Info
For more details on an internal database, see Server Database.
Back up the workspace¶
- Identify whether
/opt/cloudbeaver/workspacemaps to a host path or a named volume. - Stop CloudBeaver and all other writers. Stop PostgreSQL after the logical backup completes.
- Archive the workspace from a read-only source. Preserve file ownership, permissions, and symbolic links.
- Store the archive with the database backup in the current recovery-point directory, and verify that it is readable.
Info
For information on backing up and restoring Docker volumes, see Back up, restore, or migrate data volumes.
If you're using CloudBeaver AWS, transfer the recovery-point artifacts from the EC2 instance to protected storage outside the instance. Verify the transferred artifacts before relying on them for recovery.
Restore the database¶
Important
Restore the database and workspace into fresh, isolated targets. Keep the application stopped, and don't import the dump into the active production database or combine it with old PostgreSQL data files.
- Prepare a fresh, isolated PostgreSQL target, and keep CloudBeaver stopped.
- Restore roles and memberships first.
- Restore the database with its recorded name and owner.
- Verify that the database is ready, then authenticate with the database account configured for CloudBeaver.
Restore the workspace¶
To restore the workspace data safely:
- Prepare a fresh workspace target that isn't attached to a running CloudBeaver service.
- Restore the workspace archive before CloudBeaver attaches to the target. Preserve ownership, permissions, and symbolic links.
- Update the CloudBeaver service mapping to mount the fresh target at
/opt/cloudbeaver/workspace. - Start CloudBeaver, and verify the service and restored workspace.
Don't extract the archive into active workspace storage while CloudBeaver is running.