 |
Personal Backup Version 5.2 |
| © 2012, J. Rathlev, IEAP, Kiel University |
Having started the program via a desktop shortcut or having invoked it from another program
(e.g. Windows Task Scheduler), you can
control it by setting the following command line options:
- none:
- The program will start with its normal desktop
window.
- @[OptionFile]
- The command line options are loaded from the control file [OptionFile]
(see below).
If [OptionFile] does not contain a full path, it must be in the
installation path of the program.
-
- [TaskFile]:
- The user will be prompted for the designated operation for the backup task
[TaskFile]:
- Edit the task: Load task and show configuration
- Start backup: Immediately start the backup (as with /force)
- Cancel: No further action
The file [TaskFile] may contain a path or a placeholder.
If the full path is not specified, the file will be searched for in the default task directory.
-
- /auto:
- Starts automatic backup.
When you have selected one of the automatic backup options, a shortcut
using this option is inserted by the program into your Windows Startup
folder accessible via the Start menu.
-
- #[n] /force:
- Immediately starts all (# /force) or one (e.g. #1 /force, task no. 1)
of those tasks configured for automatic backup.
-
- [Filelist] /force:
- Starts a backup of all tasks specified in the filelist (with filenames
separated by a space). The filenames may contain a placeholder.
The default extension (buj) is appended automatically.
The option "[Filelist] /force" is very useful in connection
with Windows Task Scheduler, in that it is possible to execute several backup tasks
at preset times.
Example: PersBackup.exe C:\Backup\BackupA.buj C:\Backup\BackupB.buj /force
-
- [Filelist] /restore:
- The Restore tasks specified in [Filelist] (with filenames separated by
a space, e.g. Rest-1 Rest-2) will be started. The filenames may contain a
placeholder. The default file extension (rsj)
is appended automatically. Prior to this, you must have configured and saved the
Restore tasks (see Restore data from backup).
-
- [Filelist] /clean:
- The Cleanup tasks specified in [Filelist] (with filenames separated
by a space, e.g. Clean-1 Clean-2) will be started. The filenames may contain a
placeholder. The default file extension (cuj)
is appended automatically. Prior to this, you must have configured and saved
the Cleanup tasks (see Clean up the backup directory).
-
- /gap:[Value]
- Value specifies a time slot for the files to be backed up:
- yyyymmdd
- All files changed on the specified date will be backed up
(e.g. /gap:2011521 = 21 May 2011).
- yyyymmdd-yyyymmdd
- All files changed between the specified dates will be backed up
(e.g. /gap:20100521-20110315 = 21 May 2010 00:00 - 15 March 2011 24:00).
- +yyyymmdd
- All files changed after the specified date will be backed up
(e.g. /gap:+20110521 = after 21 May 2011 00:00).
- -yyyymmdd
- All files changed before the specified date will be backed up
(e.g. /gap:-20110521 = before 21 May 2011 24:00).
- thhnn
- All files changed after the specified time on the current day will be backed up
(e.g. /gap:t0835 = today after 08:35).
- dx
- All files changed within the last x days will be backed up
(e.g. /gap:d14 = within last 14 days).
- q
- When the backup starts, a dialog window will be displayed in which an
individual time slot (e.g. /gap:q) can be set.
- Note:
yyyy = year, mm = month, dd = day,
hh = hours, nn = minutes, x = number of days
-
- /showlog
- Display the program log file.
-
- /end:[Option]:
- Defines which action is to be carried out after Backup, Restore or Cleanup (see
above):
- poweroff
- Starts a backup and, on completion, shuts Windows down and switches off the computer.
If you often wish to carry out a backup before shutting down your
computer, create a shortcut on your desktop using this command line
option. To back up and shut down, double-click this shortcut.
- shutdown
- This option was needed for Windows 98 and is now obsolete.
Use the option poweroff with all newer Windows systems.
- logoff
- This option is similar to /poweroff, but just logs the current
user off once the backup is completed.
- restart
- The system shuts down and performs a restart.
- Note: You can omit /force in connection with /end:[Option].
-
- /suspend:[Option]
- Puts the system into suspension after Backup, Restore or Cleanup (see above):
- standby
- The system is put into standby mode: data remains in RAM but
is not saved. In this mode, system wakeup is quick, but data will be
lost on power failure.
- hibernate
- The system is put into hibernate mode: RAM data is saved to disk. In
this mode, system wakeup takes longer, but no data will be lost on
power failure.
- Note: A requirement for a password on wakeup can be set via
Power Options in Control Panel.
-
- /prompt:[Option]
- Defines how dialog and status windows are displayed during backup. The settings
are similar to those for automatic backups.
- wait
- Wait for user prompt.
- delay
- Close status window after a short delay.
- quiet
- Display no progress or status windows (see quiet).
- error
- User prompt will be required on errors. Otherwise the window will be
closed after a delay.
-
- /quiet
- Starts the backup as a background task. No progress window
is displayed. To inform you that a backup task is running, an animated
icon appears in the notification area. You can click this icon to check
progress.
-
- /hide
- Suppress the splash screen on startup.
-
- /speed:[Option]
- Defines the priority of the backup process with respect to other applications.
- fast
- Backup is carried out using a higher priority than normal.
- slow
- Backup is carried out using a lower priority than normal.
-
- /user:[Name]:[Password]
- If using a backup destination on a network drive that requires a different
user account, you can specify the name and password of this user.
-
- /ini:[Filename]
- The user configuration (e.g. the settings for automatic backups) are saved
in the file PersBackup.ini. This file is located by default in the
directory %userprofile%\Application Data\PersBackup. Using this option
you can select an alternative configuration file at any other location
(e.g. E:\MyBackupConfiguration\Backup-1.ini).
The log file is located in the same directory (using the above example:
E:\MyBackupConfiguration\Backup-1.log). The filename may contain a
placeholder.
-
- /taskdir:[Directory]
- Directory specifies a special path to the task files.
This replaces the default path in My Documents. When starting the program
from a USB stick, for example, you should use this option
together with /ini:.. to save the task files by default on the stick.
The filename may contain a placeholder.
Example:
persbackup.exe /i:%progpath%\pb5-1.ini /t:%progpath%
-
- /zipname:[Name]
- When backing up into zip files, Name is used for the zip files
instead of the name defined in the task.
-
- /backupdir:[Directory]
- If Directory is a full path (e.g. G:\Backup), it will be
used instead of the destination path defined in the task.
If it is a relative path (e.g. Test\Diff), an additional
subdirectory will be created beneath the destination folder defined in the task,
hence it is possible to configure backup schedules using
Windows Task Scheduler. This option is used by the program addon
PbPlaner.
-
- /mode:[full|diff|incr]
- This option overrides the settings of the specified backup task and carries
out a full, differential or incremental backup within a backup schedule.
-
- /lang:[xx]
- Select the language (currently English or German). The command line
option overrides the setting under program preferences.
| xx = de |
German |
| xx = en |
English |
-
- /log:[n]
- This setting overrides the log file settings from the task.
The value [n] specifies the log type:
| 0 |
No log |
| 1 |
Short log |
| 2 |
Long log |
| 3 |
Extended log (for debugging purposes) |
-
- /wait:[n]
- When a backup has been completed, a status window is
displayed for a short, preset time (see Menu ⇒ Options ⇒
View). With this option, the preset time can be set also in the command line (e.g.
with tasks to be carried out immediately, using /force). The value of [n] is entered in
seconds, with the value 0 meaning that the status window must be closed by the user.
-
- /disable
- No entry is created in the Windows Startup folder accessible via the Start menu.
-
- /narrow
- The program will start in a narrow window without the toolbar (left) and without options
for automatic backup (right). This is useful if for service purposes only
a reduced screen resolution is available. You can switch to the normal window
using the menu command Options ⇒ View.
All options can be abbreviated: e.g. /force = /f = /for
Examples:
1. Start backup task (Filename: B-Task1.buj):
Command line: %ProgramFiles%\Persbackup.exe B-Task1 /force
2. Start backup task and shut down: (Filename: B-Task2.buj):
Command line: %ProgramFiles%\Persbackup.exe B-Task2 /end:poweroff
3. Start cleanup task (Filename: L-Task.cuj):
Command line: %ProgramFiles%\Persbackup.exe L-Task /clean
Placeholders for paths
You can use the following placeholders in the command line (all paths refer to Windows 7):
- %perspath%: Path to the folder My Documents (C:\Users\<Name>\Documents)
- %apppath%: Path to Application Data (C:\Users\<Name>\AppData\Roaming)
- %profile%: Path to User Profile (C:\Users\<Name>)
- %user%: Name of the logged-in User
- %computer%: Name of the Computer
- %desktop%: Path to the Desktop folder(C:\Users\<Name>\Desktop)
- %favorites%: Path to the Favorites folder (C:\Users\<Name>\Favorites)
- %progfiles%: Path to the Progam folder C:\Program Files
- %progpath%: Path to the Installation folder of Personal Backup
(default: C:\Program Files\Personal Backup 5).
Examples:
- for Ini-File in C:\Program Files\Personal Backup 5:
- Command line: %ProgramFiles%\Persbackup.exe /i:%progpath%\pb.ini
- for task in C:\Users\<Name>\Documents\PersBackup:
- Command line: %ProgramFiles%\Persbackup.exe /i:%perspath%\PersBackup\backup-1
Note:
When using placeholders in a batch file the "%" characters must be duplicated
(e.g. .. /i:%%progpath%%\pb.ini
Control file:
You can write all options line by line to a file instead of to the command line itself:
each line must contain one option or filename. All text behind a semicolon is handled
as comment. Do not use quotation marks on paths containing spaces.
Example: (referring to Windows 7)
/ini:C:\Program Files\Personal Backup 5\pb5-1.ini
/log:2 ;create long log
/wait:1
/hide
/quiet
/force
; Backup tasks:
C:\Program Files\Personal Backup 5\backup-1.buj
Starting Personal Backup using the command line with one of the options
/force, /restore or /clean will deliver an ExitCode
to the calling application on termination. In a batch file this can be retrieved using the
variable ErrorLevel. The following values are used:
| |
0 |
No error |
| |
1 |
Task file not found |
| |
2 |
Destination not accessible |
| |
3 |
Source directory not found |
| |
4 |
Other error (e.g. error on copying files) |
| |
5 |
Canceled by user |
J. Rathlev, Kiel, Germany, July 2011