|
Never make a direct copy of the Addressinator database file with the Firebird services running.
Do not use external proprietary backup utilities or file-copying tools such as WinZip, tar, copy, xcopy, etc., to make a copy of the actual database file.
Not only will the backup be unreliable, but the disk-level blocking used by these tools can corrupt a running database.
Only use the gbak utility as per the information provided below
This section identifies the following:
| 1. | Using the networkFirebirdsnapshot.bat backup file to automatically backup your database |
| 2. | Editing the networkFirebirdsnapshot.bat backup file |
| 3. | Testing the networkFirebirdsnapshot.bat snapshot backup |
| 4. | Creating a Scheduled Task to auto-run the snapshot backup |
| 5. | Restoring a backup snapshot file |
1. Using the networkFirebirdsnapshot.bat backup file to automatically backup your database
Included in the Addressinator program installation folder is the batch file called networkFirebirdsnapshot.bat
This file (once edited to reflect your information) creates a snapshot file of the Addressinator database file every time it is run.
There is no need to have users out of the Addressinator v4 database to create this snapshot. The provided batch file (once edited with your information) takes a snapshot of the state of the database at the moment it starts, so users can continue working while a backup runs, allowing 24x7 operation.
Only this utility can be used to create a snapshot of the live Addressinator database.
And it’s the snapshot file that is to be backed up – never the actual live database file.
The first time the batch file is run, it creates a snapshot file ADDRESSINATOR.FBK
The second time it is run, it renames the first to ADDRESSINATOR02.FBK and creates a new snapshot file ADDRESSINATOR.FBK
The third time it is run, it renames ADDRESSINATOR02.FBK to ADDRESSINATOR03.FBK, renames the ADDRESSINATOR.FBK to ADDRESSINATOR02.FBK, and creates a new snapshot file ADDRESSINATOR.FBK and so on
Once 10 snapshots have been created, it will delete the oldest snapshot, shuffle renaming the existing and create a new snapshot, and so on.
Direct your backup process to backup all the snapshot files in the backup folder.
Or direct your backup process to backup just the ADDRESSINATOR.FBK snapshot as that will be the latest snapshot.
It is suggested that you create a Scheduled Task to run the batch file (once it has been edited to reflect your information) to automatically run the file for you
2. Editing the networkFirebirdsnapshot.bat backup file
| 1. | Using NotePad, open the networkFirebirdsnapshot.bat file for editing |
| 2. | Replace the default SYSDBA password “masterkey” with the password you set in the installation of the network Firebird server if you did change it |
| 3. | The networkFirebirdsnapshot.bat file defaults to referring to the path of the database file as C:\AddressinatorData\ADDRESSINATOR.FDB |
| i. | If this is NOT where the Addressinator database file is – than you need to edit the path of where it actually is. |
| ii. | Refer to your aliases.conf file (from the Firebird folder) for the location of your ADDRESSINATOR.FDB database file |
| 4. | The networkFirebirdsnapshot.bat file defaults to referring to the path where the snapshot files will be created as C:\AddressinatorData\backups |
| i. | If this is NOT where you want the snapshot files created at – than you need to edit the path of each line that refers to C:\Data\Addressinator\backups to the actual path where you want these files created |
| 5. | It is recommended that the snapshot files be created to a separate folder than the live Addressinator database file so no confusion for the backup process – no accidental backup of the actual live database file. |
| 6. | Save and close the file |
3. Testing the networkFirebirdsnapshot.bat snapshot backup file
| 1. | Open a command window (select Start -> select Run -> type in cmd -> select OK) |
| 2. | Move to Addressinator program directory |
CD C:\Program Files\Ground Zero Tech-Works Inc\Addressinator
networkFirebirdsnapshot.bat
| 5. | If a message occurs stating an issue and the snapshot does not run, read what the message states, resolve and repeat the above steps until snapshot is successful |
| 6. | Close the command window |
| 7. | Open Windows Explorer and move to the location where you specified the snapshots to be created |
| 8. | Confirm that the snapshot file ADDRESSINATOR.FBK was created. |
4. Creating a Scheduled Task to auto-run the snapshot backup file
| 1. | Once you have confirmed that the edited batch file successfully creates a snapshot of the Addressinator database file, open Control Panel and open Scheduled Tasks |
| 2. | Select Add Scheduled Task to start the task wizard |
| 4. | Browse to the location of the networkFirebirdsnapshot.bat file and select it |
| 5. | Select to perform Daily; select Next |
| 6. | Select a time of day prior to your backup process; select Next |
| 7. | Enter the username and password for the administrator of this computer; select Next |
| 9. | It is recommended that you confirm on a regular basis that the snapshots are actually being created |
| 10. | It is recommended that you confirm on a regular basis that your backup process is backing up the snapshots |
5. Restoring a snapshot backup file
Situation: The Addressinator program is still installed, the network Firebird server is installed, but an issue with the database requires restoring from backup:
| 1. | Ensure no one is accessing the Addressinator database (via the Addressinator program or directly) |
| 2. | Shut down the Firebird services (Control Panel -> Firebird Server Manager -> Stop) |
| 3. | Rename the existing database to ADDRESSINATOR.FDB.BAD |
| a. | Never ever restore overtop of an existing ADDRESSINATOR.FDB database file. |
| 4. | Start the Firebird services (Control Panel -> Firebird Server Manager -> Start) |
| 5. | Restore the snapshot of the database – the ADDRESSINATOR.FBK file using the following: |
| a. | Open a command window (Start -> Run -> cmd) and move to the Firebird program bin folder |
CD C:\Program Files\Firebird\Firebird_1_5\bin
| b. | Extract the Addressinator database file from this restored file using similar to this command line substituting as needed the password, the snapshot file location and file name, and the location to restore the Addressinator database file to: (note enter this all on one line and do not copy – it must be manually typed)(note that if you have changed the username and password you would of course enter in your Firebird username and password) |
gbak -c -v -user SYSDBA -password masterkey C:\AddressinatorData\BACKUPS\ADDRESSINATOR.FBK C:\AddressinatorData\ADDRESSINATOR.FDB
| 6. | Check that the ADDRESSINATOR.FDB file is restored |
| 7. | Log in via the Addressinator program and confirm successful |
Situation: Computer has no previous Addressinator installation (i.e. new server)
| 1. | Perform all the steps of the section “Installation of Addressinator using network Firebird database server” |
| 2. | Log in to the trial Addressinator database and ensure program installation successful |
| 3. | Close out of the Addressinator program |
| 4. | Ensure no other users are not accessing the Addressinator program |
| 5. | Shut down the Firebird services (Control Panel -> Firebird Server Manager -> Stop) |
| 6. | Rename the existing database to ADDRESSINATOR.FDB.TRIAL |
| a. | Never ever restore overtop of an existing ADDRESSINATOR.FDB database file. |
| 7. | Start the Firebird services (Control Panel -> Firebird Server Manager -> Start) |
| 8. | Restore the snapshot of the database – the ADDRESSINATOR.FBK file by the following: |
| a. | Open a command window (Start -> Run -> cmd) and move to the Firebird program bin folder |
CD C:\Program Files\Firebird\Firebird_1_5\bin
| b. | Extract the Addressinator database file from this restored file using similar to this command line substituting as needed the password, the snapshot file location and filename, and the location to restore the Addressinator database file to: (note enter this all on one line - do not copy, it must by typed)(note that if you have changed the username and password you would of course enter in your Firebird username and password) |
gbak -c -v -user SYSDBA -password masterkey C:\AddressinatorData\BACKUPS\ADDRESSINATOR.FBK C:\AddressinatorData\ADDRESSINATOR.FDB
| 9. | Check that the ADDRESSINATOR.FDB file is restored |
| 10. | Log in via the Addressinator program and confirm successful |
|