Restoring Data from a Backup
General Principles
Restoration of data from a backup needs to be done carefully.
Obviously, once you have overwritten your data, it is gone for good.
There is therefore merit in making a precautionary back up of your current
data as it stands (albeit perhaps corrupted in some way) before restoring
over it, just in case you subsequently find that you need something from it.
If you are able to produce printed reports of the data you are about to lose
when restoring, it is a good idea to do so, to assist with re-keying it
later. This is especially so if people enter their own timesheets as they
work through their day, as they are often unable to remember some of the minor
things that they did on the same day, let alone going back several days.
You then need to plan what files you will restore. Restoring everything
is simple to do, but often might result in unnecessary loss of significant amounts of data entry -
that has been done since the backup was made. If Murphy's Law is really out to
get you, there is also a risk
that the Backup copy may be corrupted in some way, and consequently perfectly
good files could be overwritten and corrupted unnecessarily, leaving you then
with no option but to restore from an even earlier backup (unless you made a
precautionary backup as suggested in the previous paragraph). We therefore expect
(and want) any users who have problems with corrupted data (or who have made a
big mess of some data entry or an operation like creating a batch of invoices -
and seemingly need some training) to contact our HelpDesk to talk through the
issues and get the best possible assistance.
Data Integrity Considerations
If you find that you need to restore a particular file for some reason, you need to be very
mindful of both what has transpired since the last backup (i.e. that you will
lose when you restore), and the inter-relationships between it and other files.
For
example, consider the following scenario: Let's say that some of your Invoice Lines have been corrupted somehow, such that you need
to restore the InvLine files from a backup (note that the DBF has an FPT
companion in this case). You need to know whether you have
created or edited any invoices since the previous backup. If so, then you
will need to also restore the Invoice header file and timesheets, so that they
match the restored invoice lines. If you have posted the intervening
invoices to Debtors, then you will need to restore all the files in the
"Debtors" folder too, so that they match what you are restoring.
(If you are lucky, you won't have entered too many receipts/deposits, that will
have to be done again.) Failure to restore any of the files mentioned in
this scenario would lead to serious data integrity problems. Hopefully
this helps you better appreciate why it is usually worth discussing such
problems with our help-desk.
The data files are all free FoxPro tables (i.e. with a DBF extension).
Note that some data files have free form text fields associated with them, which
are stored in a companion "memo" file (with an FPT extension and same
root file name). In such cases, you must restore both files
together.
Integrity implications of respective data tables:
Clients: can have impact on nearly everything
Jobs affects Timesheets and invoices but not as seriously. You
only need to re-enter any new jobs that are lost when you restore, and the
associated secondary data will be OK again.
Timesheets (WorkLog.dbf), Invoice Header (InvHead.*), and Invoice
Lines (InvLine.*) are inter-related. If you have made changes to any
invoices since the last backup, you need to restore them all.
Invoices and Debtors are inter-related. If you have posted
invoices to debtors since the last backup, you will need to restore them all
(and probably timesheets too).
Examples for greater clarity and to reinforce the principles:
Clients: If you have just edited a few addresses and other
details or added new clients but not used them yet in any other data entry,
you can restore the Clients.* files (in "Address" folder) by
themselves. However, if you have changed the name of one or more
clients since the last backup or entered timesheets, notes and other data
associated with any new clients, restoring just the Clients files would
leave all the associated secondary data hanging without a matching
client. In such cases you are probably best to restore everything (all
data files).
Timesheets (WorkLog.dbf in "TimeCost" folder): If you
have not done any invoicing since the last backup, you can restore this file
by itself. (If you are running creditors and have entered some
supplier invoices that have been coded through to jobs, you will either need
to restore all Creditor files too, or raise Expense "timesheets"
matching those supplier invoices.) However, if you have created
invoices, or edited invoices since the backup was made, you will need to
restore your invoice header and invoice line tables too.
If Murphy's Law has got you such that you need to restore, we welcome a
quick support call, just to ensure that you don't create a worse mess for
yourself.
Restoring from Microsoft or Third Party Backups
The only special consideration when restoring GECL data from backups
produced using Microsoft or other backup software, (as opposed to restoring a Word
document say), is the inter-relation between
data tables, and the associated data integrity issues.
Restoring from GECL Backups
While the GECL install program should create a backup shortcut on your
desktop, it doesn't create a matching Restore shortcut. We do this quite
deliberately because, if you ever need to restore from backup, it is usually to
recover just one or two files rather than everything. Having said this, there are times when you do want to restore all data,
such as loading a copy of data sent from a branch office, or transferring your
data onto a new computer (when no network is available).
If you you use the GECL Backup facility, and it is creating its backups as
ZIP files (i.e. you have PKZip or WinZip command line, or PKZip 2.5), then you
can use Windows XP or any ZIP compatible data compression/uncompression tool (including
ZipMagic) to extract and restore selected files from a backup. If you do
not have the "command line" add-ons, and are therefore using LHA to
produce the compressed backup file, you can usually use a basic/earlier version
of WinZip and PKZip to open an LHA file, and extract selected files from
it. When using a tool like PKZIP or WinZip, be very careful to
preserve data integrity with associated files !!!
Note that the GECL backup routine produces an intermediate backup file
(GEBackup.zip - or GEBackup.lzh if using LHA) on hard disk in a
"\GECL\Backup" sub-folder in your main GECL data. (e.g.
\GECL\Backup\GEBackup.zip). If you are wanting to restore files from your
last backup, you can get them from there instead of your removeable media.
This is particularly convenient if you back up to floppy disks. Just
remember to rename this file first, before you do any precautionary backup, as
it will be overwritten when you run another backup. Obviously, if you do
need to recover files from an even earlier backup, then you will need to get the
compressed backup file from your floppy disks or other media. If you have
used one of the ZIP tools to produce your backup, and it spans two or more
diskettes, then note that the associated file list is located on the last floppy
disk, and you will need to insert this first, so that your software can know
which diskette it requires.
If you are using LHA as the file compression tool when making backups, and
it is too big to fit onto one disk, the backup facility will use DOS Backup to
span two or more floppy disks. You will need to use its companion DOS
Restore program to get the files back from floppy disk.
We have provided a restore batch file that is useful for restoring from a
compressed backup file produced by LHA, especially one that spans several floppy
disks. It is called "GERestor.bat" (note that there is no 'e' on
the end), and it is located in the main \GECL directory. It is reaonably
self documenting. You must pass it at least one parameter, giving a
wild-card that covers the file (or files, or directories) that you wish to
restore. Because a restore is hopefully a one-off occurrence, you
are best to run this from the DOS Command Prompt. (If you want to
regularly restore data from one or more branch offices, then there is a case for
setting up a shortcut with an appropriate working directory and a parameter of
"*.*".)
Problems with DOS Restore Program
If you need to restore it from a set of floppy disks that used Backup.exe,
then you may need to change some configurations settings, in order to allow DOS Restore
(GERestor.bat uses this) to work with Windows 95/98/2000/NT/XP.
To test this, go to the MS DOS Prompt (Start button, Programs, MS DOS
Prompt) and carry out the following: (don't type the speech marks, or text
in brackets)
Type "cd \GECL" <enter> (to change into the GECL directory)
...if your GECL directory is on another drive type "F:" <enter> first to
change to that drive.
Type "restore" <enter>
If "incorrect DOS version" comes up do the following:
Type "setver restore.exe /delete" <enter>
Type "setver restore.exe 6.20" <enter>
You should see a whole lot of stuff about version table updated etc.
If you see something about the device SetVer not loaded in Config.sys do the
following:
type "C:" <enter>
type "cd\" <enter>
type "edit config.sys" <enter>
add a line that reads "Device=C:\Windows\SetVer.exe"
exit and save the file (use Alt-F, Exit)
In both cases you need to restart the computer before restore.exe will work.
You should now be able to restore all files from a complete backup.
However, do not use this shortcut if you wish to restore just selected files !!!
Return to the main Help page