You are on page 1of 37

Unit 8:

Database and Storage Pool Backup and


Recovery
2

Objectives
Upon completion of this unit, you will be able to:

• Backup and recover the Storage Manager database.


• Backup and recover the storage pools.
3

TSM Server Backup Facilities


Rec Log
Mirror
TSM
SERVER
Database
Mirror
Rec Log
O Database
N
S O
I F
T Database F
Database Backups
E Backups S
I
Copy Stg Pools T
Copy
Storage E
Pools
4

TSM Database Backup Objectives


• Backup without interruption of services.
• Multiple options to initiate database backup.
• Disaster recovery support.
• Restore to most recent state.
• Restore to a specific point in time.
• Restore an individual database volume.
• DB Snapshot backup.
• System object support.
5

IBM Tivoli Storage Manager Database Backup


• Types of database backups
• Full backup
• Incremental backups (default)
• Database Out-of Band (Snapshot) backup

• Full backup when required


• Database has never been backed up.
• Maximum incremental backups reached.
• Database has been extended or reduced.
• Recovery log mode changed to roll forward (default = normal).

TSM
DB
+ + +
1 full Up to 32 Incremental backups
"Database backup series"
6
Storage Manager Database Backup – Full
Versus Incremental
Full only or full plus incremental

1st backup
T
I
M
E 2nd backup

3rd backup

• Full backups take longer to run than incremental


backups.
• Recovery time is faster with full backup only.
7

Database Out-of-Band (Snapshot) Backup

TSM
Database

• Does not interrupt the normal backup series.


• Can be taken off-site.
• Normal backup series stays onsite for availability.
• Is integrated into Disaster Recovery Manager processing
as well as volume history processing.
8

Storage Manager Database Backup Command

BAckup DB DEVclass=devclassname
Type=Incremental / Full / DBSnapshot
VOLumenames=volname(s)
Scratch=Yes/No Wait=No/Yes

Storage Rec
Manager Log
SERVER

Vol
Devconfig
History
DB
9

Storage Manager Database Backup Related


Commands
Query DB Format = Detail Query VOLHistory
Pct. Util: xx% Date/Time: 04/22/2000 13:04:01

Max Pct. Util: xx% Volume Type: BACKUPFULL

Incremental since last full: x Backup Series: 3

Changed since last backup (MB) xxx Backup Operation: 0

Volume Seq: 1

Device Class: TESTBUDB

Volume Name:
D: \ TSM\ SERVER\ 9326461.DBB

DELete VOLHistory TODate=TODAY -7 Type=DBBackup


10
Storage Manager Database Backup and
Recovery: Database Recovery
Point-in-time recovery

1 Full Up to 32 Incrementals
Recovery to most current state

LOG

Roll
1 Full Up to 32 Incrementals Forward

Single database volume recovery

LOG

Roll
1 Full Up to 32 Incrementals Forward
11

Database Recovery Considerations

Point-in-time recovery

1 Full Up to 32 Incrementals
+ Smaller size for recovery log.
+ No auditing of database required after restore.
- Cannot restore to most recent state.
- Single database volume cannot be restored.
- Auditing of storage pools required after restore.
12

Database Recovery Considerations (cont.)

Mirroring + Roll-forward = Comprehensive Protection

Roll-forward recovery to most current state

LOG

Roll
1 Full Up to 32 Incrementals Forward

+ Database can be restored to most recent state.


+ No auditing of database and storage pools required after
database stored.
+ Single database volume can be restored.
- Larger recovery log.
- Mirrored recovery log consumes additional disk space.
13

Database Recovery – Restore Command

Backup volhist
volume history files
TSM
database

Backup devcnfg

device configuration
14

Restoring the Server

Current copies of the following items will enable you to restore


your server:
volhist.out
devcnfg.out database backup
dsmserv.opt storage pool backup
dsmserv.dsk
15

Database Recovery – Restore Command


Examples
• Restoring a database to its most current state:
DSMSERV RESTORE DB Preview=No|Yes
• Restoring a single database volume to its most current state:
DSMSERV RESTORE DB DBVolume=volname Preview=No|Yes
• Restoring a database to a specific point in time - history file
available:
•DSMSERV RESTORE DB TODate=date TOTime=time
•Source=DBBackup / DBSnapshot
•Preview=No|Yes
• Restoring a database to a specific point in time - history file
unavailable:
DSMSERV RESTORE DB DEVclass=DEVCLASSNAME
VOLumename=volname COMMIT=No|Yes
16

Initiating Database Backup


• Scheduling backups
• BACKUP DB command
• Recommended way to do backups
• Specifying automatic backups
• DEFINE DBBACKUPTRIGGER command
• Based on recovery log threshold
• Complements the schedule backups
• Safety valve: Ensures you do not run out of log space
• Only with roll-forward mode
• Running manual backups
Can be taken at any time
17

DBBACKUPTRIGGER and Log Mode

DEFine DBBackuptrigger DEVclass=devclassname


LOGFullpct=percentage (50% default)
NUMINCremental=number (6 default)

Query Status TSM


Server Name : TSM SERVER
.
.
.
Log Mode : Roll forward
. DB
.
.
18

Recommendations
• Preferred alternative: use roll-forward recovery mode.
• Complement with database mirroring for 24 hours, 7 days
environment.
• Use recovery log mirroring.
• Define volume history and device class backup files.
• Backup database using administrator scheduling facility.
• Complement with automatic backup trigger.
• Schedule database backup together with storage pool
backup.
• Store backup volumes off-site.
• Store backup of DSMSERV.OPT and DSMSERV.DSK off-
site.
19

Storage Pool Backup and Recovery Objectives


• Backup without interruption of service.
• Restore one volume in a storage pool.
• Restore a complete storage pool.
• Disaster recovery support.
• Automatically switch to duplicate copy if primary file is
damaged.
20

Backup of Storage Pool Files


• Copy storage pool
• Sequential only
BACKUP STGpool
• Multiple primary pools can use one
copy pool primarypool copypool
• Recommended backup entire
primary storage pool hierarchy
to same copy pool
• Backup to copy pool
• Asynchronous from client
backup
• File level granularity
• Incremental backup of files
• Initiate backup
• Manually with command or GUI
• Automatically with administrative Primary Copy
command scheduling Storage Pool Storage Pool
• Once per primary pool
21

Backup of Storage Pool Files (cont.)

Primary Pool Hierarchy

Copy Pools

ON-site volumes OFF-site volumes

• Used to support both media • Volumes stored on-site


and disaster recovery. • Used for media failure.
• Files automatically accessed if primary
• Backup initiated for each copy copy damaged.
using different copy pool • Volumes stored off-site
targets. • Used for disaster.
• Files never automatically accessed.
• Stored together with database backup.
22

Define a Copy Storage Pool

Copy Pools

ON-site volumes OFF-site volumes

Define STG poolname devclassname Pooltype=COPY


DESC=description
ACCESS=READWRITE
COLLOCATE=NO|YES
RECLAIM=100%
MAXSCRATCH=value
(represents % empty)
DEF VOLUME poolname volname
23

Backing Up Storage Pool Hierarchy

Primary-dsk Primary-tape

Copy Pools

ON-site volumes OFF-site volumes

Backup STGpool primarypool copypool

MAXPRocess=1 Preview=NO/YES
24

Handling Off-site Volumes

Primary-DSK Primary-TAPE

Copy Pools

ON-site volumes OFF- site volumes


Set access mode to OFFsite
• Use location
• NO MOUNT REQUEST
UPDate Volume Volname ACCess=Offsite Location=‘Vault’
25

Reclamation of Off-site Volumes

ON-site OFF-site

..... I
N
C
U
S S
T T
A O
L M
L I

file A

Reclamation 100%

file B file A
file A
file B
file B

Query VOLume
UPDate VOLume
26

Restore of Storage Pool Files


Copy
Pool

Damaged volumes
within a storage pool

Damaged Files Damaged Volumes

Storage
Pool
Files Volume
27

Accessing Damaged Files

A
B
B

File D C
D marked
A
damaged

C
D

Primary Copy
Storage Pool Storage Pool
• Storage Manager automatically access with On-site
copy storage pool file if volume is on-site. Volumes
• Run RESTORE storage pool periodically to
restore damaged files.
• Periodically check for damaged file using
AUDIT volume.
28

Recovering from a Media Loss


Restore Volume VOL2 Preview=YES

VOL1 VOL2 VOL2 is


damaged

VOL3 VOL4

Primary Copy
Storage Pool Storage Pool
• Use to restore a damaged volume in a primary storage pool.
• All backed-up files located on damaged volume are restored
from copy storage pool.
• Files remaining on damaged volume after restore
• Analyze cause for your situation
• Can delete files using DELETE VOLUME3
29

Restore Volume Command

• RESTORE Volume volname


COPYstgpool=copypool NEWstgpool=newprimarypool
MAXPRocess=numprocesses (1) Preview=No/Yes
Wait=No|Yes

• RESTORE Volume VOL2 MAXP=2


Storage
Manager DB
SERVER
Primary Storage Pool Copy Storage Pool
VOL1 VOL2 VOL3 CPYVO1 CPYVO2 CPYVO3

FILES
30

Recovering from a Major Media Loss


RESTORE STGPOOL poolname

VOL1 VOL2 VOL2 and VOL3


are damaged

VOL3 VOL4

Primary Copy
Storage Pool Storage Pool

• Used to restore a damaged • Files restored to other volumes


volume in a primary storage in primary storage pool.
pool. • Files remaining on damaged
• Only volumes with an access volume after restore
mode of Destroyed are restored. • Analyze cause for your situation
• Can delete files using DELETE VOLUME
• Damaged files on other
volumes in primary pool are
also restored.
31

Restore Storage Pool Command

• UPDATE VOLume volumename Access=DESTROYED


• RESTORE STGpool primarypool
COPYstgpool=copypool Storage
NEWstgpool=newprimarypool Manager DB
MAXPRocess=numprocesses Preview=No|Yes SERVER
Wait=No|Yes

Primary Storage Pool Copy Storage Pool

VOL1 VOL2 CPYVO1 CPYVO2

VOL3 VOL4 FILES CPYVO3 CPYVO4

• RESTORE STG PRIMARY


32
Recover Storage Pool Volumes Using Off-site
Volumes
• Determine the copy pool
volumes needed to restore.
• Set the access mode of the
copy volumes
CHECKLIST
UNAVAILABLE.
• Bring the identified volumes
to the on-site location.
• Set the access mode to
READO.
• Restore the destroyed files.
• Set the access mode of the
volumes to OFFSITE.
• Return the volumes to the
off-site location.
33

Maintaining the Integrity of Files

AUDIT VOLUME
34

Backup and Recovery Recommendations


• Backup entire primary storage pool hierarchy to same
copy pools.
• Consider using at least one copy pool for on-site recovery
and one for disaster recovery.
• Use administrative command scheduling to automate
storage pool backups.
• Backup up database and storage pools together.
Backup storage pool first
• Save the volume history and device configuration file
(Send off-site along with the DSMSERV.OPT and
DSMSERV.DSK).
• Consider running AUDIT VOLUME to mark damaged files.
• Run RESTORE STGPOOL periodically to replace damaged
files.
35

Protecting Your Database and Storage Pool


• Create a copy storage pool.
• Do a back up of the primary storage pools to the copy
storage pool.
• Do the following daily:
• Do a back up of the primary storage pools to copy storage
pools.
• Back up the database.
• Save the volume history file and the device configuration
file.
• Move off-site storage pool volumes, database backup
volume history file, and the device configuration file.
• Consider implementing Disaster Recovery Manager (DRM)
36

Student Exercise
37

Summary
You should now be able to:

• Backup and recover the Storage Manager database.


• Backup and recover the storage pools.

You might also like