Configuration
The configuration data for FullBackup and IncrementalBackup are stored in
two separate XML files: FullBackup.conf and IncrementalBackup.conf.
The two configuration
files are very similar in design. If a parameter is not valid for both files, it
will be pointed out
clearly in the following description.
Targets
<Targets>
<Target Path="I:\" FreeGB="1"
/>
<Target Path=" VolumePrefix[Weekly]\backup"
Optional="yes" />
<Target>
<Switch Path="J:\" FreeGB="5" />
<Switch Path="K:\" FreeGB="5"
/>
</Target>
</Targets>
Specifies the target drives for the backup.
Path
Specifies the target folder/drive. If the drive letter is unknown, you may
also use "VolumePrefix[name]". In this case, the first drive whose
name starts with "name" will be used. This way it is e.g. possible to
access external hard disks whose assigned drive letter is not yet known when
configuring the backup. Useful names for the drives are e.g. "Weekly1", "Weekly2"
etc. In this case,
"VolumePrefix[Weekly]" will access one of these drives (the one that
is actually connected).
NOTE: Target folders are not created automatically. They must already be
present on the related target drives before starting the backup.
FreeGB
The backup job will keep open the specified amount of disk space. If the disk
space falls short of this value, old backup files will be deleted automatically
in order to free up disk space. Default: FreeGB="1".
Optional
The Optional="yes" statement is used to specify an optional target.
Optional targets are checked for availability. This is especially important for
external drives. When a backup is started, all optional targets are checked and
missing targets are reported via e-mail and warning log. Immediately before
copying to an optional target, this check is performed again. If a target is
missing, this event will be logged. The backup process continues. Default:
Optional="no".
Switch
A "target" node can also be specified without attributes, but with "switch"
child nodes instead. In this case, the "switch"
nodes can have the same attributes as a single "target" attribute.
When writing to these "switch" targets, the one will be used that has
not been a backup target for the longest period of time.
The names of the "date folders" located in potential target paths are used for
selecting the actual target path. Date and time stamps in the file system are
not relevant for this.
Sources
<Sources>
<Source Path="D:\userdata" Name="DATA"/>
<Source Path="F:\" Name="DriveF" />
</Sources>
It is possible to specify any number of sources for the backup.
Path
Specifies the folders or shared folders to be archived.
Name
A directory with this name will be created in the DateFolder on the target drive. The folders or
shared folders which have been specified using "Path" will then be archived in this
directory.
LogFiles
<LogFiles Path="f:\" />
Path
Two log files will be stored under this path: [DATE]_progress.log and [DATE]_warning.log.
The date is inserted in the "YYMMDD" format which means that a
chronological order will be obtained when sorting alphabetically. The progress
of the backup run is stored in the progress log file. Information on sources and
target drives is written and all copied files are listed. A block with
statistical data is inserted at the end of each source.
Files that could not be copied are listed in the warning log.
The contents of the warning log and statistical information are being sent to
the e-mail address specified under SmtpMail. Error messages, e.g. if the backup
is aborted, are stored in the event log and are also sent to the SmtpMail, if
possible.
NOTE: The folder for the log files is not created automatically. It must already be
present on the related drive before starting the backup.
ArchiveBit
<ArchiveBit Ignore="yes" Reset="no" />
Specifies how to handle the archive bit of the source files.
Ignore
If Ignore="yes" is selected,
IncrementalBackup will copy all files. If Ignore="no" is selected,
only files whose archive bit is set will be copied. FullBackup will always copy
all files. (For IncrementalBackup only.)
Reset
If Reset="yes" is selected, the archive bit of the source file will
be reset after copying successfully. If Reset="no" is selected, the
previous state will be kept.
DayOffset
<DayOffset Hours="8" />
Hours
Specifies how a backup runs is assigned to a day. In order to determine the
date for the backup, the specified number of hours will be subtracted from the
current time. If Hours="8" is selected, a backup that is started before 8
o'clock a.m. will be written to a folder with the date of the previous day. The
log file will also be stored using the modified date. The date at the beginning
of the backup run will be used for the entire run.
Security
<Security Copy="yes" />
Copy
Specifies how to handle the security settings at the target. If Copy="yes"
is selected, the security settings (access rights) for the copied files will
also be copied.
Priority
<Priority Value="Normal" />
Value
Specifies the priority of the backup task. Value is the task priority: Normal, Low, Lowest.
Sleep
<Sleep Milliseconds="0" />
Milliseconds
Specifies the idle time after copying a file. After each copied file, the
process will "sleep" for the specified number of milliseconds.
ExistingDateFolder (FullBackup only)
<ExistingDateFolder DeleteBySource="no"
ReuseSwitchTarget="yes"
/>
Specifies the behavior of the software if folders to be copied/created are
already present on the target. (For FullBackup only.)
DeleteBySource
DeleteBySource="no": If the target already contains a folder for
the current date, the contens of the folder will be deleted completely.
DeleteBySource="yes": If the target already contains a folder for
the current date and the current source (specified in <Source Name=…>),
only this source directory will be deleted.
This function allows you to archive different sources, one after the other,
into a common target directory without any mutual effects.
ReuseSwitchTarget
ReuseSwitchTarget="no": The switch logic strictly adheres to the
date of the last backup: If the backup is started twice in succession, you end
up with two switch targets containing a directory with the current date.
ReuseSwitchTarget="yes": If one of the switch targets already
contains a directory with the current date, this one will be used again.
DatabaseLogging (optional)
Microsoft SQL Server
<DatabaseLogging>
<Type Name="MSSql" />
<Connection
Name="server=(local);uid=sa;pwd=secret;database=backuplog;" />
<Table Name="backuplog" />
</DatabaseLogging>
Jet (Access)
<DatabaseLogging>
<Type Name="Jet" />
<Connection
Name="Provider=Microsoft.Jet.OLEDB.4.0;data source=C:\Backup\Jet\backuplog.mdb"
/>
<Table Name="backuplog" />
</DatabaseLogging>
Specifies a database. The log will also be written to this database.
Type Name
Type of the used database. Allowed settings are: MSSql, Odbc, OleDb and
Jet.
Connection Name
Connection string for the database. Syntax depends on the used database
type.
Table Name
Table within the database.
NOTE: These parameters are optional. If a database is not available or if you
do not wish to write the logs to a database, delete all related entries from the
configuration file.
SmtpMail
<SmtpMail>
<Server Name="smtp.provider.de"
/>
<To Name="bdmin@company.de"
/>
<From Name="backupserver@company.de"
/>
</SmtpMail>
Specifies the SMTP server and adresses for the e-mail status report.
Server Name
Name of the SMTP server.
To Name
Recipient of the e-mail.
From
Name
Sender of the e-mail (many SMTP server request an existing e-mail address for
the sender).
NOTE: These parameters are optional. If an SMTP server is not available or if you
do not wish to send the status reports via e-mail, delete all related entries from the
configuration file.
Configuration Examples
In order to illustrate the concept and the use of the individual options, you
find our own configuration and the ideas behind it in the following. For
clarity, we have added comments to the XML file in italic lettering.
Fullbackup.conf
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Targets>
<Target>
<Switch Path="g:\" FreeGB="1"
/>
<Switch Path="h:\" FreeGB="1" />
</Target>
<Target Path="VolumePrefix[WeeklyExt]" FreeGB="1"
Optional="yes" />
</Targets>
<Sources>
<Source Path="\\server3\exchangefiles" Name="exchange"
/>
<Source Path="\\server3\systemstates" Name="systemstate"
/>
<Source Path="\\server3\publicfiles" Name="pub" />
<Source Path="\\server3\privatefiles" Name="priv"
/>
</Sources>
<LogFiles Path="c:\Backup\Full\Log" />
<ArchiveBit Reset="yes" />
<DayOffset Hours="10" />
<Security Copy="yes"
/>
<Priority Value="Low" />
<Sleep Milliseconds="0"
/>
<ExistingDateFolder
DeleteBySource="yes" ReuseSwitchTarget="yes" />
<DatabaseLogging>
<Type Name="MSSql" />
<Connection Name="server=(local);
uid=user;pwd=topsecret;database=backuplog;"
/>
<Table Name="backuplog" />
</DatabaseLogging>
<SmtpMail>
<Server Name="smtp.cptec.org" />
<To
Name="name1@cptec.org;name2@cptec.org;name3@cptec.org" />
<From
Name="backup_server2@cptec.org" />
</SmtpMail>
</Configuration>
In the following, only parts that are different from Fullbackup.conf will be
commented.
IncrementalBackup.conf
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Targets>
<Target>
<Switch Path="g:\" FreeGB="1"
/>
<Switch Path="h:\" FreeGB="1" />
</Target>
<Target Path="VolumePrefix[DailyExt]" FreeGB="1"
Optional="yes" />
</Targets>
<Sources>
<Source Path="\\server3\exchangefiles" Name="exchange"
/>
<Source Path="\\server3\publicfiles" Name="pub" />
<Source Path="\\server3\privatefiles" Name="priv"
/>
</Sources>
<LogFiles Path="c:\Backup\Incremental\Log"
/>
<ArchiveBit Ignore="no" Reset="yes" />
<DayOffset Hours="10" />
<Security Copy="yes" />
<Priority Value="Low" />
<Sleep Milliseconds="0" />
<DatabaseLogging>
<Type Name="MSSql" />
<Connection Name="server=(local);
uid=user;pwd=topsecret;database=backuplog;"
/>
<Table Name="backuplog" />
</DatabaseLogging>
<SmtpMail>
<Server Name="smtp.cptec.org" />
<To
Name="name1@cptec.org;name2@cptec.org;name3@cptec.org" />
<From
Name="backup_server2@cptec.org" />
</SmtpMail>
</Configuration>
Testing the Configuration
The command line parameter "test" may be used to test the configuration.
The following tests will be performed:
- Does the configuration file contain valid XML code?
- Are all specified paths available?
- Can a connection to the database be established?
- Does sending of e-mails work properly?
No data will be saved or logged during the test. Errors are displayed
directly at the command line and they will also be reported via e-mail, if
possible.
Version 1.0
|