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. Sometimes, you may want to remove a G Suite domain from CubeBackup. Usually, there are two scenarios:

  • You only want to stop backing up the domain and remove the domain from CubeBackup, but would like to keep all backup data for this domain untouched.
  • You want to completely delete the domain from CubeBackup and erase the domain’s backup data.

Delete a domain from CubeBackup but keep its backup data remained

  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 only removes the domain from CubeBackup, while keeps the backup data for this domain untouched.
  • After the domain has been removed, if a restore request comes up for this domain, you can add this domain back and the backups for this domain will show up in the RESTORE page.

Remove a domain and its backups

There are several cases you may want to remove both the domain and its backups from CubeBackup. For example, you tried CubeBackup with a test domain and would like to erase everything for the test domain when the trial period was over. Or, you are not satisfied with the current configurations(backup users, whether backup shared files or not, etc.) and want to restart the backup for a domain from scratch.
To completely delete the G Suite domain from CubeBackup and erase all backup data for this domain:

  1. Log into the 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 delete 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.

  4. Remove the backup data for this domain.
    Manually delete the backup data directory for this domain. For example, if you store the backup data in /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 get the correct information.

  5. Remove the data index for this domain.
    Manually delete the data index directory for this domain. For example, if you store the data index in /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 get the correct information.