IBM Support

Rebuild a missing volume history file for a file database restore

Troubleshooting


Problem

The volume history file (volhist) is required for a Spectrum Protect Database restore. This document provides steps to rebuild the volhist required for a database restore from a file device class volume.

Environment

IBM Spectrum Protect Server V6.3 or above.

Resolving The Problem

A database backup stored on a FILE volume will have a volhist entry with the following format :

 


      **************************************************          
      Operation Date/Time:   2016/01/05 06:00:29                  
       Volume Type:  BACKUPFULL                                    
      * Location for volume XXX is: ''                            
       Volume Name:  "/dbbackup/52078002.dbv"        
       Backup Series:     351                                      
       Backup Op:       0                                          
       Volume Seq:    100001                                        
       Device Class Name:  DBBACKUPFILE                          
      **************************************************          

From above, the following information is required:

 

  • Operation Date/Time:
  • Volume Type:
  • Volume Name:
  • Backup Series:
  • Backup Op:
  • Volume Seq:
  • Device Class Name:


Follow the steps below to obtain the needed information.

1. First, obtain the Device Class Name used for the database backup. The device configuration file is identified by the DEVCONFIG option in the dsmserv.opt file The default is devconf.dat, located in the instance directory. Examine the file for the device class defined. For example :

cat devconf.dat
DEFINE DEVCLASS DBBACKUPFILE DEVT=FILE FORMAT=DRIVE SHARE=NO MAXCAP=1048576K MOUNTL=2 DIR=/dbbackup


The above output shows that the device class name is DBBACKUPFILE and the directory is /dbbackup.

2. After identifying the device class directory path, obtain the full directory listing of the database backup volumes. For example :

ls -al /dbbackup
-rw------- 1 tsminst1 tsmsrvrs 1073741824 Jan 05 06:00 52078002.dbv
-rw------- 1 tsminst1 tsmsrvrs 453772685 Jan 05 06:01 52078044.dbv



The above output shows 2 volumes, /dbbackup/52078002.dbv and /dbbackup/52078044.dbv.
The volume name ending with a " .dbv " extension indicates this is either a BACKUPFULL or BACKUPINCR volume, which corresponds to the Volume Type.The number of database volumes used for the database backup operation can be used to determine if the database backup was a FULL or INCREMENTAL backup. In this example, the 2 volumes timestamps are close, which indicates this is a FULL database backup. In this example, the Volume Type would be BACKUPFULL.

3. The "Volume Seq" field identifies the volume sequence, the order in which the volumes were created and should also be mounted on restore. Start the volume sequence with 100001 and increment by 1 for each additional volume, according to the volume creation time. In this example, there were 2 volumes created. The first volume would have a sequence of 10001 and the second volume created would have a sequence of 10002. For example :

52078002.dbv 06:00 100001
52078044.dbv 06:01 100002



4. The "Backup Op" field should be set to 0.

5. The "Backup Series" field can be set to any number, for example 351. An incorrect "Backup Series" value will cause the restore to fail but the failure message will identify the expected value.

6. The "Operation Date/Time" field should be set to the timestamp of the first database volume. An "Operation Date/Time" value will cause the restore to fail but the failure message will identify the expected value.

7. Using the instance userid, edit the volhist file or create a new volhist file and construct the volhist entries using the collected information. For example :

      **************************************************
      Operation Date/Time:   2016/01/05 06:00:00                  
       Volume Type:  BACKUPFULL                                    
      * Location for volume XXX is: ''                            
       Volume Name:  "/dbbackup/52078002.dbv"        
       Backup Series:     351                                      
       Backup Op:       0                                          
       Volume Seq:    100001                                        
       Device Class Name:  DBBACKUPFILE                          
      **************************************************
      Operation Date/Time:   2016/01/05 06:00:00                  
       Volume Type:  BACKUPFULL                                    
      * Location for volume XXX is: ''                            
       Volume Name:  "/dbbackup/52078044.dbv"        
       Backup Series:     351                                      
       Backup Op:       0                                          
       Volume Seq:    100002                                        
       Device Class Name:  DBBACKUPFILE                          
      **************************************************

Verify the VOLUMEHISTORY option in the dsmserv.opt file and make sure the correct volume history file is identified.

8. Run the database restore in the foreground. For example :

-login as instance owner
-cd to the directory where the dsmserv.opt is stored (instance directory) and run :

/opt/tivoli/tsm/server/bin/dsmserv restore db todate=01/05/2016

The restore command will likely fail with the following messages :

ANR7801I Subsystem process ID is 10968.
ANR0900I Processing options file /home/tsminst1/dsmserv.opt.
ANR7814I Using instance directory /home/tsminst1.
ANR4726I The ICC support module has been loaded.
ANR1636W The server machine GUID changed: old value (), new value (a6.97.f0.09.08.81.e2.11.be.3a.00.50.56.8c.00.b5).
ANR8200I TCP/IP Version 4 driver ready for connection with clients on port 1500.
ANR0152I Database manager successfully started.
ANR4634I Starting point-in-time database restore to date 01/05/2016 06:00:00 AM.
.....
ANR4606E Restore database volume header backup series number 351 does not match the expected backup series number of 14. This volume cannot be used to restore the database.


In this example, the resstore fails because the backup series is incorrect, The "ANR4606E" message provides the correct value. In this case, the "Backup Series" field should be set to 14.

9. Modify the volhist file and change the "Backup Series" field to a value of 14. Run the restore again. The restore may also fail because of an incorrect "Operation Date/Time" field value. For example :

ANR4614E The database backup timestamp of 20160105060033 on database backup media with backup type FULL does not match the backup timestamp 20160105060033 from the volume history file. This volume cannot be used to restore the database.

The ANR4614E message indicates the correct timestamp, 20160105060033, for the "Operation Date/Time" field. Modify the volhist file and change the "Operation Date/Time" field to the correct timestamp value.

10. The final version of the volhist entries would be :

      **************************************************
      Operation Date/Time:   2016/01/05 06:00:33                  
       Volume Type:  BACKUPFULL                                    
      * Location for volume XXX is: ''                            
       Volume Name:  "/dbbackup/52078002.dbv"        
       Backup Series:     14                                    
       Backup Op:       0                                          
       Volume Seq:    100001                                        
       Device Class Name:  DBBACKUPFILE                          
      **************************************************
      Operation Date/Time:   2016/01/05 06:00:33                  
       Volume Type:  BACKUPFULL                                    
      * Location for volume XXX is: ''                            
       Volume Name:  "/dbbackup/52078044.dbv"        
       Backup Series:     14                                    
       Backup Op:       0                                          
       Volume Seq:    100002                                        
       Device Class Name:  DBBACKUPFILE                          
      **************************************************

With these changes, the database restore should complete successfully.

 

[{"Product":{"code":"SSSQWC","label":"Tivoli Storage Manager Extended Edition"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Server","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.3;6.4;7.1","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Document Information

More support for:
Tivoli Storage Manager Extended Edition

Software version:
6.3, 6.4, 7.1

Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows

Document number:
538359

Modified date:
22 October 2018

UID

swg21974269