How to remove a G Suite domain from CubeBackup?


As a G Suite administrator or a G Suite partner, you are probably backing up multiple G Suite domains in CubeBackup. Here are the steps to remove a domain from CubeBackup.

Step1: Delete the domain from CubeBackup

  1. Log into your backup server.
  2. If CubeBackup runs on Windows, open a Windows Powershell or Command Prompt on the backup server. If CubeBackup runs on Linux or in a Docker container, use the Bash shell.
  3. Run the cbackup removeDomain command to remove the domain from CubeBackup.

    cbackup removeDomain <domain-name>
    

Tip: On Windows operating systems, the cbackup file is located in “C:\Program Files\CubeBackup4\bin” directory by default. On Linux operating systems, the cbackup file is most likely located in “/opt/cubebackup/bin” directory.

NOTE:

  • The cbackup removeDomain command removes only the domain from CubeBackup. The backup data for this domain remains completely untouched.
  • If a restore request comes up for this domain after it has been removed, you can add this domain again and the backups for this domain will once again show up in the RESTORE page.

Step2: Remove unneeded backup data (Optional)

In some cases, you may no longer need the backup files for a domain after it has been removed from CubeBackup. For example, you may have tried CubeBackup with a test domain and would like to erase everything after the testing period is over.

To completely erase all backup data for a domain:

  1. Remove the backup data for this domain.
    Manually delete the backup data directory for this domain. For example, if you stored the backup data in the /var/gsuite-backup directory, you can delete the directory /var/gsuite-backup/domains/<deleted-domain.com>.

    Tip: If you do not know where backup data is stored, please open the file <cubebackup-installation-directory>/db/storage.json to find the correct location.

  2. Remove the data index for this domain.
    Manually delete the data index directory for this domain. For example, if you stored the data index in the /opt/cubebackup/data-index directory, you can delete the directory /opt/cubebackup/data-index/domains/<deleted-domain.com>.

    Tip: If you do not know where data index is stored, please open the file <cubebackup-installation-directory>/db/storage.json to find the correct location.