Problem
Export Backup Definitions with BEMCLI.
Solution
Export a single backup definition:
Get-BEBackupDefinition –name <definition name> | Export-BEBackupDefinition > c:\<somename>.ps1
To export all definitions to a separate ps1 file:
$jobs = Get-BEBackupDefinition
foreach ($job in $jobs)
{
$defname = $job.name
$job | Export-BEBackupDefinition > c:\$defname.ps1
}
Import the backup definition:
& '<exported-bebackupdefinition.ps1>' -AgentServer (Get-BEAgentServer "<agent server name>") | save-BEBackupdefinition
NOTES: Selection list are not exported and will need to be modified after import if needed. By default everything will be selected on the Selections.
This script is an example and is provided AS-IS. May require modification