I’m trying to use the CLI to create a job that will backup multiple folders, but I think I need help with the syntax!
I have these folders:
C:\Program Files\CloudBerryLab\CloudBerry Backup>dir c:\folder_*
Volume in drive C has no label.
Volume Serial Number is 6074-F932
Directory of c:\
06/01/2022 10:45 <DIR> folder_1
06/01/2022 10:41 <DIR> folder_2
I can create a job for each folder individually:
C:\Program Files\CloudBerryLab\CloudBerry Backup>cbb addBackupPlan -a "tst-local" -n "tst-local-1" -d "c:\folder_1"
CloudBerry Backup Desktop Edition Command Line Interface started
Backup plan is created.
C:\Program Files\CloudBerryLab\CloudBerry Backup>cbb addBackupPlan -a "tst-local" -n "tst-local-2" -d "c:\folder_2"
CloudBerry Backup Desktop Edition Command Line Interface started
Backup plan is created.
How do I create a job for both folders? Just separating the paths with a semi-colon doesn’t work:
C:\Program Files\CloudBerryLab\CloudBerry Backup>cbb addBackupPlan -a "tst-local" -n "tst-local-3" -d "c:\folder_1"; "c:\folder_2"
CloudBerry Backup Desktop Edition Command Line Interface started
Backup plan is created.
To clarify my example above, I pasted the wrong one, but I’ve tried:
Both paths separated by a semi-colon within one set of quotes - fails because it says the path doesn’t exist:
C:\Program Files\CloudBerryLab\CloudBerry Backup>cbb addBackupPlan -a "tst-local" -n "tst-local-3" -d "c:\folder_1; c:\folder_2"
CloudBerry Backup Desktop Edition Command Line Interface started
WARNING: Cannot add file or folder 'c:\folder_1; c:\folder_2'. Path doesn't exist
Backup plan is created.
A separate set of quotes for each path (the example in my first post). It does create a plan, but only with the first path:
C:\Program Files\CloudBerryLab\CloudBerry Backup>cbb addBackupPlan -a "tst-local" -n "tst-local-3" -d "c:\folder_1"; "c:\folder_2"
CloudBerry Backup Desktop Edition Command Line Interface started
Backup plan is created.
C:\Program Files\CloudBerryLab\CloudBerry Backup>cbb getPlanDetails -n "tst-local-3"
CloudBerry Backup Desktop Edition Command Line Interface started
Name: tst-local-3
ID: 40c30766-d768-4d40-8826-44f5100aaf11
Connection: tst-local (4c81fb52-a3c8-478e-a827-0779bf461623) (ID= 4c81fb52-a3c8-478e-a827-0779bf461623)
Simple backup mode: False
Force using VSS: True
Use system VSS provider: False
Use fast NTFS scan: True
Use block-level backup: False
Backup items:
C:\folder_1
Backup filter type: All
Back up system and hidden files: False
Compress files: True
Use encryption: False
Storage class: STANDARD
Backup schedule: False
Backup force full schedule: False
Notification options
SendNotification: No
Windows Event log options
Add entry to &Windows Event Log when plan completes: No
[reply=“P72endragon;8948”] Please refer to the online help. Youll find examples that should help. If not, let us know. https://help.msp360.com/cloudberry-backup/command-line-interface/backup-restore-plans/managing-file-backups
I was looking at that, but cant see any examples of backing up multiple directories. It says the -iem and -efm parameters take multiple values separated by a semi-colon, but as I say, I havent found how to do similar for -d
[reply=“P72endragon;8950”] Have you tried adding multiple -d parameters?
Ah, ok, yes, that looks to work, thanks