Workspace backup
Backup and restore data
CloudBeaver stores all data on disk 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
).
For additional information on these commands, see the official Docker CLI Documentation.
To back up this data, follow these Docker commands for common tasks:
Access a running container
List services:
- This command lists all services defined in your
docker-compose.yml
file. - Find the name of the CloudBeaver service from the output.
Access the CloudBeaver container's shell:
- Replace
<service_name>
with the exact name of your CloudBeaver service from the previous command. - If your container uses a different shell (like
sh
instead ofbash
), adjust the command accordingly:
Backup the database
If CloudBeaver uses a PostgreSQL database, back up the database to a dump file before stopping the container.
Info
For more details on an internal database, see Server Database.
To create a backup of all PostgreSQL databases:
Copy workspace files from the container
First, create a backup of the workspace inside the running container:
- This command compresses the
workspace
directory intobackup.tgz
.
To copy the backup file (backup.tgz
) from the container to your local machine:
docker cp $(docker-compose ps -q <service_name>):/opt/cloudbeaver/backup.tgz /path/to/backup/location/
- Replace
/path/to/backup/location/
with the desired local destination.
Restore the database
Important
Ensure you have a PostgreSQL cluster running. If PostgreSQL isn't running, start it with:
If this is a new installation, clone the deployment repository and navigate to the directory:
To restore the PostgreSQL database:
-
Copy the database dump file back to the PostgreSQL container:
-
Restore the database inside the PostgreSQL container:
-
Optionally, delete the dump file from the PostgreSQL container to free up space:
Restore the workspace
To restore the workspace data: