maxdb backup recovery
TRANSCRIPT
-
8/11/2019 Maxdb Backup Recovery
1/44
VERITAS Software Page 1 of 44
MaxDB Database Backup and Recovery White Paper
Creating Backup Environment Variable and Configuration Files.....................................2Environment Variable................................................................................................................. 2Backint Configuration File ......................................................................................................... 4
Backint Parameter File................................................................................................................ 5NetBackup MaxDB Configuration File...................................................................................... 6
Defining Backup Medium in MaxDB................................................................................ 6Creating Medium from the Command Line................................................................................ 6Creating Medium from the MaxDB GUI.................................................................................... 7
Creating a MaxDB Backup Policy ................................................................................. 12Performing a Backup of a MaxDB Database................................................................. 12
Running Backups from the Command Prompt......................................................................... 12Running Backups from the NetBackup Administrative Console ............................................. 12
Script information ................................................................................................................. 12
Automating Backups via NetBackup Scheduling................................................................. 13
Manually Initiating Backups from the NetBackup Administrative Console........................ 14Performing a Restore of a MaxDB Database ................................................................ 14
Restoring a database from the command prompt ..................................................................... 15Collecting Media IDs............................................................................................................ 15
Executing Database Restore ................................................................................................. 15
Restoring a Database From the MaxDB GUI........................................................................... 17
Restoring Databases to a New Database Name and/or Database Server....................17Configure NetBackup Security for Alternate Client Restores.................................................. 17
No.Restrictions...................................................................................................................... 17
Peername............................................................................................................................... 18Create MaxDB database for recovery....................................................................................... 18
Move MaxDB Backup History Files to New Database Directory............................................ 28Execute Restore ........................................................................................................................ 28
Troubleshooting ............................................................................................................ 34Error if BSI_ENV does not point to the right file or file is missing......................................... 34
Error if Backint config file does not point to the right parameter file ...................................... 34Error if Backint config file points to wrong backint.exe (the NBU backint) ........................... 35
Error if backint parameter file points to the wrong NetBackup configuration file................... 37
Error if the backint parameter file points to the wrong backint.exe file ................................... 37
Error if wrong backup medium name is used. .......................................................................... 38Error if staging area is omitted from parameter file ................................................................. 38
Errors if restore is attempted with an expired NetBackup image ............................................. 39
Script errors............................................................................................................................... 40Synchronizing Expired NetBackup Images with the MaxDB Backup History........................ 40
Switching the Operating System ................................................................................... 43Web Database Interface................................................................................................ 43
-
8/11/2019 Maxdb Backup Recovery
2/44
VERITAS Software Page 2 of 44
Creating Backup Environment Variable and ConfigurationFilesAfter installing MaxDB (originally SAPDB) and the NetBackup for MaxDB Database
Extension, there are three files to create, and an environment variable to set.
Environment Variable
Create the environment variable in Windows by right-clicking on My Computer and selecting
Properties.
From the Advanced tab, click on the Environment Variables button.
-
8/11/2019 Maxdb Backup Recovery
3/44
VERITAS Software Page 3 of 44
Create a new System variable called BSI_ENV. The value of this variable is the location and
name of the Backint configuration file.
-
8/11/2019 Maxdb Backup Recovery
4/44
VERITAS Software Page 4 of 44
Backint Configuration File
The backint configuration file may have any name, and may be placed in any directory. Its nameand location, however, must be exactly as specified in the BSI_ENV variable. The file is
composedof a combination of variables and their associated values, separated by a space.
Possible variables in the backint configuration file are:
Parameter DescriptionBACKINT \ Absolute path and name of the backint
program that is installed with MaxDB
INPUT \ Absolute path and name of the standard input
file
OUTPUT \ Absolute path and name of the standard output
file
ERROROUTPUT
\
Absolute path and name of the standard error
output file
PARAMETERFILE\
Absolute path and name of the configurationfile of the backint for MaxDB program
TIMEOUT_SUCCESS Time in seconds that the Database Manager
waits for the end of the started Backint for
MaxDB if action is successful
TIMEOUT_FAILURE Time in seconds that the Database Manager
waits for the end of the started backint forMaxDB if errors occur
ORIGINAL_RUNDIRECTORY
Absolute path of the run directory of the source
database
For a detailed description of these parameters, see the MaxDB documentation, available athttp://www.mysql.com/products/maxdb/.
The backint configuration file must contain the variables BACKINT, INPUT, OUTPUT,
ERROROUTPUT, and PARAMETERFILE.
The following is an example of a file with the minimum configuration specified:
BACKINT c:\sdb\7500\bin\backint.exeINPUT c:\veritas\netbackup\dbext\sap\backint.inputOUTPUT c:\veritas\netbackup\dbext\sap\backint.output
ERROROUTPUT c:\veritas\netbackup\dbext\sap\backint.errorPARAMETERFILE c:\veritas\netbackup\dbext\sap\backint_parameter.txt
Please be aware, the backint information is the absolute path and name of the backint executable
which is installed by MaxDB, NOTthe one installed by Veritas.
-
8/11/2019 Maxdb Backup Recovery
5/44
VERITAS Software Page 5 of 44
Backint Parameter File
Like the backint configuration file, the backint parameter file may have any name, and may be
placed in any directory. Its name and location is defined in the backint configuration file with
the PARAMETERFILE variable. Using the above example of a backint configuration file, thebackint parameter file is called backint_parameter.txt and is located in the c:\
veritas\netbackup\dbext\sap directory.
Similar to the backint configuration file, the backint parameter file consists of a series of
variables and their values. The difference is these variables are separated from their values with
a colon. The possible variables for the backint parameter file are as follows:
Parameter DescriptionSTAGING AREA:
\[KB|MB|GB]
Absolute path and size of a temporary file
FILES PER BACKINT CALL: Maximum number of temporary files that are
to be processed by backintBACKINT: \ Absolute path and name of the backint
executable installed by NetBackup
PARAMETERFILE OF
BACKINT:\
Absolute path and name of the configuration
file for the backint
HISTORY FILE:
\
Absolute path and name of the backup history
INPUTFILE FOR BACKINT:
\
Absolute path and name of the standard input
file
OUTPUT FILE FOR
BACKINT:\
Absolute path and name of the standard output
file
ERRORFILE FOR BACKINT:\
Absolute path and name of the standard erroroutput file
MAXIMAL DELAY OF BACKINT CALL:
Maximum waiting time in seconds between
creating a temporary file and starting to save it
by using backint
OMIT LAST DIRECTORY DELIMITER ON
RESTORE:
Specifies whether the SAPDB adapter program
ignores the closing slash (\) of an absolutedirectory name for backint.
BI_CALLER_VALUE: Value of the environment variableBI_CALLER
For a detailed description of these parameters, see the MaxDB documentation, available athttp://www.mysql.com/products/maxdb/.
The backint parameter file must contain the variables BACKINT, PARAMETERFILE OF
BACKINT, HISTORY FILE, INPUTFILE FOR BACKINT, OUTPUTFILE FOR BACKINT,ERRORFILE FOR BACKINT.
-
8/11/2019 Maxdb Backup Recovery
6/44
VERITAS Software Page 6 of 44
The following is an example of a file with the minimum configuration specified:
BACKINT: c:\veritas\netbackup\bin\backint.exePARAMETERFILE OF BACKINT: C:\VERITAS\NetBackup\DbExt\SAP\initDEMO.utlHISTORY FILE: c:\veritas\netbackup\dbext\sap\backinthistory.logINPUTFILE FOR BACKINT: c:\veritas\netbackup\dbext\sap\backintoracle.inOUTPUTFILE FOR BACKINT: c:\veritas\netbackup\dbext\sap\backintoracle.out
ERRORFILE FOR BACKINT: c:\veritas\netbackup\dbext\sap\backintoracle.errSTAGING AREA: C:\VERITAS\NetBackup\DbExt\SAP\stage1 100 MB
REMEMBER The variables and their values must be separated with a colon (:).
NetBackup MaxDB Configuration File
Like the previous files, the NetBackup configuration file may have any name, and may be placed
in any directory. Its name and location is defined with the PARAMETERFILE OF BACKINT
variable in the Backint parameter file. Following the above sample file as an example, the file in
this case is called initDEMO.utl, and is located in the C:\VERITAS\NetBackup\DbExt\SAP\directory.
It must contain the variables switch_list, switch_sem, switch_log, and may requirepolicy.
A sample configuration file is included with NetBackup, and is found in the\VERITAS\NetBackup\DbExt\SAP\samples directory, and is named
initSAP.utl.
The following is an example of a file with the minimum configuration specified:
switch_list C:\sdb\data\wrk\DEMO\switch.listswitch_sem C:\sdb\data\wrk\DEMO\switch.sem
switch_log C:\sdb\data\wrk\DEMO\switch.logpolicy maxdb_hot_backup
Defining Backup Medium in MaxDBIn order to run backups, at least one backup medium per backup type (complete, incremental)must be created. The backup medium type must be PIPE and the backup medium name must
begin with the word BACK. Backup medium can be created either from the command line or
from within the MaxDB Database Manager GUI.
Creating Medium from the Command Line
From a command prompt, change to the directory containing the dbmcli.exe binary, and execute
the following command to connect to the database:
dbmcli -d -u ,
By default, the user ID and password are set to dbm. So for a database called DEMO, the
command is:
dbmcli -d DEMO -u dbm,dbm
-
8/11/2019 Maxdb Backup Recovery
7/44
VERITAS Software Page 7 of 44
This establishes a connection to the database, and opens the dbmcli on command
prompt. From this prompt, run the command:
medium_put \\.\pipe\ PIPE
For example, to create a medium called BACKDEMO for full backups in a database called
DEMO, the command is:
medium_put BACKDEMO \\.\pipe\DEMO PIPE DATA 0 8
To create a medium called BACKDEMOINCR for incremental backups in a database called
DEMO, the command is:
medium_put BACKDEMOINCR \\.\pipe\DEMO PIPE PAGES 0 8
For more information on the medium_put command and creating backup medium, see the
MaxDB documentation, available at http://www.mysql.com/products/maxdb/
Creating Medium from the MaxDB GUI
To create medium for NetBackup using the MaxDB GUI, start by opening the interface, and
selecting Backup under database options, and then Backup Medium.
-
8/11/2019 Maxdb Backup Recovery
8/44
VERITAS Software Page 8 of 44
In the Backup Medium window, right click on an empty part of the window, and select NewMedium.
-
8/11/2019 Maxdb Backup Recovery
9/44
-
8/11/2019 Maxdb Backup Recovery
10/44
VERITAS Software Page 10 of 44
Finally, the name must begin with the word BACK
On the Extended tab, you can specify
Size: Specify the size of the backup medium (It is unknown if this applies to a devicetype of PIPE.)
Overwrite: Allows the backup to overwrite the medium. (It is unknown if this applies to adevice type of PIPE.)
Blocksize: Select the Blocksize option to allow the backup to write in blocks of up toeight pages. (This may allow for performance enhancement.)
Autoloader: Specify this option to use a tape device with an autoloader feature. (This
does not appear to be relevant to NetBackup.)
OS Command: Allows operating system commands to be run when running backups totape. (This does not appear to be relevant to NetBackup.)
For detailed information on these options, contact MaxDB support or review the MaxDB web
page at http://www.mysql.com/products/maxdb/
-
8/11/2019 Maxdb Backup Recovery
11/44
VERITAS Software Page 11 of 44
Veritas Support recommends leaving these options set to their default.
After creating the backup medium, the window looks like the following:
-
8/11/2019 Maxdb Backup Recovery
12/44
VERITAS Software Page 12 of 44
Creating a MaxDB Backup Policy
Creation of policies is covered in the VERITAS NetBackup 5.1 for SAP System AdministratorsGuide for Windows, found at http://seer.support.veritas.com/docs/268101.htm, on pages 19
through 28 (for Windows master servers) or pages 32 through 42 (for Unix master servers)
Please refer to this guide for the setup of the MaxDB policy. Please note the script information
is different, and is outlined later in this guide.
Performing a Backup of a MaxDB DatabaseBackups may be run either from the command prompt, or from within the NetBackup
administration console as either scheduled or manually initiated backups. When running a
backup of MaxDB, the command issued must include the name of the backup medium.Additionally a utility session must be started before running a backup. To learn more about
utility sessions refer to MaxDB documentation at http://www.mysql.com/products/maxdb/.
Running Backups from the Command Prompt1. Connect to the database with the command dbmcli -d -u
,. For a database DEMO:dbmcli -d DEMO -u dbm,dbm
2. Then, from the database command prompt, start a utility session with the util_connectcommand.dbmcli on DEMO> util_connect
3. Finally, issue the backup command, backup_start . For
a medium named BACKDEMO which is of a type Complete, the command is:dbmcli on DEMO> backup_start BACKDEMO DATA
Running Backups from the NetBackup Administrative Console
Script information
In order to automate backups of MaxDB databases or initiate a backup from the master server, a
backup script must be created and listed in the MaxDB backup policy. The backup script needs
to perform three functions: connect to the database, start a utility session, and then backup thedatabase. The scripts basic format is as follows:
dbmcli -u , -d -uUTL , backup_start
The dbmcli -u , -d connects the user to the database, -
uUTL , starts the utility session, and backup_start launches the backup.
-
8/11/2019 Maxdb Backup Recovery
13/44
VERITAS Software Page 13 of 44
For example, if the user and password are still set to the default (dbm, dbm), the database iscalled DEMO, and the backup medium for full backups is called BACKDEMO, the
command to start the backup would be:
dbmcli -u dbm,dbm -d DEMO -uUTL dbm,dbm backup_start BACKDEMO DATA
This is the only line required in the backup script. By entering this information into a file with a
.cmd extension, the file may be used in a NetBackup policy.
For more information on MaxDB scripting options, contact MaxDB support or review theMaxDB web page at http://www.mysql.com/products/maxdb/
Automating Backups via NetBackup Scheduling
NetBackup MaxDB policies must have two schedules, an Application Backup schedule and an
Automatic Backup schedule.
The Application Backup schedule is created by default when a MaxDB policy is created, and is
open 24 hours a day, seven days a week. This schedule creates a window in which backups can
run, not when the backup will actually run. Veritas support recommends leaving this schedulealone, and not modifying it. Changes to this schedule can cause the backups to fail with a status199, Operation not allowed during this time period.
The other type of backup schedule is the Automatic Backup schedule, which is the schedule
which actually initiates the automatic backup. So, for example, to have the backup run once aweek on Monday nights between 6 and 8 PM, the Automatic Backup schedule should be open
from 6 to 8 PM on Monday.
NOTE: To change the retention level of the MaxDB backup, change the retention of the
Application Backup schedule.
-
8/11/2019 Maxdb Backup Recovery
14/44
VERITAS Software Page 14 of 44
Manually Initiating Backups from the NetBackup Administrative Console
Once the policy is created, to manually initiate a backup from the master server, open the
NetBackup Administrative Console, and find the MaxDB policy. Then, right click on the policy,
and specify Manual Backup. This initiates the manual backup.
Performing a Restore of a MaxDB DatabaseDatabase restores can be initiated from either the command line or the MaxDB GUI. Please note
per the MaxDB documentation, when recovering a database, it must be in the operational state
ADMIN. If the database instance is in the ONLINE operational state, it must first be transferredto the OFFLINE operational state and then to the ADMIN operational state.
Operational State MeaningONLINE The database instance has been started, and users can log on.STANDBY For standby instances in hot standby systems only. Standby instances
cannot accept any connections. They are constantly in a restart state.
ADMIN The database instance is only available for database administration work.
OFFLINE The database instance is not running.
-
8/11/2019 Maxdb Backup Recovery
15/44
VERITAS Software Page 15 of 44
Restoring a database from the command prompt
Restores from the command line are a two-step process. First, a listing of the available media
IDs is collected. Then, the restore command is issued, specifying the medium to use.
Collecting Media IDsCollecting media IDs is done with the backup_ext_ids_get command; media IDs are displayed
with the backup_ext_ids_list command.
1. Connect to the database with the dbmcli command (dbmcli -d -u
,).dbmcli -d DEMO -u dbm,dbm
2. From the dbmcli on prompt, execute the backup_ext_ids_get command
with the following switches:backup_ext_ids_get
So, for a server called Server_MaxDB with a database called DEMO, and a medium
called BACKDEMO, the command would be:dbmcli on DEMO> backup_ext_ids_get BACKDEMO DEMOServer_MaxDB
3. Display the available media IDs, execute the command backup_ext_ids_list.dbmcli on DEMO> backup_ext_ids_list
The series of commands looks like the following:
dbmcli -d DEMO -u dbm,dbm
dbmcli on DEMO> backup_ext_ids_get OK
dbmcli on DEMO>backup_ext_ids_listOKENDAVAILABLE|DEMO NS1088526040 \\.\pipe\DEMO|DATA MIGRATION|2004-06-29 11:20:32|AVAILABLE|DEMO NS1088536685 \\.\pipe\DEMO|DATA MIGRATION|2004-06-29 14:17:58|
Executing Database Restore
After collecting the media IDs available for database restore, the restore is performed from the
command line after establishing a utility session.
NOTE:Per the MaxDB documentation, when recovering a database, it must be in the operational
state ADMIN.
Action Desired Command issuedStopping the Database Instance db_stop
Transferring to the ADMIN Operational State db_admin
Transferring to the OFFLINE Operational State db_offline
Transferring to the ONLINE Operational State db_online
Transferring to the STANDBY Operational State db_standby
-
8/11/2019 Maxdb Backup Recovery
16/44
VERITAS Software Page 16 of 44
After placing the database into an ADMIN status, from the dbmcli on commandprompt, the command is util_connect.
dbmcli on DEMO> util_connect
The restore command is recover_start, and requires the backup medium name, the type of
backup which was performed, and the backup media ID. The sequence is as follows:
recover_start ExternalBackupId
Using the above listing, and the backup medium name BACKDEMO, the command issued is:
dbmcli on DEMO> recover_start BACKDEMO DATA ExternalBackupId DEMONS1088526040 \\.\pipe\DEMO
NOTE: Since the media ID name contains a space, the ID string needs to be enclosed in quotation
marks.
A successful restore displays something similar to the following:
dbmcli on DEMO>recover_start BACKDEMO DATA ExternalBackupId DEMO NS1088526040\\.\pipe\DEMOOKReturncode 0Date 20040630Time 00133545Server server.domain.comDatabase DEMOKernel Version Kernel 7.5.0 Build 014-123-073-298Pages Transferred 240Pages Left 0Volumes 1Medianame BACKDEMOLocation \\.\pipe\DEMOErrortextLabel DAT_00022Is Consistent trueFirst LOG Page 1098Last LOG PageDB Stamp 1 Date 20040629DB Stamp 1 Time 00112032DB Stamp 2 DateDB Stamp 2 TimePage Count 224Devices Used 1Database ID server.domain.com:DEMO_20040616_155125
Max Used Data Page 0
-
8/11/2019 Maxdb Backup Recovery
17/44
VERITAS Software Page 17 of 44
Restoring a Database From the MaxDB GUI
MaxDB databases can also be restored from the MaxDB Database Manager GUI using backupstaken by NetBackup. The procedure and screen images are the same as those shown later in the
guide, under Execute Restore in the Restoring Databases to a New Database Name and/or
Database Server section. Please refer to those images for assistance restoring a database usingthe MaxDB GUI.
Restoring Databases to a New Database Name and/orDatabase ServerRestoring a database to either a new database name or to a new database server (alternate client
restore or redirected restore) requires several steps be completed or the restore will fail to
execute. It is important to know the name of the original backup medium, and have copies ofdbm.ebf, dbm.knl, dbm.mdf files from original instance. Without this information, the database
cannot be restored.
A brief overview is shown below, with details following.
Overview:
Configure NetBackup security for alternate client restores. (No.Restrictions or peername)Create instance for recovery
Create backup medium that matches original backup medium
Start instance in ADMIN stateCopy over dbm.ebf, dbm.knl, dbm.mdf files from source db to new instance
Start recovery wizard
Select initialize instance
Select backup set to restoreStart restore
When successful, start instance
Recovery successful.
Configure NetBackup Security for Alternate Client Restores
To allow one client to restore databases from another client, either the use of the
No.Restrictions file, or the use of peername file is required.
No.Restrictions
Use of the No.Restrictions file allows any client to perform an alternate client restore of anyclients data. To allow this, create an empty file called No.Restrictions in the directory path
\NetBackup\db\altnames\ on the master server (in the
/usr/openv/netbackup/db/altnamesdirectory on a Unix master server).
NOTE:Do not add a suffix to the files created in the altnames directory.
-
8/11/2019 Maxdb Backup Recovery
18/44
VERITAS Software Page 18 of 44
Peername
Allowing a single client to perform redirected restores is enabled by the creation of an empty file
peernamein the \NetBackup\db\altnames\ directory of the master server,wherepeernameis the name of the client which can access files backed up by a different server.
For example, if the administrator wanted the client Freddie to restore files which were backed upby another client Oscar, then it would be necessary to create the following file on the master
server: \NetBackup\db\altnames\freddie
Create MaxDB database for recovery
Like the standard database restore, when creating a database for an alternate client restore, thedatabase must be placed in ADMIN status.
Additionally, in the recovery database, a backup medium must be created which has the same
name as the source database. If the backup medium for the original database was BACKDEMO,be sure to create a backup medium, of a type PIPE called BACKDEMO in the new database.
The following series of screen captures shows the step-by-step procedure to create a database forrecovery, using the wizard in the MaxDB GUI. By default, this procedure places the database
into an ADMIN state, ready for recovery.
1. Start by clicking on the Create to create a new database instance
-
8/11/2019 Maxdb Backup Recovery
19/44
VERITAS Software Page 19 of 44
2. Click on Next to continue on the installation wizard
3. Select the template desired for creation of the database. This example uses the Blank
template. Click Next to continue.
-
8/11/2019 Maxdb Backup Recovery
20/44
VERITAS Software Page 20 of 44
4. Provide a database name (in this example, RECOVER is used). A port number isunnecessary. Click Next to continue.
5. If there is more than one version of MaxDB installed, select the version to use, and click
on Next.
-
8/11/2019 Maxdb Backup Recovery
21/44
VERITAS Software Page 21 of 44
6. As necessary, select the startup option for the database. In this example, the startdatabase service automatically was not selected. Click Next to continue.
7. Create the database manager user name and password. The default is dbm, dbm,
however, on this screen, it is possible to change that option. In this example, the defaultwas accepted. Click Next to continue.
-
8/11/2019 Maxdb Backup Recovery
22/44
VERITAS Software Page 22 of 44
8. If necessary, modify the initialization parameters. For this example, the default valueswere used. Click Next to continue.
9. This screen allows the user to specify the instance type. The default is OLTP. Click
Next to continue.
-
8/11/2019 Maxdb Backup Recovery
23/44
VERITAS Software Page 23 of 44
10. The next two screens show the database instance parameters. Adjust them if necessary.In this example, the defaults were accepted. Click Next to continue.
-
8/11/2019 Maxdb Backup Recovery
24/44
VERITAS Software Page 24 of 44
11. In the next three images, the volumes for the database are setup. Click Next tocontinue.
-
8/11/2019 Maxdb Backup Recovery
25/44
VERITAS Software Page 25 of 44
-
8/11/2019 Maxdb Backup Recovery
26/44
VERITAS Software Page 26 of 44
12. At this point, information about the backup medium needs to be entered. Here is where itis necessary to fill in the information about the backup medium from the original (source)
database. In this example, the source database was called DEMO and the backup
medium in the database was BACKDEMO. Please notice how this is setup in thescreen captures. Click Next to continue.
-
8/11/2019 Maxdb Backup Recovery
27/44
VERITAS Software Page 27 of 44
13. On the Create Database Instance interface, be sure to select the option Create instancefor recovery. Click Next to continue.
14. Finally, click Start to create the database instance.
-
8/11/2019 Maxdb Backup Recovery
28/44
VERITAS Software Page 28 of 44
15. When finished, the GUI displays the instance is successfully created, and prompts toclick Next to start the recovery process. Please note do NOT click on Next, as there
are additional steps necessary in order to successfully restore the database.
Move MaxDB Backup History Files to New Database Directory
There are three files in each MaxDB database which contain information about the backup
history. As such, when creating a database for recovery, these files need to be copied from theoriginal database directory structure to the new database directory structure.
Go to the \sdb\data\wrk\directory, and find the following three
files: dbm.knl, dbm.mdf, dbm.ebf. These files need to be copied to the
\sdb\data\wrk\ directory. For example, if the original database
is called DEMO and the recovery database is called RECOVER, copy the dbm.knl,dbm.mdf, and dbm.ebf files from the \sdb\data\wrk\DEMOdirectory into the
\sdb\data\wrk\RECOVER directory.
Execute Restore
Once the database instance is created for recovery and in an ADMIN status, and the backuphistory files are moved to the appropriate directory, the database is ready for restore andrecovery. The following screen captures show the step-by-step procedure to restore and recover
the database using the MaxDB GUI.
-
8/11/2019 Maxdb Backup Recovery
29/44
VERITAS Software Page 29 of 44
1. Begin by selecting the database, and under the Recovery section, selecting theRecovery Wizard.
2. This launches the Recovery Wizard. Click on Next to continue.
-
8/11/2019 Maxdb Backup Recovery
30/44
VERITAS Software Page 30 of 44
3. On the Restore Database Instance screen, be sure to select the option to initialize thedatabase before restore. This allows the restore to overwrite the existing database
information. Click on Next to continue.
4. Select the option to restore a specified backup from history. Click on Next to continue.
-
8/11/2019 Maxdb Backup Recovery
31/44
VERITAS Software Page 31 of 44
5. MaxDB retrieves a list of available backups, and indicates the name of the medium, andif logs are required. Specify the backup to restore, and click on Next to continue.
6. MaxDB requests confirmation the correct medium was selected. Confirm this is correct,
and click on Start to begin the restore.
-
8/11/2019 Maxdb Backup Recovery
32/44
VERITAS Software Page 32 of 44
7. MaxDB requests confirmation to initialize the database in the recovery process. Click onYes to start the restore.
8. The restore starts, and displays the amount of data transferred.
-
8/11/2019 Maxdb Backup Recovery
33/44
VERITAS Software Page 33 of 44
9. When the restore is finished successfully, the interface provides an option to restart thedatabase. Click on Restart to restart the database.
10. MaxDB confirms the database was successfully restarted. Click Close to finish the
recovery.
-
8/11/2019 Maxdb Backup Recovery
34/44
VERITAS Software Page 34 of 44
TroubleshootingIn troubleshooting MaxDB backups and restores, there are two general files to review; one
created by MaxDB, one created by NetBackup. The MaxDB log file is the dbm.ebp file, located
in the \sdb\data\wrk\ directory. This file captures
information about what occurs on the MaxDB side of the backup and restore. The backint log
file (created by placing a backint folder in the \veritas\netbackup\logs directory) logs information regarding the NetBackup side of the backup and restore.
Additionally, it should be observed nearly all MaxDB database backups fail with a Status 29. As
such, it is generally necessary to collect log files in order to properly assess the problem andrecommend an appropriate solution.
Error if BSI_ENV does not point to the right file or file is missing
NetBackup Error: Status 29 - failed trying to exec a command. A command could not be
executed. This can occur because the permissions of the command do not allow it to be executed,
or there is lack of system resources such as memory and swap space.
If the BSI_ENV environment variable is not pointing to the correct file, there is no Veritas
backint log directory, and the dbm.ebp log file shows the following:
2004-07-07 09:40:06Using environment variable 'TEMP' with value 'C:\DOCUME~1\user\LOCALS~1\Temp'as directory for temporary files and pipes.Using connection to Backint for MaxDB Interface.
2004-07-07 09:40:06Checking existence and configuration of Backint for MaxDB.
Using environment variable 'BSI_ENV' with value'C:\VERITAS\NetBackup\DbExt\SAP\backint_config.txt' as path of the
configuration file of Backint for MaxDB.Have encountered error -24927:The file C:\VERITAS\NetBackup\DbExt\SAP\backint_config.txt is missing
or unreadable.
Constructed the following reply:ERR-24927,ERR_TOOLCHK: external backup tool not foundThe file C:\VERITAS\NetBackup\DbExt\SAP\backint_config.txt is missing
or unreadable.
Can not read the Backint for MaxDB configuration file.Check failed.
Error if Backint config file does not point to the right parameter file
NetBackup Error: Status 29 - failed trying to exec a command. A command could not beexecuted. This can occur because the permissions of the command do not allow it to be executed,
or there is lack of system resources such as memory and swap space.
-
8/11/2019 Maxdb Backup Recovery
35/44
VERITAS Software Page 35 of 44
If the backint configuration file does not exist, or is improperly specified, there is no Veritasbackint log directory, and the following error message is found near the end of the dbm.ebp log
file:
2004-07-07 09:44:07 ---------- Begin of error output of Backint for MaxDB(c:\veritas\netbackup\dbext\sap\backint.error)----------
2004-07-07 09:44:07 The file'c:\veritas\netbackup\dbext\sap\backint_parameter.txt' does not exists.
2004-07-07 09:44:07 Could not open the parameter file.
Error if Backint config file points to wrong backint.exe (the NBUbackint)
NetBackup Error: Status 29 - failed trying to exec a command. A command could not beexecuted. This can occur because the permissions of the command do not allow it to be executed,
or there is lack of system resources such as memory and swap space.
If the backint configuration file points to the incorrect backint.exe file (the NetBackup backint
versus the MaxDB backint), there is both a backint log (for Veritas), and a dbm.ebp log file. Inthe Veritas backint log file, the following lines appear:
09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: unknownparameter: BACKINT: c:\veritas\netbackup\bin\backint.exe
09:51:31.235 [2572.2708] backint_process_parm_file: param_variable =BACKINT: : param_value = c:\veritas\netbackup\bin\backint.exe09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: unknownparameter: PARAMETERFILE OF BACKINT:C:\VERITAS\NetBackup\DbExt\SAP\initDEMO.utl
09:51:31.235 [2572.2708] backint_process_parm_file: param_variable =PARAMETERFILE : param_value = OF09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: unknown
parameter: HISTORY FILE: c:\veritas\netbackup\dbext\sap\backinthistory.log
09:51:31.235 [2572.2708] backint_process_parm_file: param_variable =HISTORY : param_value = FILE:09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: unknownparameter: INPUTFILE FOR BACKINT:c:\veritas\netbackup\dbext\sap\backintoracle.in
09:51:31.235 [2572.2708] backint_process_parm_file: param_variable =INPUTFILE : param_value = FOR09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: unknownparameter: OUTPUTFILE FOR BACKINT:c:\veritas\netbackup\dbext\sap\backintoracle.out
09:51:31.235 [2572.2708] backint_process_parm_file: param_variable =
OUTPUTFILE : param_value = FOR09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: unknownparameter: ERRORFILE FOR BACKINT:c:\veritas\netbackup\dbext\sap\backintoracle.err
09:51:31.235 [2572.2708] backint_process_parm_file: param_variable =ERRORFILE : param_value = FOR09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: unknownparameter: STAGING AREA: C:\VERITAS\NetBackup\DbExt\SAP\stage1 100 MB
-
8/11/2019 Maxdb Backup Recovery
36/44
VERITAS Software Page 36 of 44
09:51:31.235 [2572.2708] backint_process_parm_file: param_variable =STAGING : param_value = AREA:09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: unknownparameter: STAGING AREA: C:\VERITAS\NetBackup\DbExt\SAP\stage2 100 MB09:51:31.235 [2572.2708] backint_process_parm_file: param_variable =STAGING : param_value = AREA:09:51:31.235 [2572.2708] backint_process_parm_file: INFO - FoundSAP_POLICY environment variable, setting policy = washburn_max_db09:51:31.235 [2572.2708] backint_process_parm_file: INFO - FoundSAP_SERVER environment variable, setting server = washburn09:51:31.235 [2572.2708] backint_process_parm_file: WARNING: drives valuemissing from parameter filec:\veritas\netbackup\dbext\sap\backint_parameter.txt09:51:31.235 [2572.2708] backint_process_parm_file: default drives value= 109:51:31.235 [2572.2708] backint_process_parm_file: working dir =C:\VERITAS\NetBackup\Logs\user_ops\sap09:51:31.235 [2572.2708] backint_process_parm_file: INFO - FoundSAP_CLIENT environment variable, setting client = washburn09:51:31.235 [2572.2708] backint_process_parm_file: ERROR: switch_listmissing from parameter filec:\veritas\netbackup\dbext\sap\backint_parameter.txt09:51:31.235 [2572.2708] backint_process_parm_file: ERROR: switch_sem
missing from parameter filec:\veritas\netbackup\dbext\sap\backint_parameter.txt09:51:31.235 [2572.2708] backint_process_parm_file: ERROR: switch_logmissing from parameter filec:\veritas\netbackup\dbext\sap\backint_parameter.txt
Similar messages appear in the dbm.ebp log file:
2004-07-07 09:53:482004-07-07 09:53:48 Cleaning up.
2004-07-07 09:53:48 Copying output of Backint for MaxDB to this file.2004-07-07 09:53:48 ---------- Begin of output of Backint for MaxDB
(c:\veritas\netbackup\dbext\sap\backint.output)----------2004-07-07 09:53:48 WARNING: unknown parameter: BACKINT:
c:\veritas\netbackup\bin\backint.exe2004-07-07 09:53:482004-07-07 09:53:48 WARNING: unknown parameter: PARAMETERFILE OF
BACKINT: C:\VERITAS\NetBackup\DbExt\SAP\initDEMO.utl2004-07-07 09:53:482004-07-07 09:53:48 WARNING: unknown parameter: HISTORY FILE:
c:\veritas\netbackup\dbext\sap\backinthistory.log2004-07-07 09:53:482004-07-07 09:53:48 WARNING: unknown parameter: INPUTFILE FOR BACKINT:
c:\veritas\netbackup\dbext\sap\backintoracle.in2004-07-07 09:53:482004-07-07 09:53:48 WARNING: unknown parameter: OUTPUTFILE FOR
BACKINT: c:\veritas\netbackup\dbext\sap\backintoracle.out2004-07-07 09:53:482004-07-07 09:53:48 WARNING: unknown parameter: ERRORFILE FOR BACKINT:
c:\veritas\netbackup\dbext\sap\backintoracle.err2004-07-07 09:53:482004-07-07 09:53:49 WARNING: unknown parameter: STAGING AREA:
C:\VERITAS\NetBackup\DbExt\SAP\stage1 100 MB2004-07-07 09:53:492004-07-07 09:53:49 WARNING: unknown parameter: STAGING AREA:
C:\VERITAS\NetBackup\DbExt\SAP\stage2 100 MB2004-07-07 09:53:49 WARNING: drives value missing from parameter file
c:\veritas\netbackup\dbext\sap\backint_parameter.txt2004-07-07 09:53:49 default drives value = 1
-
8/11/2019 Maxdb Backup Recovery
37/44
VERITAS Software Page 37 of 44
2004-07-07 09:53:49 ERROR: switch_list missing from parameter filec:\veritas\netbackup\dbext\sap\backint_parameter.txt
2004-07-07 09:53:49 ERROR: switch_sem missing from parameter filec:\veritas\netbackup\dbext\sap\backint_parameter.txt
2004-07-07 09:53:49 ERROR: switch_log missing from parameter filec:\veritas\netbackup\dbext\sap\backint_parameter.txt
2004-07-07 09:53:49 WARNING: sort_backup_type not specified in .utlfile
2004-07-07 09:53:49 WARNING: default sort_backup_type to forrestore
2004-07-07 09:53:49 ERROR: incorrect format or option in .utl file (-p)
2004-07-07 09:53:492004-07-07 09:53:49 ---------- End of output of Backint for MaxDB
(c:\veritas\netbackup\dbext\sap\backint.output)----------
The key to this series of error messages is the Unknown parameter error messages. Thisindicates the wrong backint is in use, as the NetBackup backint file does not recognize these
parameters.
Error if backint parameter file points to the wrong NetBackupconfiguration file
NetBackup Error: Status 29 - failed trying to exec a command. A command could not beexecuted. This can occur because the permissions of the command do not allow it to be executed,
or there is lack of system resources such as memory and swap space.
There is both a backint log (for Veritas), and a dbm.ebp log file. In the Veritas backint log file,
the following lines appear:
10:08:57.473 [2816.1388] backint_process_parm_file: ERROR: couldn't openparam_file: C:\ VERITAS\NetBackup\DbExt\SAP\initDEMO.utl10:08:57.473 [2816.1388] c:\veritas\netbackup\bin\backint.exe 5.1: ERROR:
incorrect format or option in .utl file (-p)
In the dbm.ebp log file, similar messages appear:Calling 'c:\veritas\netbackup\bin\backint.exe -u DEMO -f backup -t file -pC:\\VERITAS\NetBackup\DbExt\SAP\initDEMO.utl -ic:\veritas\netbackup\dbext\sap\backintoracle.in -c' .Backint for Oracle ended at 2004-07-07 10:09:09 with return code 2.Backint for Oracle output: ERROR: couldn't open param_file:C:\VERITAS\NetBackup\DbExt\SAP\initDEMO.utlBackint for Oracle output: ERROR: incorrect format or option in .utl file (-p)
The key to this error message is the inability of the backint process to open the parameter file
(ERROR: couldn't open param_file). This indicates the parameter file is specified
incorrectly.
Error if the backint parameter file points to the wrong backint.exe file
NetBackup Error: Status 29 - failed trying to exec a command. A command could not be
executed. This can occur because the permissions of the command do not allow it to be executed,
or there is lack of system resources such as memory and swap space.
-
8/11/2019 Maxdb Backup Recovery
38/44
VERITAS Software Page 38 of 44
In this case, there is no Veritas backint log file generated. In the dbm.ebp log file, the followingmessage is observed:
2004-07-07 10:19:08 ---------- Begin of error output of Backint for MaxDB(c:\veritas\netbackup\dbext\sap\backint.error)----------2004-07-07 10:19:08 The path of Backint for Oracle is not defined in the
parameter file.
This indicates either the path for the Veritas backint is not defined, or defined incorrectly.
Error if wrong backup medium name is used.
NetBackup Error: Status 29 - failed trying to exec a command. A command could not be
executed. This can occur because the permissions of the command do not allow it to be executed,or there is lack of system resources such as memory and swap space.
In this case, neither the Veritas backint nor the dbm.ebp log files are generated. In the dbm.prt
file, however, (found in same location as the dbm.ebp file), there is the following message:
2004-07-07 10:19:09 0x0000056c ERR -24920 DBM ERR_BACKUPOP: backupoperation was unsuccessful
0x0000056c ERR -24920 DBM The backup tool failedwith 2 as sum of exit codes. The database request was canceled and ended witherror -903.2004-07-07 10:22:19 0x00000a8c 0 DBM command backup_startBACKDEMO_WRONG DATA2004-07-07 10:22:19 0x00000a8c ERR -24985 DBM ERR_MENOTFOUND: mediumnot found2004-07-07 10:22:23 0x000001ac 0 DBM command backup_startBACKDEMO_WRONG DATA2004-07-07 10:22:23 0x000001ac ERR -24985 DBM ERR_MENOTFOUND: mediumnot found
The medium not found message is the key to this issue.
Error if staging area is omitted from parameter file
NetBackup Error: Status 29 - failed trying to exec a command. A command could not be
executed. This can occur because the permissions of the command do not allow it to be executed,
or there is lack of system resources such as memory and swap space.
In this case, there is no Veritas backint log file generated. In the dbm.ebp log file, the following
error is observed:
2004-07-07 10:43:40 Have encountered error -24920:
2004-07-07 10:43:41 The backup tool failed with 2 as sum of exit codes. Thedatabase request was canceled and ended with error -903.2004-07-07 10:43:41
A review of the MaxDB website indicates this error message occurs when the backup failed due
to a problem with the database or the backup tool. While this error message appears to besomewhat generic, checking the staging area is a good first step in the troubleshooting process,
as that eliminates one known cause of the error message.
-
8/11/2019 Maxdb Backup Recovery
39/44
VERITAS Software Page 39 of 44
Errors if restore is attempted with an expired NetBackup image
There is a known issue within MaxDB where the backup images never expire and drop out of
the backup history window in the Database Manager GUI. This presents a potential problem
where images which have expired within NetBackup show as available in the MaxDB DatabaseManager GUI. If a restore is attempted, the restore fails, and the following is observed:
The job does not display in the NetBackup Administration Console in the Activity MonitorThe job shows the following error in the MaxDB Database Manager GUI:
In the dbm.ebp file, the following message is observed:
2004-08-23 09:32:542004-08-23 09:32:54 Filling reply buffer.
2004-08-23 09:32:54 Have encountered error -24920:2004-08-23 09:32:54 The backup tool failed with 2 as sum of exit
codes. The database requestwas canceled and ended with error -903.2004-08-23 09:32:54
2004-08-23 09:32:54 Constructed the following reply:2004-08-23 09:32:54 ERR2004-08-23 09:32:54 -24920,ERR_BACKUPOP: backup operation was
unsuccessful2004-08-23 09:32:54 The backup tool failed with 2 as sum of exit
codes. The database requestwas canceled and ended with error -903.
In the Veritas backint log file, a series of message similar to the following appear:
09:31:32.998 [476.2108] backint_do_inquire: ERROR: Netbackup cannot findinquiry request for backup id: NS1092618550, file:C:\apps\VERITAS\NetBackup\DbExt\SAP\stage1.0
09:31:32.998 [476.2108] backint_do_inquire: #NOTFOUNDC:\apps\VERITAS\NetBackup\DbExt\SAP\stage1.0
09:31:32.998 [476.2108] backint_do_inquire: ERROR: Netbackup cannot findinquiry request for backup id: NS1091408775, file:C:\apps\VERITAS\NetBackup\DbExt\SAP\stage1.0
09:31:32.998 [476.2108] backint_do_inquire: #NOTFOUNDC:\apps\VERITAS\NetBackup\DbExt\SAP\stage1.0
To correct this, use the NetBackup Backup, Archive, and Restore GUI to determine what backupsets are available, and rerun the restore. Then see the Synchronizing Expired NetBackup
Images with the MaxDB Backup History section of this documentation for assistance in
correcting the mismatched information.
-
8/11/2019 Maxdb Backup Recovery
40/44
VERITAS Software Page 40 of 44
Script errors
Errors in the backup script (or .cmd file) are more difficult to troubleshoot, as neither dbm.ebp
nor Veritas backint log files are created. If the user IDs or passwords are incorrect, if the utility
session is not initiated, or if the wrong database name is specified in the script, the backup willfail, Status code 29.
In general, support recommends breaking down the script, and confirming each section of thescript can be executed successfully from the command line.
Synchronizing Expired NetBackup Images with the MaxDB BackupHistory
At this point in time, there is no way within MaxDB to expire a backup image, and remove it
from the MaxDB backup history. Please note this is a limitation of MaxDB, and not NetBackup.This does, however, present a potential issue of a backup image being expired in NetBackup, but
still showing as available in MaxDB.
In order to maintain consistent information in both MaxDB and NetBackup, it is necessary tomanually synch-up the backup history of MaxDB and NetBackup.
-
8/11/2019 Maxdb Backup Recovery
41/44
VERITAS Software Page 41 of 44
Begin by opening the Backup, Archive and Restore GUI on the MaxDB server, and setting themaster and client server names correctly, and specify a policy type of SAP. Then click on the
Select for Restore button. This brings up a window similar to the following:
The only backup set NetBackup has in its catalog is a backup from 17 August 2004.
-
8/11/2019 Maxdb Backup Recovery
42/44
VERITAS Software Page 42 of 44
Next, open the MaxDB Database Manager GUI, and select the Backup History option for thecorrect database. This brings up a window similar to the following:
In this example, six backup jobs show as available for restore, while the NetBackup GUI showsonly one. To correct this, the dbm.knl file must be manually edited.
The dbm.knl file is located in the \data\wrk\directory. In thiscase, since the database is the DEMO database, the dbm.knl file is located in the
c:\sdb\data\wrk\DEMOdirectory. This is a text file, and can be opened with any text editor.
The contents of the file look like the following:
40EC2363000D|DAT_00034|SAVE WARM|2004-07-07 11:22:59|2004-07-07 11:22:59|2004-07-0711:22:59|2004-07-07 11:23:02| 1126| |NO |BACKDEMO | 240| 1| 0| |
40F562EC0002|DAT_00035|SAVE WARM|2004-07-14 11:44:28|2004-07-14 11:44:28|2004-07-1411:44:29|2004-07-14 11:44:32| 1163| |NO |BACKDEMO | 248| 1| 0| |
410459E70002|DAT_00036|SAVE WARM|2004-07-25 20:09:59|2004-07-25 20:09:59|2004-07-2520:10:01|2004-07-25 20:10:02| 1172| |NO |BACKDEMO | 248| 1| 0| |
410D937F0002|DAT_00040|SAVE WARM|2004-08-01 20:06:07|2004-08-01 20:06:07|2004-08-0120:06:07|2004-08-01 20:06:11| 1191| |NO |BACKDEMO | 248| 1| 0| |
4120092F0002|DAT_00041|SAVE WARM|2004-08-15 20:09:03|2004-08-15 20:09:03|2004-08-1520:09:04|2004-08-15 20:09:07| 1201| |NO |BACKDEMO | 248| 1| 0| |
-
8/11/2019 Maxdb Backup Recovery
43/44
VERITAS Software Page 43 of 44
4122422A0003|DAT_00042|SAVE WARM|2004-08-17 12:36:42|2004-08-17 12:36:42|2004-08-1712:36:42|2004-08-17 12:36:45| 1202| |NO |BACKDEMO | 248| 1| 0| |
Note in the fourth section, the date and time of the backup are clearly indicated. Compare the
information in the NetBackup GUI to the information in the file, and remove any lines from the
dbm.knl file which do not have a corresponding backup set in the NetBackup GUI. In the above
examples, lines in the dbm.knl file above would need to be removed EXCEPT the last line,which contains the backup information from the 17 August 2004 backup.
Switching the Operating SystemWhen restoring, it is possible to switch from Microsoft Windows to Linux and vice versa. Thismeans a backup created on the operating system Microsoft Windows may be restored to the
same operating system or to Linux. A backup created on Linux may be restored to the same
operating system or to Microsoft Windows. Treat this sort of restore in the same manner as anyother alternate client restore.
Web Database InterfaceOne of the options which can be installed with MaxDB is the WebDBM interface which allows
the databases to be administered from a web browser.
After downloading and installing WebDBM software on MaxDB server, start the web serverservice (SAP DB WWW)
To start the Web Server at the command prompt, enter the following command: netstart sapdbwww
To stop the Web Server at the command prompt, enter the following command: netstop sapdbwww
Information about the configuration of the web server portion of MaxDB is found in the registrypath HKEY_LOCAL_MACHINE\ SOFTWARE\SAP\SAP DBTech\WebAgent75\HTTP, and contains the
following entries:
Browsable=0DefaultDocument=index.htmlDocumentRoot=\web\DocumentsLogDirectory=\web\LogLogRequests=1MaxThreads=10MimeTypeFile=\web\config\mime.typesPort=9999
The values and their associated value data are:
Browsable: Determines if the contents of the directories under DocumentRoot are visible usinga browser.
0: The contents are not visible
1: The contents are visible
DefaultDocument: Used to change the start page of the web server, if desired.
-
8/11/2019 Maxdb Backup Recovery
44/44
DocumentRoot: Changes the path for the root directory of the web pages, if necessary.
LogDirectory: If LogRequest is set so that HTTP accesses are logged, accesses to the MaxDBWeb Server are logged in the files httperr.log and httpreq.log. These log files are written in the
directory specified in LogDirectory.
LogRequests: Determines if the HTTP accesses are logged.0: HTTP accesses are not logged.
1: HTTP accesses are logged.
MaxThreads: Determines the maximum number of threads which can be used to process accessto the Web Server. When the Web Server is started, the threads are also started as a thread pool.
MimeTypeFile: Defines the MIME type file, if necessary.
Port: Allows the administrator to change the port address for the Web Server, if desired.