Since version 5 of Backup4all, all actions are executed in command line. The interface is also available and it communicates with the commend line process, so you can see the progress in interface. The difference is that now there is an individual command line application for each action: backup, restore, test and cleanup.
On this page:
- Command line for Backup
- Command line for Test
- Command line for Repair
- Command line for Restore
- Command line for Cleanup
Command line for Backup
####Backup jobs
Syntax
bBackup [{/f|/d|/i|/r}] job_name [/e|/c] [-Priority{1|2|3|4}]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
Command line backup can have as parameters an ".ini" file (with its full path), a ".bkc" file (with its full path) or the name of the backup job. The ".ini" or ".bkc" file must exist in the specified path, the backup job must be defined in Backup4all or otherwise the backup will not run.
Switches that apply to this parameter (case insensitive, preceded by "/" or "-"):
/f
- force the execution of a full backup/d
- force the execution of a differential backup/i
- force the execution of an incremental backup/r
- execute the backup with its defined type (this is the default behavior when the backup name is specified without switches)/e
- erase the disc(Floppy/CD/DVD/Blu-ray) before backup/c
- deletes the .bkc file and all zip files associated with the named backup job
If the backup job to be executed has the backup type set to Mirror, then a mirror backup will be performed and the "/f", "/d", "/i" switches will be ignored even if they are set.
Example
To execute a backup for My Pictures job, with the default backup type, use:
bBackup /r "My Pictures" -Priority 2
####Backup tags
Syntax
bTagBackup tag_name [-Priority{1|2|3|4}]
Example
To execute all backup jobs from the Samples tag, use:
bTagBackup Samples -Priority 2
Backup4all returns exit codes after each task execution (backup, independent test or cleanup).
As a general case, if the backup was successful, the exit code is 0, otherwise is different.
Here are the possible exit codes:
- 0 : action was successful
- 1 : action has not started, parameter errors, syntax errors, other errors
- 2 : action finished with errors
- 3 : action was finished with warnings
- 4 : independent test was finished with errors
- 5 : independent test was finished with warnings
Command line for Test
####Test jobs
Syntax
bTest [/t] job_name [-Priority{1|2|3|4}]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
/t
- tests the named backup job. Supports also an additional parameter [/TN 1,2,5..20|*|#]
- if no TN is set then it will test all backup jobs same as using *
; if #
is used it will test only the last backup job (#
can be used in the same time with other numbers too).For the priority level you can select a value between 1-4, as 1 is the lowest priority and 4 is the highest priority.
Example
To execute a test for all backup numbers of the My Pictures backup job
bTest /t "My Pictures" /tn * -Priority 2
To execute a test for first two and last backup number of the My Pictures backup job
bTest /t "My Pictures" /tn 1,2,# -Priority 2
####Test tags
Syntax
bTagTest tag_name [/TN 1,2,5...20|*|#] [-Priority{1|2|3|4}]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
/TN 1,2,5...20|*|#
- if no TN
is set then it will test all backup jobs same as using *
; if #
is used it will test only the last backup job (#
can be used in the same time with other numbers too).For the priority level you can select a value between 1-4, as 1 is the lowest priority and 4 is the highest priority.
Example
To execute all backup jobs from the Samples tag, use:
bTagBackup Samples -Priority 2
Backup4all returns exit codes after each task execution (backup, independent test or cleanup).
As a general case, if the backup was successful, the exit code is 0, otherwise is different.
Here are the possible exit codes:
- 0 : action was successful
- 1 : action has not started, parameter errors, syntax errors, other errors
- 2 : action finished with errors
- 3 : action was finished with warnings
- 4 : independent test was finished with errors
- 5 : independent test was finished with warnings
Command line for Repair
The command line parameters for repair action are described bellow. The repair action is composed by a test action followed (or not - it depends if you want to repair only the catalog) by a backup action.
####Repair jobs
Syntax
bTest [[/T] job_name /RP /RPWB] [-Priority[{1|2|3|4}]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
/t
- tests the named backup job to find the problems in backup./RP
- repairs the backup catalog only. All files and folders in backup execution will be tested. Those not found in destination will be also removed from the backup catalog so they will be backed up on the next backup execution./RPWB
- repairs the backup in destination. All files and folders added in the last backup execution will be tested. Those not found in destination will be backed up again in order to reflect the backup catalog.If only the catalog needs to be repaired, use only the /RP switch.
For the priority level you can select a value between 1-4, as 1 is the lowest priority and 4 is the highest priority.
Example
To execute a repair for My Pictures backup job
bTest /t "My Pictures" /RP /RPWB -Priority 2
To execute only a catalog repair for My Pictures backup job
bTest /t "My Pictures" /RP -Priority 2
####Repair tags
Syntax
bTagTest tag_name [/RP /RPWB] [-Priority{1|2|3|4}]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
/RP
- execute the repair for the backup catalogs only. All files and folders added in the last backup execution will be tested. Those not found in destination will be also removed from the backup catalog so they will be backed up on the next backup execution./RPWB
- execute the repair for the backups in destination. All files and folders added in the last backup execution will be tested. Those not found in destination will be backed up again in order to reflect the backup catalog.For the priority level you can select a value between 1-4, as 1 is the lowest priority and 4 is the highest priority.
Example
To execute a repair for Samples tag
bTagTest "Samples" /RP /RPWB -Priority 2
To execute a repair for Projects tag, only the backup catalogs:
bTagTest "Projects" /RP -Priority 2
Backup4all returns exit codes after each task execution (backup, independent test or cleanup).
As a general case, if the backup was successful, the exit code is 0, otherwise is different.
Here are the possible exit codes:
- 0 : action was successful
- 1 : action has not started, parameter errors, syntax errors, other errors
- 2 : action finished with errors
- 3 : action was finished with warnings
- 4 : independent test was finished with errors
- 5 : independent test was finished with warnings
Command line for Restore
####Restore jobs
Syntax
bRestore [/RE] job_name [/DEST path] [/NDL] [/DATE] [/RNC] [/RDE] [-Priority[{1|2|3|4}]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
/RE
- execute the restore for the named backup job/DEST
- execute the restore into the specified destination. You also need to enter the path forrestore.
/NDL
- execute the restore without creating the drive letter folder/DATE
- execute the restore of all files as of a specified date/RNC
- execute the restore of the specified backup numbers/RDE
- execute the restore including excluded and deleted filesFor the priority level you can select a value between 1-4, as 1 is the lowest priority and 4 is the highest priority.
Example
To execute a restore for My Pictures backup job
bRestore /RE "My Pictures" -Priority 2
To execute a restore for My Pictures backup job to another destination as of a specified date
bRestore /RE "My Pictures" /DEST "C:\Restore" /DATE 12.30.2011 -Priority 2
####Restore tags
Syntax
bTagRestore [/RE] tag_name [/DEST path] [/NDL] [-Priority[{1|2|3|4}] }]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
/RE
- execute the restore for the named backup tag/DEST
- execute the restore into the specified destination. You also need to enter the path forrestore.
/NDL
- execute the restore without creating the drive letter folderFor the priority level you can select a value between 1-4, as 1 is the lowest priority and 4 is the highest priority.
Example
To execute a restore for Samples tag in original location:
bTagRestore /RE "Samples" -Priority 2
To execute a restore for Documents backup tag to another destination without creating drive letter:
bRestore /RE "Documents" /NDL /DEST "C:\Restore" -Priority 2
Backup4all returns exit codes after each task execution (backup, independent test or cleanup).
As a general case, if the backup was successful, the exit code is 0, otherwise is different.
Here are the possible exit codes:
- 0 : action was successful
- 1 : action has not started, parameter errors, syntax errors, other errors
- 2 : action finished with errors
- 3 : action was finished with warnings
- 4 : independent test was finished with errors
- 5 : independent test was finished with warnings
Command line for Cleanup
####Restore jobs
Syntax
bCleanup [/X] job_name [-Priority[{1|2|3|4}]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
/x
- cleans the backup. Supports additional parameters:[/IE mm.dd.yyyy]
- clean the backups older than the specified date[/IS mm.dd.yyyy]
- clean the backups newer then the specified date[/OT n /OTU {D|W|M|Y}]
- n is the number of days (D), weeks (W), months (M) or years (Y)[/KD]
- keep Differential backups[/KF]
- keep Full backupsFor the priority level you can select a value between 1-4, as 1 is the lowest priority and 4 is the highest priority.
Example
To clean all backup versions older than two weeks and keep the full and differential backups of the My Pictures backup job, use:
bCleanup /X "My Pictures" /OT 2 /OTU W /KF / KD -Priority 2
####Cleanup tags
Syntax
bTagCleanup [/X] tag_name [-Priority[{1|2|3|4}]
Formatting legend
/ - Switches are preceded by slash
[] - Elements between square brackets are optional
| - Vertical line separates possible choices
{} - Items between braces are a set of choices from which the user must choose only one
Additional parameters can be used:
[/IE mm.dd.yyyy]
- clean the backups older than the specified date[/IS mm.dd.yyyy]
- clean the backups newer then the specified date[/OT n /OTU {D|W|M|Y}]
- n is the number of days (D), weeks (W), months (M) or years (Y)[/KD]
- keep Differential backups[/KF]
- keep Full backupsThe mirror backup jobs will be ignored when running a cleanup for a tag including mirror backup jobs.
For the priority level you can select a value between 1-4, as 1 is the lowest priority and 4 is the highest priority.
Example
To clean all backup versions older than two weeks and keep the full and differential backups of the Pictures tag, use:
bCleanup /X "Pictures" /OT 2 /OTU W /KF / KD -Priority 2
To execute a cleanup for Samples tag
bTagCleanup /X "Samples" /OT 2 /OTU W -Priority 2
Backup4all returns exit codes after each task execution (backup, independent test or cleanup).
As a general case, if the backup was successful, the exit code is 0, otherwise is different.
Here are the possible exit codes:
- 0 : action was successful
- 1 : action has not started, parameter errors, syntax errors, other errors
- 2 : action finished with errors
- 3 : action was finished with warnings
- 4 : independent test was finished with errors
- 5 : independent test was finished with warnings
Applies to
Backup4all 5.x - 8.x