DBack (David's Backup application)

The DBack application backs up whole drives, or directory trees, optionally in encrypted form. The backup is designed to be quick and easy, and not to stop when individual files cannot be copied (e.g. because they are open in some other application). Filenames are not altered by being stored on a filing system with different filename rules. The backup is relatively friendly towards flash storage devices. DBack multi-tasks very smoothly, no matter how large a file is being processed at any moment.

The companion application DRest is required to restore the data from DBack's backups.


DBack and DRest are distributed under the GNU General Public Licence, Version 2, a copy of which is supplied in the archive.


Drag the contents of the archive to somewhere convenient. The Apps directory will do as well as anywhere else.

You will also need:

• the companion DRest application, which should most logically be installed (by the same method) alongside DBack;

• the zlib module, which is part of recent HardDisc4 distributions. If you don't already have zlib, you can get a current HardDisc4 from the RISC OS Open site's Downloads section. NOTE: there are some versions of zlib that are defective due to a compiler bug. This wasn't discovered for some months. Sadly, the version number wasn't changed to allow easy identification. To remove any doubt, get the current version of zlib. Using a defective zlib will render the backup unrecoverable!


The size of data files can be limited. This can be useful when saving backups on systems that prohibit files above a certain size, e.g. BT Cloud. The limit is set in the !Run file (shift-double-click DBack's !Run file), and is a pure number, representing mebibytes (1 MiB is 2^20 bytes). By default it is 450.

Don't ever forget the encryption key!

There is no known way to recover the encryption key, so, if you encrypt the backup, make very sure you don't ever forget the key. Ever. If you do, you will not be able to restore from the backup. There's nothing that I can do to help you in that situation.


Run the DBack application by double-clicking it. Its icon arrives on the icon bar, with the state showing as "Idle"; click Select on it to open the main window.

The "Source:" writable icon specifies a directory, or the root of a drive, whose data are about to be backed up. Drag a directory to it, then edit it if/as necessary. To back up an entire drive, the entry should end in ".$", so it's easiest to drag in a directory or file from the root directory, then delete backwards from the end until the last character is the "$".

Similarly, the "Destination:" writable icon specifies where DBack will put the backup data. Fill it in using the same method as for the source above. DBack will create the last directory level, if it does not already exist, but only the last level - no more.

You may wish to exclude some files or directory trees from being backed up. For example, it probably doesn't make sense to back up the data from the !Cache application. To exclude items, create a text file somewhere with the items, one on each line; then drag the file into the "Exclude:" writable icon. Note: you MUST put them in a file; DBack treats the exclude entry as a file, not as a literal string. The file can contain up to 100 such exclusions. Any more are ignored, as are blank lines and comments (lines whose first character is a vertical bar).

If you don't want to exclude any items, leave the exclude entry blank.

If you wish to encrypt the backup, enter a key in the "Key:" field. If you don't want to encrypt the backup, make sure the "Key:" field is blank.

The name and location of the Log file can be specified in the "Log file:" field. If this is left blank, the file will be named Log and will be in the root of the "Destination:" directory.

When you're ready to go, click "Start". DBack performs some checks before starting. If the checks succeed, the state changes to "Running" and the backup is on its way.

Backup operations can be paused by clicking the "Pause" button. The state changes to "Paused" and the button's legend changes to "Continue". This may be useful when backing up to a network destination and you wish to run another application that might single-task the computer for long enough for the network operation to time out and cause an error. The backup can be resumed by clicking "Continue".

When the backup has completed, the state changes back to "Idle" and the summary window opens, showing the total number of files backed up, and the number of files that could not be backed up (normally because they were open for write by some other application).

To stop a backup, click the "Stop" button. This aborts the backup. It cannot be resumed, it must be restarted. The state changes to "Stopped" as a reminder that the backup did not run to successful completion. A second click on "Stop" brings the state back to "Idle".

Checking the results

Open the Log file, which contains a log of important information such as error messages, when the backup operation was started/paused/continued/finished, etc. Each file that could not be backed up will have an entry here, consisting of two lines: "Could not copy file:" and the file name. You can take your own copy of any such files, to complete the backup. If a file cannot be backed up, it's normally because the file was open for writing by another application, and so cannot be copied until the application has closed it.

Restoring from the backup

The companion DRest application must be used to restore data backed up by DBack. DRest has its own Help file.

Advanced configuration

Having stated above that DBack has only the file size limit to configure, that's not strictly true. Files are stored either as-is or compressed, according solely to their file types. Which file types are compressed, depends on the entries in the CompConfig file. It just might be possible to save a little backup run time, or a little destination file space, by altering entries therein. However, in real life, it's unlikely that you will notice the difference, so I advise against making any changes.

Text files usually compress very well, whereas media files (audio, video) are already compressed to the point where hardly any further file size saving can be made. Compression may or may not save file space, but it definitely takes CPU time, and so does the complementary decompression if a restore operation should become necessary. The biggest unknown is whether Data files should be compressed. This depends on their contents. Currently, Data files are not compressed in DBack's default configuration.

File types that are not specified in the CompConfig file, or are commented out, are not compressed. Entries in the CompConfig file that begin with a vertical bar are considered to be commented out. DBack looks for the first three characters, which specify the hex file type. Any further content on the line should be separated from the file type by a space. In the file provided with the distribution, all 4096 possible file types are listed, followed by their meanings as known on my system at the time I generated the file. The CompConfig file is read every time a backup is started.

I repeat, you're unlikely to make any significant improvement; so, unless you know differently and you know what you're doing, leave the file alone.

If you wish to always encrypt your backups, always with the same key, it's possible to get the "Key:" field filled in for you when DBack starts up, by editing the !Run file. You will see instructions therein that should be obvious. Note that it's only a preset value; the key actually used is what was in the "Key:" field when the "Start" button was pressed. Remember that leaving a record of the key is a potential security risk, so only use this facility if you are sure that the computer is secure against on-line or in-person attack.


You can download DBack here and DRest here.

If it goes wrong

Contact me by email as dave@davehigton.me.uk and I will do my best to fix the problem.


The Blowfish module was written by Gareth McCaughan and 32-bitted by Stefan Bellon. It is freely distributable. The module (only) is supplied along with this app. Source is available from here.

The SHA1 module was written by Theo Markettos. It is freely distributable. The permission notice is in the ReadMe file alongside the module. The source is available here.

I am grateful to Stuart Swales for his suggestion to incorporate CRC checking.

Revision history

0.022017 May 10First issue
0.032017 May 15Updated help
1.002020 April 3Encryption added
1.022021 December 11Encryption added to Index. Data file size can be limited. CRC added. Index and Log split. Log name and location can be specified.

Page last updated 2021 December 11