Backing up your Fitrix Complete System
1. Making a Complete Fitrix Backup (basic method):
Your entire Fitrix Complete software and databases are completely contained in a file structure which is pointed to from the ‘/fitrix’ link. To backup all of Fitrix (programs and data), just shut down all of the database instances (see below) and copy all of ‘/fitrix’ to your backup media. Be sure to use a copy command that preserves all file permissions.
Your Linux systems administrator will determine the appropriate backup media and methods, but here is an example of making a full backup of Fitrix programs and data to tape on a Red Hat Enterprise Linux version 5 system:
First, have all users log completely out of all Fitrix applications
Next shut down all databases or reboot the Linux server (see instructions below)
login as root
cd /fitrix
tar cvf /dev/tape . (‘dev/tape’ will vary depending on your system)
Be sure to verify your backup media
2. Shutting down your Fitrix Database Instances:
Unless you are using an advanced IDS database backup method, it is critical to shut down each of your Fitrix database instances before making your backup. Failure to shut down a database instance will result in a corrupt copy of the database.
To do this:
1. have all users log completely out of all Fitrix applications
2. log into your Linux server as ‘root’ and access the ‘#’ prompt
3. to bring down the database instances in the ‘production’ environment:
. /fitrix/bin/fg_env_prod.sh
onmode –ky
4. to bring down the database instances in the ‘development’ environment:
. /fitrix/bin/fg_env_dev.sh
onmode –ky
5. to bring down the database instances in the ‘training’ environment:
. /fitrix/bin/fg_env_train.sh
onmode –ky
An alternate method of shutting down the database instances is to shutdown and restart your Linux server. Shutting down your Linux server will shut down the Fitrix database instances and the databases will remain shutdown until someone logs in to Fitrix.
There is no need to bring the databases back up. The Fitrix user login will automatically start the database instance if it is not running. The first user to log-in will notice a short delay while the database instance is starting.
3. Backing up only the database(s) (for advanced
users)
To backup only the data, you will need to identify the specific database instance or database to backup. Within each Fitrix environment (production, development, training) there is a ‘data’ folder where the databases for that environment are located. Each environment contains one database ‘instance’ that contains all databases for the environment. The database instance is a proprietary file structure that appears as a single file in Linux. We recommend that you backup the entire data folder structure which will contain the entire database instance and all databases for the environment. These are:
/fitrix/fx_prod/data
/fitrix/fx_dev/data
/fitrix/fx_train/data
Before making a backup, you will need to shut down the database instances.
The above backup method obtains an image backup of the database instance that can only be restored in its entirety and only to the exact original location. An alternate and more flexible backup method is to create an export of each database to ascii delimited flat files which can then be copied to your backup media. To create an export of a database:
1) have all users log completely out of all Fitrix applications
2) DO NOT bring down the database instance, it must be up for this process
3) login as ‘root’ or ‘informix’
4) . /fitrix/bin/fg_env_prod.sh (access the desired environment: prod, dev, or train)
5) cd /fitrix/fx_prod/data (navigate to the desired data folder: prod, dev, or train)
6) dbexport –d live (specify the name of the database to export, in this example ‘live’)
This will create a folder named live.exp that will contain a complete export of your database including data, schema, and permissions. Copy this (????.exp) folder to your backup media and you will have a complete backup of that database that can be restored in full or in part and to any location or version of Fitrix but requires a database administrator to make the recovery.
4. Recovering a Fitrix backup
To recover a Fitrix backup made using the ‘basic’ method above, bring down the databases and either restore all of Fitrix (/fitrix), or just the database instance in question (‘??/data’) by copying your backup files to their original locations.
Please note that if you are recovering a backup of ‘/fitrix’ or ‘/fitrix/fx_????/data’ you will need to recover to the exact original location. You are working with an image backup of the database and somewhere within this image is record of the exact file location of itself which it requires to operate.
To recover a backup made using any method other that the basic method defined above, consult your database administrator.
5. Additional Backup Guidelines
There are many strategies for managing backups and many backup devices (tape, removable hard drive, internet, flash drive, …). Your Linux systems administrator will recommend a strategy that is best for you. We do suggest the following guidelines:
1. Backup at least your databases at least 5 nights per week.
2. Maintain at least the previous 5 nightly backups so that you can recover from any of these.
3. Keep at least 3 recent copies of your backups off site (typically this is your last 3 Friday/weekly backups)
4. Verify your backup every night to confirm that the media is readable
5. Practice recovering from a backup at least twice a year to confirm your backup strategy
6. Review your backup strategy at least once a quarter.
6. Advanced Backup Methods
For advanced users: Fitrix uses the IBM/Informix IDS database. This is a very robust fully featured SQL relational database product. There are many more sophisticated backup methodologies available to trained IDS database administrators including the ability to make continuous ‘on-line’ backups that allow 24x7 database operations. IBM offers a full compliment of training classes for IDS DBA’s and Fourth Generation also offers DBA consulting services.