Вы находитесь на странице: 1из 7

Netbackup installs Sybase ASA 9.0.

1 during the master server installation as a private non-shared server for the Netbackup database NBDB. The NBDB contains enterprise media manager database (EMM) data as well as other netbackup data. The same installation of Sybase ASA is used for optional product Bare metal recovery and its associated database (BMRDB). Master server is the default location for EMM server. Since EMM is the primary user of NBDB the netbackup database always resides on the same machine as EMM. For performance issues, EMM and the relational database can be moved on to other system. The following steps are automatically performed during master server installation but can be performed independently after installation. 1. As part of the netbackup master server installation the Sybase ASA 9.0.1 server is created. The server parameters are in set in server.conf file which is located at /usr/openv/var/global/server.conf. 2. The following entry sets the database location and it is added to bp.conf file. VXDBMS_NB_DATA = /usr/openv/db/data 3. The VXDBMS configuration file for netbackup is created. This file requires read and write permissions of root user. /usr/openv/db/data/vxdbms.conf 4. The Netbackup database is created. /usr/openv/db/data/NBDB.DB 5. DBA password is set for the netbackup database in vxdbms.conf file. VXDBMS_NB_PASSWORD = encrypted_password 6. A minimum of 4 additional database files are created with contiguous space preallocated. Netbackup system database file /usr/openv/db/data/NBDB.db The EMM database files /usr/openv/db/data/EMM_DATA.db and /usr/openv/db/data/EMM_INDEX.db Netbackup transaction log necessary for recoverying database /usr/openv/db/data/NBDB.log 7. The Sybase ASA accounts and schema are created for each of the netbackup components the make use of the netbackup database.

8. The command /usr/openv/volmgr/bin/tpext command initializes EMM data. 9. Sybase ASA is installed at /usr/openv/var/global and /usr/openv/db. 10. For performance reasons NBDB can be moved to another host. NBDB must always be on the same host as the EMM server. /usr/openv/var/glolbal/server.conf is read when ASA daemon is started. The ASA daemon gets all the configuration information from this file. /usr/openv/var/global/databases.conf configuration file contains the location of the main database files and database names for automatic startup when the ASA daemon is started. For example if NBDB and BMRDB are both located on the master server in the default locations, databases.conf file contain. "/usr/openv/db/data/NBDB.db" -n NBDB "/usr/openv/db/data/BMRDB.db" -n BMRDB 11. The following two scripts setup the ASA environment and these files are used by other scripts and files. /usr/openv/db/vxdbms_env.csh /usr/openv/db/vxdbms_env.sh 12. The /usr/openv/db/bin/ contatins all ASA commands and Netbackup specific commands. Create_nbdb: Used during installation and upgrade to create and upgrade the netbackup database NBDB. Nbdb_admin: among other things, use nbdb_admin command to change the DBA and netbackup account passwords or to start/start individual databases. Nbdb_backup: Use to make an online or offline backup of ASA database files to a file system directory. Nbdb_move: Use to change the location of ASA database files from default location. Nbdb_ping: Display the status of ASA database. Nbdb_restore: use to recover online or offline backup in a file system directory that was created sing nbdb_backup. Nbdb_unload: use to create a dump of all or part of the NBDB database or the BMRDB database schema and data. Nbdb_start_server: use to start and stop ASA database. Nbdb_upgrade: used internally to upgrade NBDB and BMR databases. 13. 14. The directory /charsets under /usr/openv/db contains ASA-specific information. The directory /data is the default location of the NBDB. It has

NBDB.db > Main Netbackup database file and considered as dbspace. EMM_DATA.db > An additional dbspace that contain EMM data. EMM_INDEX.db > Enhances EMM database performance. NBDB.log > The transaction log for the Netbackup database necessary for recovery. This file is automatically truncated once after a successful full or incremental online, hot or offline cold catalog backup of ASA database. Vxdbms.conf > Contains the configuration information specific to Sybase ASA installation. VXDBMS_NB_SERVER = NB_server_name VXDBMS_NB_PORT = 13785 VXDBMS_NB_DATABASE = NBDB VXDBMS_BMR_DATABASE = BMRDB VXDBMS_NB_DATA = /usr/openv/db/data VXDBMS_NB_INDEX = /usr/openv/db/data VXDBMS_NB_TLOG = /usr/openv/db/data VXDBMS_NB_PASSWORD = encrypted_password The encrypted password that is used to log into both the DBA accounts for NBDB and BMRDB, and other data accounts is stored in vxdbms.conf. Note: The password is set to a default upon installation (nbusql). Symantec recommends that the password is changed after installation 15. 16. 17. 18. 19. 20. The directory /usr/openv/db/lib contatins all ASA shared libraries. The directory also includes ODBC libraries used to connect to NBDB and BMRDB. The directory /usr/openv/db/log contatins ASA server log file server.log that only contains Sybase logs. The directory /usr/openv/db/res contains ASA specific information. The directory /usr/openv/db/scripts contains the ASA sql scripts that are used to create the database. The directory also contains netbackup SQL scripts that are used to create the EMM and other schemas. The directory /usr/openv/db/staging is used as a temporary staging area during online hot catalog backup and recovery. The directory /usr/openv/db/tix contain ASA specific information.

SYBASE ASA SERVER MANAGEMENT ASA database can be started/stopped using any of the below methods. ASA daemon is NB_dbserv. This is included in the netbackup start and stop scripts and will be automatically started or stopped. Use Netbackup activity monitor and use the daemon NB_dbserv to stop/start.

Use /usr/openv/db/bin/nbdbms_start_server starts the ASA server if no option is given. /usr/openv/db/bin/nbdbms_start_server stop f forces the ASA server shutdown with active connections. /usr/openv/db/bin/nbdbms_start_server stat tells whether the server is up or down. NBDB_ADMIN [-start | stop]. This command starts or stops NBDB without shutting down ASA server Use /usr/openv/db/bin/nbdb_admin dba new_password (This command updates vxdbms.conf file with new encrypted password)

MOVING NBDB DATABASE FILES nbdb_move command can be used to change the location of the database files or split the database file into multiple directories to increase the performance incase of large database. This command moves both NBDB and BMRDB if exists. The nbdb_move command can be used at anytime, because it does not drop then recreate database. Thus all data is preserved. To move NBDB and BMRDB database files. 1. 2. 3. 4. Perform Catalog backup Shutdown the netbackup daemons /usr/openv/netbackup/bin/goodies/bp.kill_all start ASA daemon /usr/openv/db/bin/nbdbms_start_stop start Move the existing data, index and transactionlogs

/usr/openv/db/bin/nbdb_move data data_directory index index_directory tlong log_directory 5. Start all netbackup services 6. Perform catalog backup. CREATING NBDB DATABASE The NBDB database is created automatically during the netbackup installation. However it may be necessary during certain catalog recovery situations to create it manually using create_nbdb command. NOTE: if NBDB.db already exists, to run create_nbdb does not overwrite it. To create NBDB database manually. 1. 2. 3. 4. Shutdown all netbackup daemons. Start the ASA daemon /usr/openv/db/bin/nbdbms_start_stop start Run command /usr/openv/db/bin/create_nbdb Start Netbackup services.

The new EMM database is empty and does not contain the EMM data that is loaded during normal installation. Make sure you have most current support for new devices before the data is repopulated. 5. obtain the external_types.txt mapping file from Symantec website. 6. place external_types.txt file in /usr/openv/var/global. 7. Repopulate the EMM data by running the tpext utility which is at /usr/openv/volmbr/bin/ which loads the EMM data into database. Besides using create_nbdb command to create NBDB database, it can also be used to perform the following actions. 8. Drop the existing NBDB database and recreate it in the default location using Create_nbdb drop. The drop option instructs netbackup to drop the existing NBDB database. The location of the current NBDB data directory is retrieved from bp.conf file. 9. Drop the existing NBDB database and do not create by using create_nbdb drop_only 10. Drop the existing NBDB database and create it in the directory specified. #create_nbdb drop data data_direcoty index index_directory tlog log_directory BACKUP AND RECOVERY PROCEDURES Netbackup Catalogs are backed up using one of the following two methods. Hot Catalog backup: This is considered as online as this backup can be performed while regular backup activity takes place. Benefits using this methods are. 1. This method is run using normal backup policy and it is transparent to the customer. This policy can be created using policy or catalog backup wizard. The wizard automatically includes the necessary catalog files to include the database files (NBDB and BMRDB) and any catalog configuration files (vxdbms.conf, server.conf, databases.conf) 2. This method allows to recover entire or pieces of catalog. For example the databases separately from image catalog. 3. This method allows incremental backup also. For Sybase ASA, the incremental backup means a backup of the transaction logs only. Transaction logs are automatically managed and truncated after successful backup. The second method is offline cold backup and this backup can not run when regular backups are in progress. For Sybase ASA the database NBDB and BMRDB are shutdown during cold backup. The default that upgrades to Netbackup 6.5 is offline cold backup only. We need to manually create the hot backup policy.

USING THE ONLINE HOT CATALOG BACKUP Normally a hot catalog backup contain one parent job and two or more child jobs. Events for these logs appear in the dbm log. Hot catalog backup consists of following steps. 1. A temporary copy of database files is made to a stating directory /usr/openv/db/staging. Once staging is done, netbackup can backup the catalog files. 2. A child job backs up following files in a single stream. Configuration files: vxdbms.conf, server.conf, databases.conf Database files : NBDB.db, NBDB.log, EMM_DATA.db, EMM_INDEX.db BMR files if installed: BMRDB.db, BMRDB.log, BMR_DATA.db, BMR_INDEX.db 3. A second child job begins the image catalog files. 4. Transaction logs are truncated after successful full or incremental backup. 5. The child job for relational database is generally run on master server. If NBDB is moved on to media server, relational database child job runs on media server. USING THE OFFLINE COLD BACKUP The netbackup relational database files are included during an offline cold backup. The cold backup contains following steps. 1. The ASA databases are queries for the location of database files associated with the database. In the case of NBDB the following files are dynamically located. NBDB.db, NBDB.log, EMM_DATA.db, EMM_INDEX.db 2. In case of BRM following files are dynamically located. BMRDB.db, BMRDB.log, BMR_DATA.db, BMR_INDEX.db. 3. The database NBDB and BRMDB are shutdown. The Sybase ASA daemon continues to run. 4. The relational database files and image files are backed up. 5. If the backup is successful, transaction logs are truncated and databases are restarted. If the backup failed, databases are restarted without truncating the transaction logs. Even if the NBDB is moved onto media server, cold backup shuts down and start up the database remotely. TRANSACTION LOG MANAGEMENT The transaction log NBDB.log necessary for recovering the database is automatically truncated after a successful catalog backup. The transaction log continues to grow until it becomes truncated. The catalog backup should run frequently so that transaction log file would not fill up the file system. In addition to the default transaction log, a mirror transaction log can be created using /usr/openv/db/bin/nbdb_move -mlogmirrored_log_directory and the log is called mirrored_log_directory/NBDB.m.log.

CATALOG RECOVERY The method that is used to recover the catalog backup in a disaster situation is depends on the method used to backup the catalog. Recover scenario include. A full recovery from a complete disaster using the Disaster recovery wizard in which the databases are restored along with the image catalog to a consistent state. A recovery of database files only using bprecover command the relational database files and and configuration fiels can be recoverd from either an online or offline backup.

SPACE REQUIRED FOR EMM DB The EMM database nbdb requires preallocated space of 60MB. This space is derived from the following separate databases that were consolidated into EMM database in netbackup 6.0 Globdb, ltidevs, robotic_def, namespace.checksun, ruleDB, poolDB, volDB, mediaDB, storage_units, stunit_groups, SSOhosts and media errors database. The space requirement is for the following two locations. /usr/openv/db/data (where NBDB resides) /usr/openv/db/staging (Where NBDB stages during hot catalog backup).