09-15-2013 05:02 AM
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
Solved! Go to Solution.
09-24-2013 06:52 AM
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
09-15-2013 06:30 PM
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.
09-17-2013 06:43 AM
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
09-17-2013 07:34 AM
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
09-24-2013 06:52 AM
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