DataBackup.BKP.cfg

Package: WA2L/SimpleBackup 1.0.67
Section: Configuration Files (4)
Updated: 02 February 2022
Index Return to Main Contents

 

NAME

DataBackup.BKP.cfg - backup definition file for backups handled by DataBackup

 

SYNOPSIS

WA2LSimpleBackup/etc/DataBackup.BACKUPNAME.cfg

 

AVAILABILITY

WA2L/SimpleBackup

 

DESCRIPTION

This is the backup definition file for the DataBackup command.

Normally you will have several backup definition files, each defining an own purpose.

 

FILEFORMAT

Rows starting with a # are considered as comments.

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

 

OPTIONS

All settings (except DEBUG) made in the DataBackup.cfg file can be redefined in this file.

 

SECTION: [GENERAL]

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.

DESCRIPTION
text description of the backup.

Example: DESCRIPTION=Data backup to MAXTOR external disk

Default: DESCRIPTION=BACKUP 'DataBackup.MAXTOR.cfg' on 'ACME'

DESTINATION_DRIVE
destination drive letter where the external drive resists. The drive has to be specified without colon (:).

Example: DESTINATION_DRIVE=e

Default: DESTINATION_DRIVE=

DESTINATION_DRIVENAME
the destination drive name is a directory residing on the top level of the 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=

DESTINATION_BASEDIR
base directory on the destination drive where to copy the data to.

Example: DESTINATION_BASEDIR=dat\backup

Default: DESTINATION_BASEDIR=

PREPARE
*.cmd script that is started previous of resolving configured data drives. When specifying the prepare script, specify it without the .cmd suffix.

The prepare script has to reside in the var/exec/ directory.

Example: PREPARE=RECONNECT_BACKUPDRIVE

Default: PREPARE=

PREEXEC
*.cmd script that is started previous of starting of the data backup. When specifying the pre-exec script, specify it without the .cmd suffix.

The pre-exec script has to reside in the var/exec/ directory.

Example: PREEXEC=OUTLOOK-STOP

Default: PREEXEC=

PREEXEC_OPTIONS
command line options for the command specified in PREEXEC.

Example: PREEXEC_OPTIONS=force

Default: PREEXEC_OPTIONS=

POSTEXEC
*.cmd script that is started after completing the data backup. When specifying the post-exec script, specify it without the .cmd suffix.

The post-exec script has to reside in the var/exec/ directory.

Example: POSTEXEC=OUTLOOK-START

Default: POSTEXEC=

POSTEXEC_OPTIONS
command line options for the command specified in POSTEXEC.

Example: POSTEXEC_OPTIONS=force

Default: POSTEXEC_OPTIONS=

INTERACTIVE
When set to True the user is interactively prompted to start the backups. When set to False the backups are started without user intervention. This is needed when the DataBackup start is automatically scheduled.

See also the AUTOSHUTDOWN setting.

Example: INTERACTIVE=False

Default: INTERACTIVE=True

AUTOSHUTDOWN
This setting is only of relevance if the INTERACTIVE setting is set to False.

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

 

SECTION: [BACKUPSET]

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.

DESCRIPTION
text description of the backup set.

Example: DESCRIPTION=Save data of user home

Default: DESCRIPTION=BACKUPSET #1

SOURCE_DRIVE
source drive letter where the source drive resists. The drive has to be specified without colon (:).

Example: SOURCE_DRIVE=h

Default: SOURCE_DRIVE=

SOURCE_DRIVENAME
the source drive name is a directory residing on the top level of the 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=

SOURCE_BASEDIR
base directory on the source drive where to copy the data from.

Example: SOURCE_BASEDIR=Users\%USERNAME%

Default: SOURCE_BASEDIR=

SOURCE_DIRECTORIES
space separated list of directories to be saved from the source directory SOURCE_BASEDIR to the destination directory DESTINATION_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=

EXCLUDE_FILES
list of files to be excluded from the backup.

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=

EXCLUDE_DIRS
list of directories to be excluded from the backup.

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=

DEACTIVATED
when in a backup set DEACTIVATED is set to True the execution of that particular backup set is deactivated and is skipped completely.

Example: DEACTIVATED=True

Default: DEACTIVATED=False

 

VARIABLES

Note that the variables always are specified in upper case.

 

ENVIRONMENT VARIABLES

The following environment variables can be used in the backup definition files DataBackup.BACKUPNAME.cfg and the program configuration file DataBackup.cfg:

%COMPUTERNAME%
name of the computer where DataBackup is running.

%PROGRAMFILES%
system ProgramFiles directory.

%SYSTEMROOT%
system SystemRoot directory.

%USERNAME%
user name of the user that started DataBackup.

%USERDOMAIN%
domain name of the computer where DataBackup is running.

%TEMP%
temporary directory as set in the user profile of the user that started DataBackup.

%TMP%
temporary directory as set in the user profile of the user that started DataBackup.

To review the contents of environment variables run cmd.exe and enter the set command.

 

TIME AND DATE VARIABLES

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)

%TIMER%
number of seconds since January 1st 1970. This counter is also known as the seconds since the epoch on Unix (e.g.: 509810371).

%TODAY%
reverse date of today (e.g.: 19860226).

%TODAYMIL%
reverse date of today in military or ISO format (e.g.: 1986-02-26).

%NOW%
reverse date and time of today (e.g.: 198602261459).

%YEAR%
four digit year of today (e.g.: 1986).

%LASTYEAR%
four digit year of last year of today (e.g.: 1985).

%MONTH%
two digit month of today (e.g.: 02).

%MONTHNAME%
locales abbreviated month name (e.g.: Feb).

%DAY%
two digit day of month of today (e.g.: 26).

%HOUR%
two digit hour of time (e.g.: 14).

%MIN%
two digit minutes of time (e.g.: 59).

%SEC%
two digit seconds of time (e.g.: 31).

%YDAY%
three digit day number of the year (e.g.: 057).

%WDAY%
one digit day of week number, 0 represents Sunday (e.g.: 3).

%WDAYNAME%
locales abbreviated weekday name (e.g.: Wed).

%WEEK%
two digit week number of the year (e.g.: 09).

%QUARTER%
one digit number of quarter (1-4) of the year (e.g.: 3).

%SEMESTER%
one digit number of semester (1-2) of the year (e.g.: 1).

%TRIMESTER%
one digit number of trimester (1-3) of the year (e.g.: 3).

 

SPECIAL VARIABLES

%BACKUPNAME%
name of the backup as specified on the command line when calling DataBackup BACKUPNAME.

%INSTALLDIR%
drive and directory where the WA2L/SimpleBackup package is installed.

%INSTALLDRIVE%
drive letter of %INSTALLDIR%.

In the EXCLUDE_FILES and EXCLUDE_DIRS settings the following variable can be used in addition:

%SOURCE_DRIVE%
resolved source drive letter without colon (:).

 

EXAMPLES

1) Example configuration file to backup data (regular incremental)

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

2) Example configuration file to backup data (monthly full)

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

3) Realization of a 3-generation backup

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%
:
:

 

SEE ALSO

simplebackupintro(1), databackup(1), databackup.report(4), databackup.cfg(4), databackup.config(4)

 

NOTES

-

 

BUGS

-

 

AUTHOR

databackup.cfg was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2022 Christian Walther

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.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
FILEFORMAT
OPTIONS
SECTION: [GENERAL]
SECTION: [BACKUPSET]
VARIABLES
ENVIRONMENT VARIABLES
TIME AND DATE VARIABLES
SPECIAL VARIABLES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 16:29:44 GMT, September 14, 2024