FullBackup is used to copy the full set of data of a source. It copies all files. It copies empty directories. It deletes the target directory (incl. date prefix) if it is present already, e.g. if the backup is started several times on the same day.
IncrementalBackup copies only modified files (marked by the archive bit) and will optionally reset the archive bit. It creates directories which are required for the directory structure. It copies files into an already present target directory by overwriting. If started several times a day, all the changes will add up.
The configuration for FullBackup and IncrementalBackup is stored in two separate XML files: FullBackup.conf and IncrementalBackup.conf.
<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.
Specifies the folders or shared folders to be archived.
A directory with this name is created on the target drive. We recommend that you choose a short and telling name.
<Targets>
<Target Path="I:\" FreeGB="1" />
<Target Path=" VolumePrefix[Weekly]\backup" />
<Target>
<Switch Path="J:\" FreeGB="5" />
<Switch Path="K:\" FreeGB="5" />
</Target>
</Targets>
Specifies the target drives for the backup.
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).
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".
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.
<LogFiles Path="f:\" />
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.
<ArchiveBit Ignore="yes" Reset="no" />
Specifies how to handle the archive bit of the source files.
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.)
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 Hours="8" />
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 Copy="yes" />
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 Value="Normal" />
Specifies the priority of the backup task. Value is the task priority: Normal, Low, Lowest.
<Sleep Milliseconds="0" />
Specifies the idle time after copying a file. After each copied file, the process will "sleep" for the specified number of milliseconds.
<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.
Name of the SMTP server.
Recipient of the e-mail.
Sender of the e-mail (many SMTP server request an existing e-mail address for the sender).
<DatabaseLogging>
<Type Name="MSSql" />
<Connection Name="server=(local);uid=sa;pwd=secret;database=backuplog;" />
<Table Name="backuplog" />
</DatabaseLogging>
<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 of the used database. Allowed settings are: MSSql, Odbc, OleDb and Jet.
Connection string for the database. Syntax depends on the used database type.
Table within the database.
<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="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="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.
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.
<?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" />
</Targets>
<!--
Backups are being written to the internal drives "g:\" and "h:\" by turns. In addition, a backup is always written to an external hard disk whose volume name starts with "WeeklyExt". We currently use 5 external hard disks labeled "WeeklyExt1" through "WeeklyExt5" which are used consecutively. The external drives are normally stored outside of the office in order to cover the risk of fire and the like. The additional copies on the internal disks give us more redundancy, and we can restore the data faster during normal operation.
-->
<DayOffset Hours="10" />
<!--
If the backup run should have failed for some reason, it may be repeated until 10:00am on the following day. In this case, the date of the previous day will still be used for storing the backup.
-->
<ExistingDateFolder DeleteBySource="yes" ReuseSwitchTarget="yes" />
<!--
The "ReuseSwitchTarget" option makes sure that the data will be written to the same target drive/directory. The "DeleteBySource" option makes sure that each source will be deleted individually before copying, and not the entire target directory. This may save time because sources which have been copied successfully will be preserved.
-->
<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>
<!--
These are the data to be saved. Special data that cannot be saved as files during operation are "exported" automatically in our system and placed in special shared folders. In the above example, this applies to the sources named "exchangefiles" and "systemstates" which contain backups of the system states for all workplace PCs and for one exchange server.
-->
<LogFiles Path="c:\Backup\Full\log" />
<!--
This is the path for the log files.
-->
<ArchiveBit Reset="yes" />
<!--
The archive bit of the original files will be reset after copying. This way, the next run of the daily IncrementalBackup will only copy files that have been modified since the last weekly FullBackup.
-->
<Security Copy="yes" />
<!--
The security settings for the files are also being copied.
-->
<Priority Value="Low" />
<!--
The backup process is started with a low priority. As a result, compression is performed while copying in cases where compression is activated for a target drive. This setting is important because the maximum disk capacity cannot be utilized otherwise.
-->
<Sleep Milliseconds="0" />
<!--
No other jobs are running on our backup server. For this reason, it is not necessary to reduce the load.
-->
<SmtpMail>
<Server Name="smtp.cptec.org" />
<To Name="name1@cptec.org;name2@cptec.org;name3@cptec.org" />
<From Name="backup_server2@cptec.org" />
<!--
Reports on the backup run are being sent to the e-mail recipients specified here.
-->
<DatabaseLogging>
<Type Name="MSSql" />
<Connection Name="server=(local);
uid=user;pwd=topsecret;database=backuplog;" /><Table Name="backuplog" />
</DatabaseLogging>
<!--
Information on the archived data are also written to an MS SQL database.
-->
</Configuration>
In the following, only parts that are different from Fullbackup.conf will be commented.
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Targets>
<Target>
<Switch Path="e:\" FreeGB="1" /> <Switch Path="f:\" FreeGB="1" />
</Target>
<Target Path="VolumePrefix[DailyExt]" FreeGB="1" />
</Targets>
<!--
Backups are being written to the internal drives "e:\" and "f:\" by turns. In addition, a backup is always written to an external hard disk whose volume name starts with "DailyExt". We currently use 2 external hard disks labeled "DailyExt1" and "DailyExt2" which are used consecutively. The external drives are normally stored outside of the office in order to cover the risk of fire and the like. The additional copies on the internal disks give us more redundancy, and we can restore the data faster during normal operation.
-->
<DayOffset Hours="10" />
<!--
If the backup run should have failed for some reason, it may be repeated until 10:00am on the following day. The data will be written to the same target drive/directory. Files which have been modified in the meantime will be copied. This will overwrite the archived version of the previous day. Files which habe already been copied and have not been modified since then will not be copied again. They are already present on the target drive.
-->
<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" />
<!--
Only modified files (archive bit set) will be copied. After copying a file, its archive bit will be reset.
-->
<Security Copy="yes" />
<Priority Value="Low" />
<Sleep Milliseconds="0" />
<SmtpMail>
<Server Name="smtp.cptec.org" />
<To Name="name1@cptec.org;name2@cptec.org;name3@cptec.org" />
<From Name="backup_server2@cptec.org" />
<DatabaseLogging>
<Type Name="MSSql" />
<Connection Name="server=(local);
uid=user;pwd=topsecret;database=backuplog;" /><Table Name="backuplog" />
</DatabaseLogging>
</Configuration>
Version 1.0