Video Screencast Help

How to create multiple path backupjob using BEMCLI

Created: 14 May 2012 • Updated: 20 Nov 2012 | 3 comments
This issue has been solved. See solution.

In BE 2012, I want to create a backup job including multiple path using BEMCLI.

I tried the following steps.

BEMCLI>Get-BEBackupDefinition -Name "2K8R2 Backup00001"| Export-BEBackupDefinition > .\ExportedBackup01.ps1

BEMCLI>$p = New-BEFileSystemSelection -Path "D:\DataA\*"

BEMCLI>.\ExportedBackup01.ps1 2K8R2 -FileSystemSelection $p | Save-BEBackupDefinition

At that job, I want to specify the multiple path like "D:\DataA\*;D:\DataB\*" instead of "D:\DataA\*", but it doesn't work.
How to create multiple path job?
Thank you.

Comments 3 CommentsJump to latest comment

pkh's picture

To quote the help for the filesystemselection parameter of the Set-BEBackupDefinition Cmdlet

To specify files or directories to include, specify one or more paths using commas to separate the values.

volveive's picture

Thanks pkh,

I could create the backupjob what I want!

I really appreciated your help.

volveive's picture


I did the following way last time.

$p = New-BEFileSystemSelection -Path "D:\DataA\*"

.\ExportedBackup01.ps1 2K8R2 -FileSystemSelection $p |   Set-BEBackupDefinition -FileSytemSelection ”D:\DataB\*,D:\DataC\*” | Save-BEBackupDefinition

I found another way.

$p = @()

$p +=New-BEFileSystemSelection -Path "D:\DataA\*"

$p +=New-BEFileSystemSelection -Path "D:\DataB\*"

$p +=New-BEFileSystemSelection -Path "D:\DataB\*"

.\ExportedBackup01.ps1 2K8R2 -FileSystemSelection $p | Save-BEBackupDefinition
Both are same.