cancel
Showing results for 
Search instead for 
Did you mean: 

Create Backup job of VMware server in BEMCLI

Fredru
Level 3

Hi

I am using the commands in http://www.symantec.com/docs/TECH184683 to create a powershell scripts for creating backup jobs.

The export works fine, and import of jobs for Windows agents works fine.

 

However when importing the job for a VMware server it gets harder, as the VMware (ESXi) does not show in the get-BEAgentServer command.

Therefore wondering if someone has managed to create a backup job through for a VMware server in BEMCLI?

I do not mean one VM, but a job to backup all VMs in the VMware server; it is possible through GUI though.

 

Have a nice weekend

 

Fred

2 REPLIES 2

lmosla
Level 6

Hello Fredru,

First off I have to admit I don't use BEMCLI very often, but check out Russell Norton's comments at the following link and see if they are helpful:  https://www-secure.symantec.com/connect/forums/bemcli

Fredru
Level 3

Hi,

Thanks for the information, unfortunate I were not able to solve it based on the link. I have on the other hand created a workaround that can be used.

After creating the scripts, it is possible to import backup jobs to computers that show up in the Get-BEAgentServer cmdlet. It does not include the selection details, so if some drives (like D) is excluded, this has to be changed after the import.

For backup jobs that backup VMware ESXi servers it is a different story as they don't show up in the Get-BEAgentServer cmdlet.

1) First create a backup definition for the VMware server in GUI, the storage device and retention policy for the Full backup job will have to be set correctly. The incremental job should be removed from the backup definition.

2) Modify the script to take backup definition as the input instead of AgentServer.

Change

 [BackupExec.Management.CLI.BEAgentServer]
    $AgentServer,

With

[BackupExec.Management.CLI.BEBackupDefinition]
    $BackupDefinition,

3)

Change

New-BEBackupDefinition -BackupJobDefault BackupToDisk -WithInitialFullBackupOnly @backupDefinitionParameters

To

Set-BEBackupDefinition @backupDefinitionParameters

4)

Change

$backupTaskParameters =`

To

$backupTaskParameters = $PSBoundParameters
$backupTaskParameters +=`

In all locations.

5) There will be necessary to change the script flow since the "ForEach-object" can fail after New-BackupDefinition is change dto Set-BEBackupDefinition.

6) Now it is possible to run the script with the command.  

$bdef =  Get-BEBackupDefinition -Name "servername*"
.\Script.ps1 -BackupDefinition $bdef | Save-BEBackupDefinition

This is fairly cumbersome and will in most cases not be worth the effort, but since I needed consistent results regardless of who performs the configuration it is worth it.

Still hoping for an improved version

Fred