1. Computing
RTL Reference|Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back


In my previous article I was reviewing Table Scanner, utility that offers powerful features to database development. Naturally, it was a real help. Somehow, I was not fully satisfied with my application, something was missing: every "true" database program should have backup capabilities!
Therefore, as always, I decided to search for some backup component/utility. Read about what I have found.

TBackupFile (from Easycash Software) is a small backup and restore component for Delphi 3/4. This component was designed to add backup capabilities to any application that works with local data. It is a native Delphi VCL, no DLLs or runtime libraries are required. Last but not the least, it is free (source included)!


  • Full backup and restore capabilities
  • Data compression
  • Multiple archives with up to 999 disks
  • Customizable compression mode
  • Incremental or full backup
  • Partial or full restore
  • Backup to and restore from a stream (or from/to BLOBs)
  • Create self extracting EXE files (SFX)

With just a few properties, methods and events you have everything you need to simply integrate backup/restore functionality to your application. Here are few examples:

Backup/restore method.
BackupFile1.Backup(listbox1.items, 'A:backup.bck');
BackupFile1.Restore('A:backup.bck', 'c:\program files\myprogram\data\');
Listbox1.items (TStrings) must contain the full path names and the file names or wildcards. You can also include all files in a directory including all files in all its sub-directories.
If TBackupFile needs to split the archive on multiple disks, the extension of the archive file changes to ".002" for the second disk, ".003" for the third and so on. This is in addition to standard bck extension.

Backup/restore mode property.
Defines the kind of backup.
TBackupMode = (bmAll, bmIncremental);
Backup all files included in the filelist, or files that have the archive flag set.
TRestoreMode = (rmAll, rmNoOverwrite, rmNewer, rmExisting, rmExistingNewer);
This property allows you to choose how to restore a backup.

OnNeedDisk event.
The event occurs when TBackupFile needs a new disk - either during backup or during restore.
procedure TForm1.BackupFile1NeedDisk(Sender: TObject; DiskID: Word; var Continue: Boolean);
Continue := MessageDlg('Please insert disk ' +
inttostr(DiskID)+' and click OK to continue',
mtInformation, mbOKCancel, 0) = mrOK;


TBackupFile properties TBackupFile events

There are, of course, other helpful routines designed to ease backup and restore functionality within your application. This was just a quick look at most important ones.

This free component is something I was looking for. Download it, use it, and you will never stop using it.

Some more backup related stuff:

  • Backup for Delphi. Set of three non-visual VCL components that can be used to add floppy (A: and B: drive) backup capabilities to your application. From ProVision.

All graphics in this feature created by Zarko Gajic.

More Delphi
· Learn another routine every day - RTL Quick Reference.
· Download free source code applications and components.
· Talk about Delphi Programming, real time.
· Link to the Delphi Programming site from your Web pages.
· Tutorials, articles, tech. tips by date: 2001|2000|1999|1998 or by TOPIC.
· NEXT ARTICLE: Mail me, Link me....
Let us improve standard TLabel component, so that it acts like a link in a web page.
Stay informed with all new and interesting things about Delphi (for free).
Subscribe to the Newsletter

Got some code to share? Got a question? Need some help?

©2014 About.com. All rights reserved.