How to remove backups for a specific user or a shared drive?


There are some cases where you may want to remove the backup data for a specific user/shared drive. For example, if the user left your organization sufficiently long ago, that, according to your company’s data retention policies, it is no longer necessary for this user to be part of the backup. Or, perhaps you find that one user(or one shared drive) is consuming a disproportionate amount of backup space and you would like to remove that person(or that shared drive) from the backup.

Remove backups for a specific user

  1. Login to the CubeBackup console, stop the current backup if it is running.

  2. Uncheck the user from the SETTINGS > Users section to prevent this user from being included in future backups.

  3. Find out the ID for this user. You can find the user ID in the URL of this user’s Restore page. user ID in the URL

  4. Log (or SSH) into the backup server.

  5. Clean up the data index cache and merge the data index to backup storage using the cbackup syncDataIndex command:

    • On Windows, by default, the cbackup.exe command is located in “C:\Program Files\CubeBackup4\bin” directory. You need to run the cbackup syncDataIndex command as an administrator in Windows Command Prompt.
    • On Linux, this command must be run by the user cbuser.

      sudo -u cbuser  /opt/cubebackup/bin/cbackup syncDataIndex
      
  6. In the “data index” directory, manually remove the folder domains/<your-domain>/users/<user-id>

    If you do not know where the “data index” directory is, you can find the information from the Storage status section on the OVERVIEW page in the CubeBackup web console.

  7. In the “backup data” directory, manually remove the folder domains/<your-domain>/users/<user-id>

    If you do not know where the “backup data” directory is, you can find the information from the Storage status section on the OVERVIEW page in the CubeBackup web console.

You can login to the CubeBackup console. In the user’s RESTORE page, you will now see that no files/messages are listed under this user’s account.  

Remove backups for a specific shared drive

  1. Login to the CubeBackup console, stop the current backup if it is running.

  2. Uncheck the shared drive from the SETTINGS > Shared drives section to prevent this shared drive from being included in future backups.

  3. Find out the ID for this shared drive. You can find the shared drive’s ID in the URL of this shared drive’s Restore page. Shared drive ID in the URL

  4. Log (or SSH) into the backup server.

  5. Clean up the data index cache and merge the data index to backup storage using the cbackup syncDataIndex command:

    • On Windows, by default, the cbackup.exe command is located in “C:\Program Files\CubeBackup4\bin” directory. You need to run the cbackup syncDataIndex command as an administrator in Windows Command Prompt.
    • On Linux, this command must be run by the user cbuser.

      sudo -u cbuser  /opt/cubebackup/bin/cbackup syncDataIndex
      
  6. In the “data index” directory, manually remove the directory domains/<your-domain>/teamdrives/<shared drive-id>

    If you do not know where the “data index” directory is, you can find the information from the Storage status section on the OVERVIEW page in the CubeBackup web console.

  7. In the “backup data” directory, manually remove the directory domains/<your-domain>/teamdrives/<shared drive-id>

    If you do not know where the “backup data” directory is, you can find the information from the Storage status section on the OVERVIEW page in the CubeBackup web console.

After that, you can login to the CubeBackup web console. In the shared drive’s RESTORE page, you will now see that no files are listed there.