Command Line Manual : cbackup
The cbackup command is the main command for CubeBackup. You can use it to check the version number, remove unnecessary data and organizations, etc.
The cbackup command must be run on the backup server.
The cbackup file is located in the <cubebackup installation directory>/bin folder.
On Windows, cbackup.exe is located in C:\Program Files\CubeBackup365\bin by default. So you can run the C:\Program Files\CubeBackup365\bin\cbackup.exe … command in Windows Command Prompt or Windows Powershell.
On Linux, cbackup is located in /opt/cubebackup365/bin by default. Run the /opt/cubebackup365/bin/cbackup … command in a bash shell.
SYNOPSIS
cbackup <command> [option]
COMMANDS
The following commands can be used by cbackup.
filesExclude: Filter drive files included in the backup.
removeOrganization: Remove an organization from CubeBackup.
version: Display CubeBackup version.
NOTE:
On Windows, most commands require Administrator privileges. Please run these commands in a Windows Powershell or Command Prompt as an Administrator.
On Linux, most commands must be run by the cbuser account, e.g.:sudo -u cbuser cbackup filesExclude …
cbackup filesExclude
Some organizations may not wish to back up large or unimportant files in OneDrive or SharePoint sites in order to save backup storage space.
To filter out these files from the backup storage, you can set file exclusion rules on the SETTINGS > Apps > Options dialog. For detailed information about how to set file exclusion rules, please refer to Exclude files that match any of the following rules.
To protect the safety of your backup set, CubeBackup will not automatically use these rules to purge files which have previously been backed up. You must run the cbackup filesExclude remove command to manually purge those unwanted files from the backup data. For more information on how to remove unnecessary files from backup storage, see this tutorial.
This command has two subcommands: cbackup filesExclude list and cbackup filesExclude remove.
cbackup filesExclude list
This command will list backup files which match the File exclusion rules. This is useful to check which currently backed up files will be excluded from future backups using the rules set in the CubeBackup web console. It is strongly recommended that you run this command before the cbackup filesExclude remove command to double-check which files will be deleted from your backup.
SYNOPSIS
cbackup filesExclude list <app> <organization-id>
- app: must be one of these values: onedrive, sharepoint, all
- organization-id: the orgainzation ID. You can find it in the URL of the CubeBackup web console.
NOTE:
Before running this command, you should first stop the CubeBackup service.
Please run this command.
sudo /opt/cubebackup365/bin/cbsrv stop
Open a Command Prompt as Administrator, and run this command.
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop
Open the Windows PowerShell as Administrator, and run this command.
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop
Please run this command to stop the container.
sudo docker stop <container-name>
This command requires special privileges.
- On Windows, it must be run by an Administrator account.
On Linux, it must be run by the cbuser account. For example:
sudo -u cbuser /opt/cubebackup365/bin/cbackup filesExclude list onedrive 9d88f7eb-****-dacf66b4c748
Then please start the CubeBackup service after the command has successfully completed.
Please run this command.
sudo /opt/cubebackup365/bin/cbsrv start
Open a Command Prompt as Administrator, and run this command.
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" start
Open the Windows PowerShell as Administrator, and run this command.
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" start
Please run this command to start the container.
sudo docker start <container-name>
cbackup filesExclude remove
This command removes files matching the file exclusion rules from your backup set.
SYNOPSIS
cbackup filesExclude remove <app> <organization-id>
- app: must be one of these values: onedrive, sharepoint, all
- organization-id: the orgainzation ID. You can find it in the URL of the CubeBackup web console.
Note:
Before purging unwanted files from the backup storage, please run the cbackup filesExclude list command to check which files will be removed.
Before running this command, you should first stop the CubeBackup service.
Please run this command.
sudo /opt/cubebackup365/bin/cbsrv stop
Open a Command Prompt as Administrator, and run this command.
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop
Open the Windows PowerShell as Administrator, and run this command.
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" stop
Please run this command to stop the container.
sudo docker stop <container-name>
This command requires special privileges.
On Windows, it must be run by an Administrator account.
On Linux, it must be run by the cbuser account. For example:sudo -u cbuser /opt/cubebackup365/bin/cbackup filesExclude remove onedrive 9d88f7eb-****-dacf66b4c748
Then please start the CubeBackup service after the command has successfully completed.
Please run this command.
sudo /opt/cubebackup365/bin/cbsrv start
Open a Command Prompt as Administrator, and run this command.
"C:\Program Files\CubeBackup365\bin\cbsrv.exe" start
Open the Windows PowerShell as Administrator, and run this command.
& "C:\Program Files\CubeBackup365\bin\cbsrv.exe" start
Please run this command to start the container.
sudo docker start <container-name>
cbackup removeOrganization
Many Microsoft 365 administrators and partners back up multiple organizations using CubeBackup. The cbackup removeOrganization command can be used to remove a Microsoft 365 organization from the backup list.
SYNOPSIS
cbackup removeOrganization <organization-id>
NOTE:
- The cbackup removeOrganization command removes only the organization (not the backup data) from CubeBackup. That is, CubeBackup will no longer back up the specified organization, but the backup data for this organization remains completely untouched.
- If a restore request comes up for this organization after it has been removed, you can add this Microsoft 365 organization again and the backups for this organization will once again show up in the RESTORE page.
This command requires special privilege.
If CubeBackup runs on Windows, please run this command as an administrator.
If CubeBackup runs on Linux, please use sudo -u cbuser … in the bash shell.
For detailed instructions on how to use this command, please refer to How to remove a Microsoft 365 organization from CubeBackup.
cbackup version
This command will display the current version of CubeBackup.
SYNOPSIS
cbackup version