Normally you will have several backup definition files, each defining an own purpose.
The settings for the DataBackup command have to follow the section with the name [GENERAL] or [BACKUPSET] where there must be one [GENERAL] and can be multiple [BACKUPSET] sections in a file.
The file format is OPTION=VALUE
Between the OPTION, the = and the VALUE are no spaces.
You can comment out any OPTION or completely remove the related setting line to use the default settings.
Values can be spread over multiple lines when the last character is a circumflex ( ^ ) or a whitespace ( [space] or [tab] combination ) followed by a backslash ( \ ).
Examples:
SOURCE_DIRECTORIES= \ Favorites \ Links Desktop \ OneDrive \ AppData\Roaming
or:
SOURCE_DIRECTORIES= \ Favorites \ Links Desktop \ OneDrive \ AppData\Roaming
or:
SOURCE_DIRECTORIES= ^ Favorites ^ Links Desktop ^ OneDrive^ AppData\Roaming
or:
SOURCE_DIRECTORIES= ^ Favorites ^ Links Desktop ^ OneDrive ^ AppData\Roaming
what would be equal to:
SOURCE_DIRECTORIES=Favorites Links Desktop OneDrive AppData\Roaming
All settings (except DEBUG) made in the DataBackup.cfg file can be redefined in this file.
Description of the options ABSOLUTELINKS, BACKUPMODE, BACKUPSTARTLAG, BROWSERBIN, BROWSEROPT, CODEPAGE, COLORS, DRIVERETRIES, ENABLECOMPAIR, ENABLEFINISHSOUND, ENABLELOGSMOOTHING, ENABLEREPORT, ENABLEREPORTHISTORY, ENABLEREPORTLOAD, ENABLESHUTDOWN, FINISHSOUND, FORCEPORTABLE, LISTDIRS, LOWSPACE, MESSAGEBOXES, MESSAGEDISPLAYDURATION, NOEXECUTE, NOSLEEP, NOTIFICATION, OPACITY, REPORTHTML, REPORTCSS, REPORTJS, RETRIES , SHUTDOWNDELAY , and STATSSAMPLES see databackup.cfg(4).
When defining any of those options in this section, the settings here have preference over the ones made in the DataBackup.cfg file.
Example: DESCRIPTION=Data backup to MAXTOR external disk
Default: DESCRIPTION=BACKUP 'DataBackup.MAXTOR.cfg' on 'ACME'
Example: DESTINATION_DRIVE=e
Default: DESTINATION_DRIVE=
DataBackup searches for that directory on all existing drives on the system, beginning with the destination drive letter specified in DESTINATION_DRIVE.
When using a DESTINATION_DRIVENAME the backup will also be able to run if an external drive later appears with a different drive letter.
Example: DESTINATION_DRIVENAME=_MAXTOR_
Default: DESTINATION_DRIVENAME=
Example: DESTINATION_BASEDIR=dat\backup
Default: DESTINATION_BASEDIR=
The prepare script has to reside in the var/exec/ directory.
Example: PREPARE=RECONNECT_BACKUPDRIVE
Default: PREPARE=
The pre-exec script has to reside in the var/exec/ directory.
Example: PREEXEC=OUTLOOK-STOP
Default: PREEXEC=
Example: PREEXEC_OPTIONS=force
Default: PREEXEC_OPTIONS=
The post-exec script has to reside in the var/exec/ directory.
Example: POSTEXEC=OUTLOOK-START
Default: POSTEXEC=
Example: POSTEXEC_OPTIONS=force
Default: POSTEXEC_OPTIONS=
See also the AUTOSHUTDOWN setting.
Example: INTERACTIVE=False
Default: INTERACTIVE=True
When AUTOSHUTDOWN is set to True the system is automatically shut down after the backup completion without user interaction.
See also the INTERACTIVE setting.
Example: AUTOSHUTDOWN=True
Default: AUTOSHUTDOWN=False
Description of the options ENABLECOMPAIR, LISTDIRS, NOEXECUTE and RETRIES see databackup.cfg(4).
When defining any of those options in this section, the settings here have preference over the ones made in the DataBackup.cfg file or in the [GENERAL] section.
Example: DESCRIPTION=Save data of user home
Default: DESCRIPTION=BACKUPSET #1
Example: SOURCE_DRIVE=h
Default: SOURCE_DRIVE=
DataBackup searches for that directory on all existing drives on the system, beginning with the source drive letter specified in SOURCE_DRIVE.
When using a SOURCE_DRIVENAME the backup will also be able to run if an external drive later appears with a different drive letter.
Example: SOURCE_DRIVENAME=_ACME_
Default: SOURCE_DRIVENAME=
Example: SOURCE_BASEDIR=Users\%USERNAME%
Default: SOURCE_BASEDIR=
When specifying directory names having spaces, surround the directory name with double quotes (").
The directories can also be specified using wild-card characters. Therefore when specifying for example: data* , all directories starting with 'data' will be backuped.
Even if a directory is listed more then once in the SOURCE_DIRECTORIES setting, it will be backed up only once.
The backup overview output will display the directories that are currently resolved from the wild-card characters and/or are specified without wild-cards and exist on the system.
Be aware, that files cannot be specified in the SOURCE_DIRECTORIES setting.
Example: SOURCE_DIRECTORIES=manuals documents programs "old files"
Default: SOURCE_DIRECTORIES=
If you need to specify absolute path names including the drive letter, use the %SOURCE_DRIVE% variable to do so.
Example: EXCLUDE_FILES=~*.* *.*~ *~ *.wbk *.lock *.tmp *.swp .DS_Store Thumbs.db desktop.ini _viminfo "*.lock file"
Default: EXCLUDE_FILES=
If you need to specify absolute path names including the drive letter, use the %SOURCE_DRIVE% variable to do so.
Example: EXCLUDE_DIRS=_old %SOURCE_DRIVE%:\varia\temp "%SOURCE_DRIVE%:\varia\scratch files"
Default: EXCLUDE_DIRS=
Example: DEACTIVATED=True
Default: DEACTIVATED=False
The following environment variables can be used in the backup definition files DataBackup.BACKUPNAME.cfg and the program configuration file DataBackup.cfg:
To review the contents of environment variables run cmd.exe and enter the set command.
The following time and date related variables can also be used in the backup definition files DataBackup.BACKUPNAME.cfg and the program configuration file DataBackup.cfg:
(The date used in the examples is February 26th, 1986 14:59:31)
In the EXCLUDE_FILES and EXCLUDE_DIRS settings the following variable can be used in addition:
Using this configuration file the data is backuped to an external disk with the name _MAXTOR_.
On subsequent runs additional and/or changed files are copied to the target disk and files removed from the source are also removed from the destination (incremental backup).
This configuration is intended to be run regularly (e.g.: once all couple of days) to prevent data loss when your computer crashes or you deleted or changed data unintentionally.
# # DataBackup.MAXTOR.cfg - Backup specifications for DataBackup # # [00] 06.03.2016 CWa Initial Version # [GENERAL] BACKUPMODE=BACKUP DESCRIPTION=Weekly data backup (INCREMENTAL) to MAXTOR external disk DESTINATION_DRIVE=e DESTINATION_DRIVENAME=_MAXTOR_ DESTINATION_BASEDIR=dat\backup FINISHSOUND=Mac Gyver [BACKUPSET] DESCRIPTION=Save data of user home SOURCE_DRIVE=h SOURCE_DRIVENAME= SOURCE_BASEDIR= SOURCE_DIRECTORIES=manuals documents varia programs [BACKUPSET] DESCRIPTION=Save data of c:\Users\%USERNAME% SOURCE_DRIVE=c SOURCE_DRIVENAME= SOURCE_BASEDIR=Users\%USERNAME% SOURCE_DIRECTORIES=Favorites Links Desktop OneDrive AppData\Roaming\Microsoft\Windows
Using this configuration file the data is backuped to an external disk with the name _WD_.
On subsequent runs on different days *all* files are copied to the target (=full backup) because the target directory is automatically set to the current date using the %TODAY% variable: dat\backup\%TODAY% what would result in dat\backup\20160401 when started on April 1st 2016 and to dat\backup\20160528 on May 28th 2016.
This configuration is intended to be started on a lower frequency (e.g.: once every month) to prevent data loss when you unintentionally deleted data on your computer and then ran a backup (as defined in example 1).
This method would enable you to recover deleted data from this full backups.
# # DataBackup.WD.cfg - Backup specifications for DataBackup # # [00] 23.03.2016 CWa Initial Version # [GENERAL] BACKUPMODE=BACKUP DESCRIPTION=Bi-monthly data save (FULL) to Western Digital external disk DESTINATION_DRIVE=f DESTINATION_DRIVENAME=_WD_ DESTINATION_BASEDIR=dat\backup\%TODAY% FINISHSOUND=Knight Rider [BACKUPSET] DESCRIPTION=Save data of user home SOURCE_DRIVE=h SOURCE_DRIVENAME= SOURCE_BASEDIR= SOURCE_DIRECTORIES=manuals documents varia programs [BACKUPSET] DESCRIPTION=Save data of c:\Users\%USERNAME% SOURCE_DRIVE=c SOURCE_DRIVENAME= SOURCE_BASEDIR=Users\%USERNAME% SOURCE_DIRECTORIES=Favorites Links Desktop OneDrive AppData\Roaming\Microsoft\Windows
In this example the 3-generation backup is realized using three external disks and three backup definition files.
__ Computer __ __ ExternalDisk 1 ___ | | | | | c: h: |--- weekly -->| DRIVENAME _MAXTOR_ | | | | dat\backup | |______________| |_____________________| : : DataBackup.MAXTOR.cfg : : : : : : __ ExternalDisk 2 ___ : : | | : `---- 2 monthly -->| DRIVENAME _WD_ | : | dat\backup\%TODAY% | : |_____________________| : DataBackup.WD.cfg : : : __ ExternalDisk 3 ___ : | | `------- 1/2 yearly -->| DRIVENAME _FREECOM_ | | dat\backup\%TODAY% | |_____________________| DataBackup.FREECOM.cfg
The computer data is backed up weekly to the
external disk 1.
For the external disk 1 the backup configuration as shown
in example 1) can be used:
[GENERAL] DESCRIPTION=Weekly data backup (INCREMENTAL) to MAXTOR external disk DESTINATION_DRIVENAME=_MAXTOR_ DESTINATION_BASEDIR=dat\backup : :
Every 2nd month the computer data is backed up to the
external disk 2.
For the external disk 2 the backup configuration as shown
in example 2) can be used.
Be aware that each run of this backup will copy all data to the DESTINATION_BASEDIR and that there is no automatic data cleanup performed. Therefore you have to delete old data backups manually from time to time to clear space to make room for new data backups.
[GENERAL] DESCRIPTION=Bi-monthly data save (FULL) to Western Digital external disk DESTINATION_DRIVENAME=_WD_ DESTINATION_BASEDIR=dat\backup\%TODAY% : :
Two times a year the computer data is backed up to the
external disk 3.
For the external disk 3 the backup configuration as shown
in example 2) with the modified
DESTINATION_DRIVE
setting can be used.
Be aware that each run of this backup will copy all data to the DESTINATION_BASEDIR and that there is no automatic data cleanup performed. Therefore you have to delete old data backups manually from time to time to clear space to make room for new data backups.
[GENERAL] DESCRIPTION=Semestral data save (FULL) to FREECOM external disk DESTINATION_DRIVENAME=_FREECOM_ DESTINATION_BASEDIR=dat\backup\%TODAY% : :
This is free software; see WA2LSimpleBackup/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.