cancel
Showing results for 
Search instead for 
Did you mean: 

How to create multiple path backupjob using BEMCLI

volveive
Level 2

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

pkh
Moderator
Moderator
   VIP    Certified

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.

View solution in original post

3 REPLIES 3

pkh
Moderator
Moderator
   VIP    Certified

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
Level 2

Thanks pkh,

I could create the backupjob what I want!

I really appreciated your help.

volveive
Level 2

FYI

 

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.