Restore
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
The Azure Plugin restores data as a new guest VM.
The restore process goes through the following steps.
Receive configuration metadata file.
Restore OS disk.
Restore data disks.
Create guest VM from OS disk and information from configuration metadata file.
Attach data disk to newly created guest VM
Delete locally generated files
Note
If debug level (debug parameter) is at its maximum level (9) locally generated file are not deleted
Disk Restore Process
This section will describe the restore process for any type of disk.
Restore disk locally
Apply incremental changes if any
Create empty disk on Azure side.
Issue SAS on the newly created disk.
Upload locally restored data to disk.
Revoke SAS
Note
Since disk are restored locally before being upload to azure there is a free space requirement of at least the size of the full VM
Restore to Local Disk with Azure-VM Plugin
Bacula Enterprise allows restoring any file (bvmdk, conf, etc.) to
your File Daemon’s local disks. Then, you may attach the disk to a running
Azure Virtual Machine and perform file level restores from the running VM.
By using where=/path/to/dir in the restore options, the Plugin will
automatically restore selected files to this location on your File
Daemon’s local disk.
After the disk is restored to a local directory, one can create a new disk in Azure and upload the restored disk data. The following guide assumes the user is logged to Azure account as described in the installation section.
The first step is to get the size of a restored VM disk:
ls -ln /path/to/dir/
The new Azure VM disk has to be created with the exact same size of a restored disk:
az disk create -n <DiskName> -g <ResourceGroupName> --upload-type Upload --upload-size-bytes <DiskSizeInBytes>
Write permissions need to be granted to a new placeholder disk:
az disk grant-access -n <DiskName> -g <ResourceGroupName> --access-level Write --duration-in-seconds 86400
The above command will return an accessSAS token that is needed for the next step:
azcopy copy /path/to/dir/<LocallyRestoredDisk>.bvmdk <accessSAS> --blob-type PageBlob
After the upload is completed, the write permissions need to be revoked:
az disk revoke-access <DiskName> -g <ResourceGroupName>
Get the uploaded disk ID and attach it to Azure Virtual Machine:
diskId=$(az disk show -g <ResourceGroupName> -n <DiskName> --query 'id' -o tsv)
az vm disk attach -g <ResourceGroupName> --vm-name <VmName> --name $diskId
Then, one can SSH to Azure Virtual Machine and inspect the content of the restored disk or perform file level restores.
Finally, the restored disk can be detached from the VM and deleted if needed:
az vm disk detach -g <ResourceGroupName> --vm-name <VmName> -n <DiskName>
az disk delete --name <DiskName> -g <ResourceGroupName>
Go back to: Azure VM Plugin: Operations.