Sign inSign up

cubebackup/workspace

By cubebackup

Updated 7 months ago

Image
5

50K+

cubebackup/workspace repository overview

This is the official CubeBackup for Google Workspace docker image.

What is CubeBackup?

CubeBackup logo CubeBackup for Google Workspace is a self-hosted backup solution which allows you to backup Google Drive, Shared Drive, Gmail, Contacts, and Calendar data for your whole organization locally or to the cloud. You can visit the CubeBackup website for further details.

Dockerfile: https://github.com/CubeBackup/docker/blob/master/workspace-debian/release/Dockerfile

Basic usage

For basic testing purposes, you can create a new CubeBackup instance with the following command:

docker run -d -p 80:80 --name cubebackup cubebackup/workspace

After starting, browse http://<HOST_SERVER_IP>, from which you can go through the initial configuration to set up CubeBackup for your Google Workspace domain.

Data persistency

Since CubeBackup deals with backups of important files, we strongly recommend that you control the data persistency of your docker instance.

There are 2 volumes declared in the Dockerfile:

  • /cubebackup_data is the location of the backup data. You should bind mount the backup target directory on the host into the container at /cubebackup_data when starting the docker container.

Tip: If you are backing up to cloud storage like Amazon S3, this volume should be ignored.

  • /cubebackup_index is the location of the data index. The access speed of the data index is crucially important for the performance of the backup, so it is strongly recommended to bind mount a directory on a local SSD on the host to the /cubebackup_index volume. If you have no idea what the data index is yet, please see this doc.

Please note: You must bind mount into this volume using direct local storage (not mounted network storage!), otherwise, there will be serious performance issues. A fast local SSD is recommended as the best option.

In addition to the backup data, you may also want to keep the configurations and logs of CubeBackup persistent on the host machine, which can give you more flexibility when upgrading, stopping, or recreating docker containers. Three directories in the docker container should be exposed:

  • /opt/cubebackup/etc directory is the location to store the main configuration file (config.toml) for CubeBackup. We recommend using a named volume, like cube_cfg, so that the CubeBackup configuration file will persist when starting a new docker container.

  • /opt/cubebackup/db directory is the location to store the other application settings, key files, and an SQLite database for sessions. Again, we recommend using a named volume, like cube_db, so that these settings and files will persist when starting a new docker container.

  • /opt/cubebackup/log directory stores log files for CubeBackup. We recommend using a named volume, like cube_log, so that the log files persist when starting a new docker container.

An example

Here is an example to start a docker container with data persistency:

sudo docker run -d -p 80:80 -p 443:443 \
  -v /var/cubebackup_index:/cubebackup_index \
  -v /var/cubebackup_data:/cubebackup_data \
  --mount source=cube_cfg,target=/opt/cubebackup/etc \
  --mount source=cube_db,target=/opt/cubebackup/db \
  --mount source=cube_log,target=/opt/cubebackup/log \
  --name cubebackup \
  cubebackup/workspace

Tips:

  • If you plan to store the backup data to cloud storage, such as an AWS S3 bucket, there is no need to bind mount the /cubebackup_data volume. That is, the “-v /var/cubebackup_data:/cubebackup_data” should be omitted.
  • If you plan to enable the HTTPS/SSL for the CubeBackup web console, please ensure to publish port 443 with “-p 443:443” along with port 80.

Start the container using docker-compose

Here is an example for the docker-compose.yml file:

version: "3.8"
services:
  cubebackup:
    image: cubebackup/workspace
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/cubebackup_index:/cubebackup_index
      - /var/cubebackup_data:/cubebackup_data
      - cube_cfg:/opt/cubebackup/etc
      - cube_db:/opt/cubebackup/db
      - cube_log:/opt/cubebackup/log
volumes:
  cube_cfg:
  cube_db:
  cube_log:

Tips:

  • Publish port 443 using "- 443:443" is only necessary if you plan to enable the HTTPS/SSL for the CubeBackup web console.
  • If you plan to store the backup data to cloud storage such as AWS S3, there is no need to bind mount the “/cubebackup_data” volume to a host directory.

Additional References

Tag summary

Content type

Image

Digest

sha256:200ea532c

Size

87.7 MB

Last updated

7 months ago

docker pull cubebackup/workspace