You can use BOSH Backup and Restore (BBR) to restore a lost piece of VMware Tanzu Application Service for VMs (TAS for VMs) data, such as a user or space.

Prerequisite

Restoring TAS for VMs data with BBR is only possible if you have previously taken a backup using the bbr deployment backup command.

This command produces a backup artifact in the format TAS_DEPLOYMENT_TIMESTAMP/.

Validate your backup artifact

Before restoring, verify that the backup artifact you have is suitable for your restore need. You can untar and explore the TAS for VMs backup artifact to verify that it contains the data that you need to restore.

Use any of the checks in this section, depending on the data you need to restore.

Verify contents of backup artifact Run: You can restore this backup if output shows artifact you need to restore
To verify that your backup artifact contains the org you need to restore tar -xvf backup_restore-0-bbr-cloudcontrollerdb.tar
cat cloudcontroller-artifact-file | grep "ORG-TO-RESTORE"
Where ORG-TO-RESTORE is the org you need to restore.
INSERT INTO `organizations` VALUES (..., ,'ORG-TO-RESTORE', ...);

Where ORG-TO-RESTORE is the org you need to restore.
To verify that your backup artifact contains the space you need to restore tar -xvf backup_restore-0-bbr-cloudcontrollerdb.tar
cat cloudcontroller-artifact-file | grep "SPACE-TO-RESTORE"
Where SPACE-TO-RESTORE is the space you need to restore.
INSERT INTO `spaces` VALUES (..., ,'SPACE-TO-RESTORE', ...);

Where SPACE-TO-RESTORE is the space you need to restore.
To verify that your backup artifact contains the user you need to restore tar -xvf backup_restore-0-bbr-uaadb.tar
cat uaadb-artifact-file | grep "USER-TO-RESTORE"
Where USER-TO-RESTORE is the user you need to restore.
INSERT INTO `users` VALUES (..., ,'USER-TO-RESTORE', ...);

Where USER-TO-RESTORE is the user you need to restore.
To verify that your backup artifact contains the route you need to restore tar -xvf backup_restore-0-bbr-cloudcontrollerdb.tar
cat cloudcontroller-artifact-file | grep "ROUTE-TO-RESTORE"
Where ROUTE-TO-RESTORE is the route you need to restore.
INSERT INTO `routes` VALUES (..., ,'ROUTE-TO-RESTORE', ...);

Where ROUTE-TO-RESTORE is the route you need to restore.
To verify that your backup artifact contains the domain you need to restore tar -xvf backup_restore-0-bbr-cloudcontrollerdb.tar
cat cloudcontroller-artifact-file | grep "DOMAIN-TO-RESTORE"
Where DOMAIN-TO-RESTORE is the domain you need to restore.
INSERT INTO `domains` VALUES (..., ,'DOMAIN-TO-RESTORE', ...);

Where DOMAIN-TO-RESTORE is the domain you need to restore.
To verify that your backup artifact contains the app you need to restore tar -xvf backup_restore-0-bbr-cloudcontrollerdb.tar
cat cloudcontroller-artifact-file | grep "APP-TO-RESTORE"
Where APP-TO-RESTORE is the app you need to restore.
Run:
tar -xvf blobstore-backup.tar
tree blobstore-backup | grep "APP-DROPLET"
Where APP-DROPLET is the droplet for the app that you need to restore.

Look for the following in the output:
INSERT INTO `apps` VALUES (..., ,'APP-TO-RESTORE', 'APP-DROPLET', ...);

Where APP-TO-RESTORE is the app you need to restore, and APP-DROPLET is the droplet for the app that you need to restore.

NOTE: If you use an external blobstore, go to your IaaS console and verify that the backup bucket for the droplet is present.

Perform the restore

BBR restore is a destructive process that removes any current data in your deployment. Performing a restore overwrites all new data since you created your most recent backup artifact.

VMware recommends that you verify the compatibility of your backup artifact by attempting the restore on an environment that is identical to the target environment. If this is not possible, see Compatibility of Restore in Restoring Deployments from Backup with BBR to confirm that your backup is compatible with your restore environment.

To run a TAS for VMs restore, follow the BBR instructions in Step 14: Restore TAS for VMs in Restoring Deployments from Backup with BBR.

After a restore, TAS for VMs rolls back to its state at the time when the backup was taken, and contains the data that you had previously lost.

Consolidate your environment

If you have service instances that were not present when you performed the backup, then the BOSH service deployments become orphaned. TAS for VMs has no reference to these service deployments, but they continue to exist. You can locate orphaned service deployments using the BOSH command-line interface (CLI).

You can locate orphaned on-demand service instances by running the orphan-deployments errand. For more information, see Orphan deployments in Broker and Service Management.

check-circle-line exclamation-circle-line close-line
Scroll to top icon