Skip to main content

Commvault Restores

Commvault Restores

Commvault restore types:

MySQL Restores

File level restores

VPC Restores

====================================================================================

MySQL Restores

There are 2 types of database restore we can look to perform through commvault, depending on the type of backups in use.

If the client has MySQL level backups, see here

If the client only had file-level backups, see here

====================================================================================

MySQL level backups

Starting the restore job

Commgui > Client Servers > Ctrl+F > Search SID > Double Click MySQL > Double Click SID   

Right click > All tasks > browse and restore > Untick Recover > Select Required Date using end time  

Select Required Database from the list > Recover Selected 

------------------------------------------------------------------------------------------------------------------------------------------ 

Restoring a specific table from DB level backups 

------------------------------------------------------------------------------------------------------------------------------------------ 

Identify the line number of the desired table in the dump file: 

grep -in 'dumping data for' dumpfile.sql 

Next, we need to remove the lines before and after the desired table 

sed -i '10611,28206dm2meandemcom.sql 

The 2 numbers here are the line number of the next table (shown in the original grep command) and the final tables line number (also in the dump) 

Next we do the same for the table line numbers before the one we need: 

sed -i '51,10581d' m2meandemcom.sql 

 ====================================================================================

File level database restore

====================================================================================

File Level Restores

====================================================================================

eCloud VPC Restores

------------------------------------------------------------------------------------------------------------------------------------------ 

Commvault VM Level Backup Restore: 

CommGUI > Client Computers > ctrl+f > VM ID/VPC Instance ID > right click > browse and restore > Full Virtual Machine > Select End time  (if required) > Browse > Select VM > Restore full VM  >  Select Restore DataStore, change name to VMID_TICKETNUMBER> Go  

Vmware > search for restore VM (VMID_Ticket)  

Edit settings (along the top)  

1. Disable Networking

vSphere > VM > Edit Settings > Network Adapter > Disable 'Connect at power on'

2. Power on restore VM

vSphere > VM > Actions > Power > Power On

3. Add swing disk

Confirm how much space you will require for a swing disk to be used to move data over to the live VM.

vsphere > VM > Edit Settings > Add New > Hard Disk > OK

Once the disk has been added in vSphere, you'll need to configure this on the server.

Use mkfs to initialise the disk filesystem.

mkfs /dev/sdX

Mount the disk once configured.

mount /dev/sdX /mnt

4. Move requested data onto disk

5. Unmount the disk from restore VM

'Once the data has been moved onto the disk, unmount the disk from the server filesystem:

umount /mnt

And, unmount the disk from the restore VM within vSphere

vSphere > Edit Settings > X symbol next to disk we've added. Don't click 'Delete files from datastore'.

5. Transfer the disk to the live VM

Mount disk on live VM in vSphere

Edit Settings > Add New Device > Existing Hard Disk > Datastores > Restores > Identify restore VM > Add restore swing disk

Mount the disk on live server filesystem

mount /dev/sdX /mnt

6. Move file away from swing disk, into the required location for the client

7. Clean up

Unmount the disk from the live VM

umount /dev/diskname  

Vsphere > edit settings > remove disk >  Select 'delete disk from datastore'

Delete the restore VM
vSphere > Restore VM > Actions > Delete from disk > yes

------------------------------------------------------------------------------------------------------------------------------------------ 

Removing Restore 

 

Once the client has finished with the restore, the disk will need to be unmounted from the server and the restore VM can be deleted. 

 

SSH onto client VPC > df –h > check for /restore > umount /restore 

 

Once the disk has been unmounted: 

 

Vmware > Client VM >  Edit Settings > Restore Disk > Remove (X on right side) 

 

Now delete the Restore VM: 

 

Vmware > restore VM > Power Off > Actions > Delete From Disk 

 

------------------------------------------------------------------------------------------------------------------------------------------ 

Attach disk 

Access restored server 

Lsblk - find device name 

Mkfs /dev/(device name) 

Mount /dev/(devicename) /mnt 

 

Main server > edit settings > attach device > existing disk > find disk 

On server: 

Mount /dev/(devicename) /mnt 

Move restored files onto server