cancel
Showing results for 
Search instead for 
Did you mean: 

Export Backup Selection list via BEMCLI

CarolineKiel
Level 6
Partner    VIP    Accredited Certified

Hi,
Is there a chance, to export a (or all) backup selection lists via PowerShell in BE2012?

If I use "get-bejobs", I only get a summary like "<servername> (Partial), C: (Partial), D: (Partial)"

Thank you very much,
Oliver

Save the Earth, it's the only planet with chocolate.
1 ACCEPTED SOLUTION

Accepted Solutions

CarolineKiel
Level 6
Partner    VIP    Accredited Certified

Hi everyone,
I found out, that it is possible by simply querying the database directly:

SELECT t2.[JobName]
,t1.[DeviceSelectionName]
,t1.[PathName]
,t1.[FileName]
,t1.[OperType]
FROM [BEDB].[dbo].[vwScriptPropertiesBackup] t1,[BEDB].[dbo].[vwScriptJob] t2
WHERE t1.scriptname = t2.scriptname AND t1.ScriptID <> '10011001-1001-1001-0101-010101010101'
AND t1.ScriptID <> '10011002-1001-1001-0101-010101010101' AND t2.jobname <> 'NULL' AND t1.DeviceSelectionName <> 'NULL'

The results are filtered to drop the default exclusions that BE does automatically.

All the best from over here,
Oliver

Save the Earth, it's the only planet with chocolate.

View solution in original post

4 REPLIES 4

pkh
Moderator
Moderator
   VIP    Certified

Unfortunately, no.  I have not found a way to do so.  There is a switch in BEMCMD that does dump selection details, but BEMCLI has no equivalent function.

You might want to post this as an Idea.

w-d
Level 4
Employee Accredited Certified

I confirm that you cannot save the selections, however the backup definition can be exported.

Check this document:

Export Backup Definitions with BEMCLI on BE 2012
http://www.symantec.com/docs/TECH184683

Rahul_Kumar1
Level 6
Employee Accredited Certified

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  <agent server name> | save-BEBackupdefinition

CarolineKiel
Level 6
Partner    VIP    Accredited Certified

Hi everyone,
I found out, that it is possible by simply querying the database directly:

SELECT t2.[JobName]
,t1.[DeviceSelectionName]
,t1.[PathName]
,t1.[FileName]
,t1.[OperType]
FROM [BEDB].[dbo].[vwScriptPropertiesBackup] t1,[BEDB].[dbo].[vwScriptJob] t2
WHERE t1.scriptname = t2.scriptname AND t1.ScriptID <> '10011001-1001-1001-0101-010101010101'
AND t1.ScriptID <> '10011002-1001-1001-0101-010101010101' AND t2.jobname <> 'NULL' AND t1.DeviceSelectionName <> 'NULL'

The results are filtered to drop the default exclusions that BE does automatically.

All the best from over here,
Oliver

Save the Earth, it's the only planet with chocolate.