Disaster recovery of a CubeBackup for Google Workspace instance.


A server crash can be an unpredictable disaster that can happen at any time. In some unfortunate cases, your CubeBackup for Google Workspace installation may be completely unrecoverable. For example:

  • Your CubeBackup instance is running on a local server and backing up to a NAS or your company's data center, but the disk on your local server becomes corrupted and all data is lost.
  • You deploy CubeBackup on a cloud VM and back up to private cloud storage. The cloud VM is accidentally deleted or terminated.

In both of these cases, it should still be possible to connect a new CubeBackup installation to your old backups, as long as you have a copy of the encryption key file.

Note: If you cannot access the original encryption key, or if the backup storage directory is unavailable, you will have to begin the backup from scratch.

Step-by-step instructions

CubeBackup for Google Workspace allows you to easily recover an instance based on your existing backups. Please follow the detailed instructions appropriate for your operating system.

  1. Install CubeBackup for Google Workspace on a new machine, or in a different directory on the original machine.

    Note: Please ensure both the old and new servers are running the same version of CubeBackup. If necessary, install the same old version on the new server to maintain compatibility.

  2. Before going through the configuration wizard, copy the encryption key file to <installation directory>/db/keys.json.

    Tips:
    (1) If you did not choose to encrypt your backup data in your previous instance, this step is unnecessary.
    (2) On Windows, the installation directory is located at C:\Program Files\CubeBackup4 by default.

  3. In Step 2, choose the same Storage type and enter the storage location of your previous backup data.

    Tips:
    (1) It is not required to connect to the original data index. CubeBackup can automatically regenerate a new data index in an empty directory using your existing backup data.
    (2) If the backup data is stored in cloud storage, simply enter the same bucket name. For local storage, ensure that the backup folder path points to your original backup folder (e.g.\\192.168.8.22\backups\cubebackup_data).
    (3) If your backups were originally encrypted, make sure that the Encrypt backups box is checked! If your backups were not encrypted, this box must be manually unchecked.

  4. In Step 3, enter your domain name and domain administrator.

    Tip: If your previous CubeBackup instance managed multiple domains, you can select any one of them for your new setup.

  5. In Step 3, upload your service account key file.

    Tip: If you created the service account using CubeBackup Service Account Generator , you can log in with the same Google account to download a new key file. Otherwise, please create a new service account .

  6. In Step 4, authorize the new service account by following the instructions provided in Authorize domain-wide access . If CubeBackup is using the same service account as the previous instance, you can click Next directly to skip the authorization step.

  7. In subsequent steps, CubeBackup will automatically select the original users and shared drives into the backup list based on your previous backup data and configuration. Review the list and click Next if everything is correct.

  8. In the last step, assign a CubeBackup administrator.

  9. After logging in to the CubeBackup web console, all backup data and operation histories should be displayed in the web console exactly as before. We recommend restoring a test message or file to confirm that the system is functioning properly.

  10. Before the next incremental backup, it is necessary to run the cbackup fullSync command to perform a full synchronization with Google Workspace.

    • On Windows, open the Command Prompt as Administrator and run the following command.

      "C:\Program Files\CubeBackup4\bin\cbackup.exe" fullSync

    This ensures that any changes that took place during the downtime are accounted for, and that no data is missing from the backup.

  11. Recover the original license and backup settings.

    • In the CubeBackup web console, activate your original CubeBackup license code in the OVERVIEW > License information section.
    • Then reconfigure the settings on the SETTINGS page.
  1. Install CubeBackup for Google Workspace on a new machine, or in a different directory on the original machine.

    Note: Please ensure both the old and new servers are running the same version of CubeBackup. If necessary, install the same old version on the new server to maintain compatibility.

  2. Before going through the configuration wizard, copy the encryption key file to <installation directory>/db/keys.json.

    Tips:
    (1) If you did not choose to encrypt your backup data in your previous instance, this step is unnecessary.
    (2) On Linux, the installation directory is located at /opt/cubebackup by default.
    (3) For Linux users, please change the ownership of the encryption key file to cbuser.

    sudo chown cbuser:cbuser /opt/cubebackup/db/keys.json
  3. In Step 2, choose the same Storage type and enter the storage location of your previous backup data.

    Tips:
    (1) It is not required to connect to the original data index. CubeBackup can automatically regenerate a new data index in an empty directory using your existing backup data.
    (2) If the backup data is stored in cloud storage, simply enter the same bucket name. For local storage, please ensure that the backup folder path points to your original backup folder (e.g. /mnt/backups/cubebackup_data).
    (3) If your backups were originally encrypted, make sure that the Encrypt backups box is checked! If your backups were not encrypted, this box must be manually unchecked.

  4. In Step 3, enter your domain name and domain administrator.

    Tip: If your previous CubeBackup instance managed multiple domains, you can select any one of them for your new setup.

  5. In Step 3, upload your service account key file.

    Tip: If you created the service account using CubeBackup Service Account Generator , you can log in with the same Google account to download a new key file. Otherwise, please create a new service account .

  6. In Step 4, authorize the new service account by following the instructions provided in Authorize domain-wide access . If CubeBackup is using the same service account as the previous instance, you can click Next directly to skip the authorization step.

  7. In subsequent steps, CubeBackup will automatically select the original users and shared drives into the backup list based on your previous backup data and configuration. Review the list and click Next if everything is correct.

  8. In the last step, assign a CubeBackup administrator.

  9. After logging in to the CubeBackup web console, all backup data and operation histories should be displayed in the web console exactly as before. We recommend restoring a test message or file to confirm that the system is functioning properly.

  10. Before the next incremental backup, it is necessary to run the cbackup fullSync command to perform a full synchronization with Google Workspace.

    • On Linux, run the following command as cbuser:

      sudo -u cbuser /opt/cubebackup/bin/cbackup fullSync

    This ensures that any changes that took place during the downtime are accounted for, and that no data is missing from the backup.

  11. Recover the original license and backup settings.

    • In the CubeBackup web console, activate your original CubeBackup license code in the OVERVIEW > License information section.
    • Then reconfigure the settings on the SETTINGS page.
  1. Start a new CubeBackup container .

    Note: Please ensure both the old and new containers are running the same version of CubeBackup. If necessary, pull the same version of the old image before starting a new CubeBackup container.

  2. Before going through the configuration wizard, copy the encryption key file to <installation directory>/db/keys.json.

    docker cp ./keys.json <container_id>:/opt/cubebackup/db/keys.json

    Tips:
    (1) If you did not choose to encrypt your backup data in your previous instance, this step is unnecessary.
    (2) The installation directory is located at /opt/cubebackup inside the container.
    (2) For Docker users, please change the ownership of the encryption key file to cbuser.

    docker exec -it <container-name> bash
    sudo chown cbuser:cbuser /opt/cubebackup/db/keys.json
  3. In Step 2, choose the same Storage type and enter the storage location of your previous backup data.

    Tips:
    (1) It is not required to connect to the original data index. CubeBackup can automatically regenerate a new data index in an empty directory using your existing backup data.
    (2) If the backup data is stored in cloud storage, simply enter the same bucket name. For local storage, please ensure that the backup folder path points to your original backup folder (e.g. /mnt/backups/cubebackup_data).
    (3) If your backups were originally encrypted, make sure that the Encrypt backups box is checked! If your backups were not encrypted, this box must be manually unchecked.

  4. In Step 3, enter your domain name and domain administrator.

    Tip: If your previous CubeBackup instance managed multiple domains, you can select any one of them for your new setup. You can then add the remaining domains later within the CubeBackup web console.

  5. In Step 3, upload your service account key file.

    Tip: If you created the service account using CubeBackup Service Account Generator , you can log in with the same Google account to download a new key file. Otherwise, please create a new service account .

  6. In Step 4, authorize the new service account by following the instructions provided in Authorize domain-wide access . If CubeBackup is using the same service account as the previous instance, you can click Next directly to skip the authorization step.

  7. In subsequent steps, CubeBackup will automatically select the original users and shared drives into the backup list based on your previous backup data and configuration. Review the list and click Next if everything is correct.

  8. In the last step, assign a CubeBackup administrator.

  9. After logging in to the CubeBackup web console, all backup data and operation histories should be displayed in the web console exactly as before. We recommend restoring a test message or file to confirm that the system is functioning properly.

  10. Before the next incremental backup, it is necessary to run the cbackup fullSync command to perform a full synchronization with Google Workspace.

    • Switch to maintenance mode by running the following command:

      docker exec <container_id> touch /cubebackup_maintenance && docker restart <container_id>
    • Open the bash shell of the container:

      docker exec -it <container_id> bash
    • Run the cbackup fullSync command in the docker container.

      sudo -u cbuser /opt/cubebackup/bin/cbackup fullSync
    • Exit the container and quit maintenance mode:

      exit
      docker exec <container_id> rm /cubebackup_maintenance && docker restart <container_id>

    This ensures that any changes that took place during the downtime are accounted for, and that no data is missing from the backup.

  11. Recover the original license and backup settings.

    • In the CubeBackup web console, activate your original CubeBackup license code in the OVERVIEW > License information section.
    • Then reconfigure the settings on the SETTINGS page.
If you need any further assistance, please do not hesitate to contact us at [email protected].