![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The Informix program provides two methods you can use for backup and retrieval of your StrataView Plus database. These are the Whole-Database method and the Incremental Method.
The Whole-Database method outlined here backs up the whole database at once. While it does not do incremental backups, it is satisfactory for databases requiring only one or two 150-megabyte tapes (the standard Sun tape). Further, this method works for users who want to increase their database size.
The Incremental method allows for root, first-level incremental, and second-level incremental backups. The Incremental method is recommended for users who want to keep constant incremental backups and for users with databases greater than 200 megabytes or so. This method is not usable for users who need to change their database size.
If the Informix database is either full or in danger of being full at a future date, you can create a one-time backup of the database, increase the database's size, and restore the data.
This method is also more convenient than the Incremental method for normal backing up if you have a small (200, or fewer, megabytes) database and do not mind backing up the entire database at once. Proceed as follows:
Step 1 Shut down StrataView Plus by selecting choice 2 from the SV+ main menu.
Step 2 If you are going to change the size of your database, edit the /usr/users/svplus/tbconfig file, changing the ROOTSIZE parameter to the new value.
Step 3 Either log out and log in as informix, or perform an rlogin to Informix.
Step 4 Enter the tbunload command. For example:
tbunload -t /dev/rst0 -s 144000 stratacom
This indicates tape device rst0 and a tape size of 144 megabytes (which is appropriate for a standard 150-megabyte Sun tape). You will be prompted to insert one or more tapes.
Step 5 When this is finished, you have backed up the database. If you do not intend to restore it immediately, your job is done. To restore it, proceed to Step 7. To change the database size, proceed to Step 6.
Step 6 If you are changing the size of the database, log in as superuser, enter the svplus home directory, and enter the INSTALL command. This will re-install the database. Typically, three files will fail the checksum test: start_SV+, svmain, and stat.err. You can ignore these checksum failures, as these files do change subtly during regular use. Say yes to erasing the database, just as though this were a new installation. Another error will appear that can be ignored: "create_db: failure drop database! -371". Proceed to Step 8.
Step 7 To restore this data, log in as informix. Log in as superuser, enter the svplus directory, and erase the existing database. (Normally, you are restoring the old database because corruption or a disk error has occurred; therefore, the current data is not viable.) Enter the following commands in succession: kill_db, init_db, and create_db. Proceed to Step 8.
Step 8 Log out as superuser. This should make you the informix user once again. Enter the informix directory and enter the command dbaccess. The dbaccess program, like other Informix maintenance programs, has menu items at the top of the screen. You can make the appropriate choice by moving to it using the left and right arrow keys, and then pressing <RETURN>, or by typing the first letter of the item. Select Database (either by pressing D or by pressing the right arrow key to Database and then hitting <RETURN>). Next, select Drop. One database will be listed. It is called stratacom. Press <RETURN> to select it. Confirm the database drop by typing Y. You have now dropped the database. Type E twice (for Exit) and you will find yourself back at the Unix prompt.
Step 9 You can now reload the database by using the tbbload command. For example:
tbload -t /dev/rst0 -s 144000 stratacom
This indicates tape device rst0 and a tape size of 144 megabytes.
Step 10 You can now log back in as svplus and run the product with the restored database.
For larger databases, or databases for which the user would prefer incremental backups, the archival process used in the Informix tbmonitor program is recommended. Running this program gives you menus like the ones in the dbaccess program.
For archiving, you do not have to stop the StrataView Plus program. Simply bring up a window, do a remote login (rlogin) to the informix user, and enter the tbmonitor command.
Step 1 Choose A to select Archive, then T for Tape-Parameters. In the tape size field, put the number in kilobytes for the size of your tape. (144000 would be correct for the standard 150-megabyte Sun tape.) Press <ESC> and then C to select Create.
Step 2 You will be asked to insert a tape. Then you will be asked if this is a level 0, 1 or 2 archive. Level 0 archives collect the entire database. Level 1 archives capture everything since the last level 0 archive. Level 2 archives capture everything since the last level 1 archive. Select your archive level. (The first time you do this, it must be level 0.)
Step 3 A highlighted line will be displayed indicating the size of the database space. This is always the total size configured for the database, not the amount of data in the database. Press <control-B> to continue. If it goes for further than one tape, you will be prompted for other tapes. At the end, answer N about backing up logs. When back at the Archive menu, press E <for Exit> twice and log out of the informix user ID. You have now backed up your database. Instructions for restoring the archive begin with Step 4.
Step 4 When you want to restore an archive, you cannot have StrataView Plus running. Also note that the entire database will be replaced with your archive, so any non-archived data will not remain after the restoration. Stop StrataView Plus by entering 2 at the SV+ menu. Perform a remote login (rlogin) to the informix user, and enter tbmonitor.
Step 5 The Informix product must be off-line for a restoration. Choose M (for Mode) and then T (for Take-Offline), then type E (for Exit) to return to the main menu. Informix is now in off-line mode.
Step 6 Choose A (for Archive) and then R (for Restore). If you are restoring a level 2 archive, you will also have to restore levels 0 and 1 corresponding to that archive. If you are restoring a level 1 archive, you will also have to restore level 0. If you are restoring a level 0 archive, you will only have to restore the level 0 tape(s).
Step 7 Insert the level 0 tape(s) first, press <control-B> when ready, insert the tape(s), then answer Y to the "Do you have another level to restore" question if you wish to restore higher-level archives as well. Continue this process with higher-level archives, if you wish to restore them. When back at the Archive menu, enter E (for Exit) to return to the main menu.
Step 8 Informix is now in quiescent mode. Enter M (for Mode) and O (for On-Line), then E (for Exit) twice to exit the tbmonitor program. Log out of the informix user directory. You may now restart StrataView Plus with the restored data.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |