CHAPTER 13 BACKUP.UNET Utility Reference

Previous Chapter : Next Chapter : Top


Table of Contents


This chapter contains the utilities available in BACKUP.UNET that you can use to rebuild and repair the tables in the catalog.

Table 13-1 Catalog Utilities Quick Reference

-------------------------------
For Information About  See Page  
-------------------------------
dbcheck                13-2      
NBKckkey               13-4      
NBKdb_build            13-5      
NBKdb_index            13-7      
NBKfilldb              13-9      
NBKdb_fixup            13-11     
nbk.sqztbl             13-12     
-------------------------------

dbcheck

The dbcheck program allows you to:

If you have run the dbcheck utility and specified a tablename of either BFI or Event, run the NBKdb_fixup utility to set the index pointer to the highest backup ID in the table. See page 13 14 for information on running the NBKdb_fixup utility.

WARNING: You must stop the BRP and IOP daemons prior to running this utility.

Usage

Comments

When you have an empty '.idx' file that you created using NBKdb_index and you are ready to fill it, use dbcheck -ly.

WARNING: When using more than one argument, do not separate them with spaces and use only the first leading dash. For example, if you need the -l and -y options, use -ly.

Arguments

Example

To rebuild the empty 'Pool.idx' file using the data file, enter:

BACKUP.UNET fills the 'Pool.idx' file.


NBKckkey

This utility is used during the installation process to see if installation keys need to be updated.

WARNING: You must stop the BRP and IOP daemons prior to running this utility.

Usage

Arguments

Examples


NBKdb_build

This utility builds BACKUP.UNET database tables (both data, '.dat', and index, '.idx', portions). It is used during the installation of the product and can also be used to regenerate empty tables.

WARNING: The BRP and IOP daemons must be stopped prior to running this utility. If the database tables already exist, NBKdb_build does not overwrite the database table. Additionally, NBKdb_build does not set the ownership or permissions of the tables. This must be done manually after the tables have been created (the installation procedure does this automatically). The tables should be owned by root with a group ID of the BACKUP.UNET group. The permissions must be changed to rw rw-r or 664.

Usage

Arguments

Example

To build all of the BACKUP.UNET database tables, enter:

BACKUP.UNET builds the tables.


NBKdb_index

If an '.idx' file is damaged or corrupted to the point where it cannot be used, or cannot be repaired with the dbcheck utility, the file can be rebuilt using NBKdb_index.

If you have run the NBKdb_index utility and specified a tablename of either BFI or Event, run the NBKdb_fixup utility to set the index pointer to the highest backup ID in the table. See page 13 14 for information on running the NBKdb_fixup utility.

WARNING: The BRP and IOP daemons must be stopped prior to running this utility. If an '.idx' file already exists, NBKdb_index does not write over it. Additionally, NBKdb_index does not set the ownership or permissions of the tables. This must be done manually after the tables have been created (the installation procedure does this automatically). The tables should be owned by root with a group ID of the BACKUP.UNET group. The permissions must be changed to rw rw r or 664.

Usage

Argument

Example

To build a new table index file, delete the existing (corrupted) index file (for example, 'Pool.idx'). Then enter the following:

BACKUP.UNET builds a new 'Pool.idx' file. This new file is empty. To fill it, you must use the NBKfilldb utility, which is described on page 13 12.


NBKfilldb

This utility is normally used by the install command to fill the global database tables on the executing host with pre existing global data. It copies the host tables ('Operator', 'Sys', 'Pool', and 'SysPool') from the BRP or IOP daemon on another BACKUP.UNET host to the local host.

WARNING: This utility should only be used with the assistance of MTI Customer Support. Additionally, the BRP and IOP daemons must be stopped prior to running this utility.

Usage

Arguments

Example

To get the host table information from host 'loki', which is running a BRP, to the local host, enter:


NBKdb_fixup

This utility should only be used if either the BACKUP.UNET BFI or Event table is rebuilt using dbcheck -ly and NBKdb_index. This utility allows you to set the index pointer to the largest value of the specified table.

Each backup has a unique backup ID. BACKUP.UNET uses internal pointers to keep track of all backup IDs. When rebuilding the index table, it is important to set the index pointer to the highest backup ID to avoid duplication of these IDs. If backup IDs are duplicated, a backup operation will abort with error (100) EDUPL.

WARNING: You must stop the BRP and IOP daemons prior to running this utility.

Usage

Example

You have just used the dbcheck -ly utility to rebuild the Event table. The highest backup ID in the table is 21. Enter the following command:

BACKUP.UNET resets the index pointer to 21. Your next backup operation will start at ID 22. (If you did not reset the index pointer using the NBKdb_fixup utility, your next backup operation would start at ID 1. Each subsequent backup operation would increment the backup ID by 1, eventually duplicating backup IDs.)


nbk.sqztbl

This utility copies the contents of a CISAM table. Since the deleted records in the table will not be copied, this will "squeeze" the dead space out of a CISAM table.

Note: You must be root to run this utility. There must be sufficient space on the file system containing the BACKUP.UNET home directory to allow another copy to be created of the '.dat' and '.idx' files to be squeezed. The daemons are automatically brought down during execution of this utility. Additionally, the BACKUP.UNET program directory must be in the path. The NBK environment variable must be set to the BACKUP.UNET home directory.

Usage

Arguments

Example

To copy the contents of the Pool table enter the following command:

This command stops the IOP and BRP daemons, if they are active, and copies the Pool table files (for example, 'Pool.dat' and 'Pool.idx') to temporary files. The temporary files will be "squeezed." The original files are renamed ('Pool.olddat' and 'Pool.oldidx') and the temporary files are moved back to the original file names.