Export Backup Definitions with BEMCLI on BE 2012

Problem

Export Backup Definitions with BEMCLI on BE 2012

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 


Terms of use for this information are found in Legal Notices.

Search

Survey

Did this article answer your question or resolve your issue?

No
Yes

Did this article save you the trouble of contacting technical support?

No
Yes

How can we make this article more helpful?

Email Address (Optional)