DRest (David's Restore application)

The DRest application restores backups taken with DBack. The restored data can be all of the original; alternatively, exclusions or inclusions can be specified so as to restore only some of the data.

The companion application DBack is required to back up the data in a form suitable for DRest to restore.


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 DBack application, which should most logically be installed (by the same method) alongside DRest;

• 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!


There is nothing to configure.


Run the DRest 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 that contains all the files generated by DBack. There must be a file named "Index" or "IndexLog" and one named "0000" in the directory; there may be others with names such as "0001", "0002", etc. depending on how many data DBack backed up. Drag the directory to the writable icon, then edit it if/as necessary.

Similarly, the "Destination:" writable icon specifies where DRest will put the restored data. Fill it in using the same method as for the source above. DRest will create the last directory level, if it does not already exist, but only the last level - no more. To restore 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 "$".

You may wish to prevent some files or directory trees from being restored. You can specify a list of exclusions (i.e. restore everything except what is listed), or a list of inclusions (i.e. restore only what is listed). To do so, create a text file somewhere with the items, one on each line; then drag the file into the "Exclude:" or "Include"writable icon. Clicking the button allows you to select Exclude or Include. Note: you MUST put them in a file; DRest treats the exclude entry as a file, not as a literal string. The file can contain up to 100 such exclusions or inclusions. Any more are ignored.

If you want to restore everything, leave the exclude/include entry blank.

To decrypt an encrypted backup, enter a key in the "Key:" field. The key MUST match that used for encrypting the backup. If the backup was not encrypted, make sure the "Key:" field is blank.

To verify a backup or part of a backup without actually restoring the files, tick the "Only verify" button. To restore the files, ensure that the button is not ticked.

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

Restore 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 restoring from 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 restore can be resumed by clicking "Continue".

When the restore has completed, the state changes back to "Idle" and the summary window opens, showing the total number of files restored.

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

Checking the results

The destination directory contains a text file named Log, unless you have given it a different name and/or location. Any files that could not be recovered correctly will have an entry in the log.

Advanced configuration

Having stated above that DRest has nothing to configure, that's not strictly true. If you always encrypt your backups with the same key, you may have chosen to get the "Key:" field filled in for you when DBack starts up, by editing the !Run file. You can do the same with DRest. You will see instructions in the !Run file that should be obvious. Note that it's only a preset value; the key actually used is what is in the "Key:" field when the Start button is pressed.


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 the DBack 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, which in turn is in the Modules directory of the DBack app. 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 15Corrected inclusion/exclusion behaviour; updated help.
1.002020 April 4Decryption added.
1.022021 December 7Handles split data files. CRC added. Can optionally only verify. Log file name and location can be specified.

Page last updated 2021 December 12