How to archive data for a Google Workspace user or a Shared Drive.


The cbackup archive command allows you to archive the backup data for a Google Workspace user or a Shared Drive to specified storage. This is especially useful when an employee has left your organization and you would like to keep an archive of his data for possible future use.

cbackup archive command

cbackup archive <domain name> <user email or shared drive id> <app> <destination path>
  • domain name: the name of your domain (e.g. mydomain.com)
  • user email/shared drive id: the user account you wish to archive (e.g. [email protected]), or a shared drive ID (e.g. AAGFI5-SlBKnUk9PV)
  • app: must be one of these values: all, gmail, drive, calendar, contacts, sites. Choose all to archive all Google Workspace data for a user.
  • destination path: The output directory. This can be a local directory or a location on your network.

TIP: If you want to compress the archive data to a ZIP file, you can also specify the name of the ZIP file as the destination path. For example:

cbackup archive mydomain.com  [email protected] all  /var/myArchiveData/cube.zip

will archive all data of [email protected] into the cube.zip file instead of exporting all files into a directory.

NOTE:
1. On Windows, the cbackup.exe file is located in the C:\Program Files\CubeBackup4\bin directory by default. On Linux, the cbackup file is usually located in the /opt/cubebackup/bin directory.
2. This command requires special privileges:
On Windows, it must be run in a Windows Command Prompt or Windows Powershell using an Administrator account. For example:

"C:\Program Files\CubeBackup4\bin\cbackup.exe" archive mydomain.com [email protected] all D:\myArchiveData

On Linux, please run this command in a bash shell using the cbuser account. For example:

sudo -u cbuser /opt/cubebackup/bin/cbackup archive mydomain.com [email protected] all /var/myArchiveData 

Detailed instructions on cbackup archive command can be found at here.

Archive data for a Google Workspace user

Suppose you want to archive all Google Workspace data for [email protected] to a directory named myArchiveData. (The directory can be located on a local disk or on your network.)

  1. Login to the backup server.
  2. Open a Windows Powershell or Windows Command Prompt using an Administrator account.
  3. In the <cubebackup installation folder>/bin directory, run the command:

    cbackup archive mydomain.com [email protected] all D:\myArchiveData
  1. SSH into the backup server.
  2. Make sure cbuser has write permission to the target directory. One way to do this is to change the owner of the target directory to cbuser.

    sudo chown cbuser:cbuser  /var/myArchiveData
  3. In a bash shell, run the command:

    sudo -u cbuser cbackup archive mydomain.com  [email protected] all  /var/myArchiveData

Archive data for a Shared Drive

Suppose you want to archive all data for shared drive "Dev TD" to a directory named myArchiveData. (The directory can be located on a local disk or on your network.)

  1. Login to the CubeBackup console.
  2. Find out the ID for the shared drive. You can find the ID for a shared drive in the URL of this shared drive's Restore page. shared-drive-id
  3. Login to the backup server.
  4. Open a Windows Powershell or Windows Command Prompt using an Administrator account.
  5. In the <cubebackup installation folder>/bin directory, run the command:

    cbackup archive mydomain.com  0AAfuul0eM6ZFUk9PVA drive D:\myArchiveData
  1. Login to the CubeBackup console.
  2. Find out the ID for the shared drive. You can find the ID for a shared drive in the URL of this shared drive's Restore page. shared-drive-id
  3. SSH into the backup server.
  4. Make sure cbuser has write permission to the target directory. One way to do this is to change the owner of the target directory to cbuser.

    sudo chown cbuser:cbuser  /var/myArchiveData
  5. In a bash shell, run the command:

    sudo -u cbuser cbackup archive mydomain.com  0AAfuul0eM6ZFUk9PVA drive  /var/myArchiveData