|
DB Maintenance: Backup
& Restore
(Related procedures: Backup only, Restore
only.)
Introduction - Routine Maintenance
is Very Important!
To maintain the database and its
integrity, it is important that you perform a Backup & Restore
on your Bundle-Track database on a regular basis - at least once
a month, preferably once a week. Here's why:
- Over time, the database naturally accumulates garbage data,
mostly consisting of deleted records. The Backup & Restore
process purges the garbage to make your database smaller and faster.
- Bad things sometimes do happen to data. The Backup file gives
you a fallback position.
Assistance
For users who are moderately proficient in the Windows Environment,
the guide below is more than adequate. However, some users prefer
to call us for guidance through the process. If you would like our
live assistance, you may hire us at our professional
services rate. Depending on your skills in the Windows environment,
this task may take as little as 15 minutes and long as an hour.
Procedure
The following procedure applies to Bundle-Track versions 3.8
and above.
Perform the following steps on your Production
database.
- Disconnect all Bundle-Track users.
- Direct all users to exit Bundle-Track and stay out until
you advise them that they may return.
- Open IBConsole and Locate the Database
- Validate the Database (with Read Only Validation).
Confirm
that IB Console is disconnected ( )
from the database.
- If you've accidentally connected, disconnect now. (If
you don't know how, click
here to learn, and then return.)
- Right-click on the database name and select 'Validation
...'.
- Set 'Read Only Validation' to True.
- Click OK to begin Validation.
- If no database errors are detected, click OK.
- If database errors are detected, click Repair, then
let the Validation process finish, and then repeat the
Validation process.
- Put the Database into Single-User
Mode.
- Connect to the database.
- Right-click on the database name, then select 'Maintenance'
and 'Shutdown'.
- Set the 'Shutdown' option to 'Force shutdown after timeout.'
- Set the 'Shutdown Timeout' value to 0.
- Click OK and await shutdown confirmation.
Create a Backup File.
- From the Database menu, select Maintenance >> Backup
/ Restore >> Backup.
- This opens the 'Database Backup' screen.
- Use the Database area's Alias dropdown to select the database
you want to process.
- Set the Backup fields:
- Server:
- (This should already be set.)
- Alias:
- If the desired Alias is not listed in the dropdown,
type a new Alias yourself (for example, 'bt30600prod.gbk'),
and be sure to use .gbk at the end of the filename.
- Filename:
- Specify the full path for the Backup file you want
to create.
- You can avoid typos by opening the destination folder
in Windows Explorer and copying the path from the
address bar, but then remember to add the filename
at the end.
- The filename must end with the .gbk
file extension.
- Set the 'Garbage Collection' option (on the right) to False.
- Click OK to start the Backup.
- Await confirmation that the process completed successfully.
- It may take a few minutes.
- If the backup is successful, the last lines in the log
will read
gbak: closing file, committing, and finishing. <number>
bytes written
Service ended at <date and time finished>
- If you receive any error messages, start the Backup
process again. (From the Database menu, select Maintenance
>> Backup / Restore >> Backup.)
- If you receive a second error message, contact Bundle-Track
Support (info at the top-right of this page).
- Optional and recommended: Rename the
original database file temporarily.
This will enable you to go back to this database if there's
a problem with the Restore process. After successful Restore,
you'll delete this extra file.
- Disconnect IB Console from the Database.
- Open InterBase Manager.
- In the InterBase Manager, if the Status area indicates 'Running,
click Stop.
- Leave the InterBase Manager panel open.
- Open your database folder (in an Explorer window).
- Locate the database file (ending in .gdb or .ib, not
.gbk).
- Change the file name.
- Suggestion: use the date - for example '20040817prod.gdb'
for August 17 2004.
- In the InterBase Manager, change the Status to 'Running'
by clicking 'Start'.
- Use the InterBase Manager you left open, then close
the InterBase Manager panel.
Restore the Database from Backup.
- From IB Console's Database menu, select Maintenance >>
Backup / Restore >> Restore.
- Set the Backup File fields:
- Alias:
- Use the dropdown to specify the Backup (.gbk) file.
- If the file is not listed, click the 'file...' button
and then navigate to the file.
- Filename:
- (This should fill in when you select an Alias.)
- Set the Database area fields:
- Server:
- Use the dropdown to select the server under which
you want to register the database.
- Alias:
- Use the dropdown to select the Alias.
- If the desired Alias is not listed, type a new Alias
yourself (like BT30600PROD). This will be the name
that displays in IBConsole to represent the database.
- Filename:
- Read the filename to confirm that the path is valid.
- If the Filename field is blank, type the full filepath
to the database file, and make sure to use the .gdb
or .ib extension at the end of the filename, not .gbk.
- IF YOU DID NOT RENAME THE ORIGINAL DATABASE FILE,
then set the Overwrite option in the right-hand window to
True.
- Click OK to begin the Restore.
- A log window should open, listing the actions being
performed.
- Await a confirmation popup announcing successful completion.
- Very large databases may take about half an hour.
- If the Restore is successful, the last lines in the
log will read
gbak: finishing, closing, and going home.
Service ended at <date and time finished>
- If you receive any error messages, perform this Restore
process again from the beginning (click
here).
- If you receive a second error message, contact Bundle-Track
support (see contact info at the top-right of this page).
- After the Restore is finished, close the log window.
- Click Cancel to close the Restore window.
- Restart the Database
- Confirm that the database is currently connected (
).
- If it isn't, double-click the database icon.
- Right-click on the database name, then select 'Maintenance'
and 'Database Restart'.
- Notify the Users that they may return to Bundle-Track.
- Optional and recommended: Archive
the Backup file.
- Using Windows Explorer, locate the newly-created backup
file (ending in .gbk, not .gdb).
- Change the file name to reflect the backup date
- For example: '20040817prod.gbk' for August 17 2004.
- Compress (zip) the file to reduce its file size.
- You will then have a file ending in .zip.
- You may then delete the .gbk file (because you have a copy in the .zip file).
- Move the .zip file to another storage location.
- Optional and recommended: IF YOU RENAMED
THE DATABASE ABOVE,
delete the renamed database file.
Since your restore was sucessful, and you have a good backup file
in your new .zip file, you no longer need this extra .gdb file.
- Using Windows Explorer, locate the renamed database (.gdb) file.
- Be careful to find the renamed file, not the newly restored one.
- Delete the file.
Return Links: Lock
Conflict.
We welcome your comments at support@bundle-track.com.
If you would like our live assistance, you may hire us at our professional
services rate.
|