Frequently Asked Questions

« Previous
Do you have some examples of fanless computers we can buy?
Next «
What about the quality of a created PDF document?

29. How to use the IBM Spectrum Protect (Tivoli Storage Manager aka TSM)



IBM Spectrum Protect is the backup system run at the university at the IT-division. The software was previously known as TSM - Tivoli Storage Manager and is still referenced as both names.

Financing and pricing

The services is paid for by the users. This includes salaries for everyone involved in maintaining the system and all equipment. The costs includes a starting cost per node and (decreasing) cost per GB depending on how much data that is stored in the system. Read the pricelist.

Documentation

IBM has their own documentation of TSM 7.1.3 (the latest version at 2016-04-14)

Schedule

Usually on Windows-systems the backup-client is asking the server whether it should backup or not. Send a mail to backup-admin to let them know.

On Mac and Linux (and other Unix-based systems) instead the client is called at a certain point in time doing the backup like this:

dsmc incr

To put this in crontab in a Linux system first run editor for the crontab as root using emacs as an editor.

EDITOR=emacs crontab -e

Or use the default vi editor:

crontab -e

Then enter the point in time to run the backups (with the full path to the client)

1 1 * * * /usr/bin/dsmc incr

Performance with TSM

TSM store files in tapes and after a while the incremental backups will store files in several different tapes. One way of taking care of this is to instead from time to time do a selection backup or a image (block device) backup. The block device backup is harder to read back for certain files obviously.

There are several options to decrease the amount of data being sent on the wire by doing more work on the client. Inside the university network this usually it not a problem since we usually have enough bandwidth betwen the campuses and to the backup servers.

Compression yes Memoryefficientbackup yes

Examples: Query the backup...

To list what partitions (or file systems) have been backed up:

dsmc query files

To list files that have a backup date during a certain date range: (However, running with options time limits (todate, fromdate) will change the behaviour for the client and read a lot of data into RAM. With several millions of files this will be slow. Read about Classic Restore versus No Query Restore (NQR) at IBM)

The option -inactive will list both active and inactive files.

dsmc q ba -inact -fromdate=01/01/2016 -todate=01/03/2016 -subdir=yes '/blue/*'

To get summary of all files backed up and the size:

dsmc query backup '/etc/*' -subdir=yes -querysummary

To get more details, for example to see files with the wrong backupclass which still are taking up space in the backup, run this command:

dsmc query backup '/etc/*' -subdir=yes -querysummary -detail

Examples: Restoring backup...

To interactively pick and restore the files, restoring to the directory /tmp:

dsmc restore -pick '/blue/*' "/tmp/"

To also interactively pick among the inactive files when restoring:

dsmc restore -pick '/blue/*' "/tmp/" -inactive

To also restore subdirectories while restoring:

dsmc restore -pick '/blue/*' "/tmp/" -inactive -subdir=yes

To restore the state of a directory at certain different points in time. This will run the restore command each for the specified dates and restore the directory as it were at that point in time.

for i in 10 11 12 13 14 15 16 17 ; do mkdir /var/tmp/jerker.restore.2016-04-$i-12.00.00/ dsmc restore -pitd=04/$i/2016 -pitt=12:00:00 -subdir=yes '/home/jerker/*' /var/tmp/jerker.restore.2012-11-$i-12.00.00/ done

To backup everything irrespective of whether files have changed since the last backup, use the selective command:

dsmc sel '/green/home/USER/jny25782/*' -subdir=yes

Examples: Deleting old backup data...

To delete a backup (which may require extra permissions), use the delete command. This time the -pick makes it interactive.

dsmc delete backup '/archive/jerker/*' -subdir=yes -pick

To delete all inactive files:

dsmc delete backup '/archive/jerker/*' -subdir=yes -deltype=inactive

To delete all inactive files backed up during a certain date range:

dsmc delete backup -fromdate=01/01/2010 -todate=01/01/2016 '/green/home/USER/jny25782/*' -subdir=yes -deltype=inactive

With the number of files into multiple tens of millions, this may not work so well since it takes up too memory or perhaps timeout when waiting too long for the confirmation prompt unless the operator (you) are staring at the window. Use the -noprompt option and break it down inte smaller parts like this:

for i in /home/* ; do dsmc delete backup -fromdate=01/01/2010 -todate=04/01/2016 $i/'*' -subdir=yes -deltype=inactive -noprompt ; done

To delete all files from the backup, including inactive files, specify -deltype=all. Do not prompt for confirmation.

dsmc delete backup '/unwanted.data/' -deltype=all -noprompt

This however do not delete parent directories from the backup. To remove them to, run the expire command. The position of the wildcard is described at IBM but look a bit strange, so be careful!

dsmc expire '/unwanted.data*' -noprompt

Different management classes:

To view the different management classes:

dsmc q mgmtclass

To list the details different backup management classes:

dsmc q mgmtclass -detail

To change class when taking backup, the new class can be specified in the file dsm.opt when including file systems:

include /myfilesystem/* TWOYEARCLASS

Please note that this may (or may not) only affect new objects created in the backup system. Manual clean up (using the method in the previous section) may have to be done.

The way I know about how to view the current backup management class is to start the graphical client: dsmj and in the menu Utilities the entry View policy information

This is a small script to list managment classes:

#!/bin/bash echo 'Management Retain Only Retain Extra Version Version' echo 'Class Version Version Data Exists Data Deleted' echo '--------------- --------------- --------------- --------------- --------------' ( dsmc q mgmtclass -detail ; echo DONE ) | grep -e 'MgmtClass Name' -e 'Retain Only Version' -e 'Retain Extra Version' -e 'Versions Data Exists' -e 'Versions Data Deleted' -e 'DONE' | ( while read A B C D E F ; do if test "$A" = "MgmtClass" -o "$A" = "DONE" ; then if test "$EXTRA" != "" -a "$ONLY" != "" ; then echo -e $MGMT'\t'$ONLY'\t'$EXTRA'\t'$EXISTS'\t'$DELETED | expand --tabs=16,32,48,64 ONLY="" EXTRA="" MGMT="" DELETED="" EXISTS="" fi MGMT=$D fi if test "$B" = "Only" ; then ONLY=$D fi if test "$B" = "Extra" ; then EXTRA=$D fi if test "$C" = "Exists...:" ; then if test "$D $E" = "No Limit" ; then EXISTS="NoLim" else EXISTS="$D" fi fi if test "$C" = "Deleted..:" ; then if test "$D $E" = "No Limit" ; then DELETED="NoLim" else DELETED="$D" fi fi done ) | sort -n --key=2,5

The output looks like this on the current (2016-05-16) classes on the domain that I are using. Note that there may be different domains with different management classes.

# ./tsm.list.mgmtclasses.sh Management Retain Only Retain Extra Version Version Class Version Version Data Exists Data Deleted --------------- --------------- --------------- --------------- -------------- ITSDBCLASS 0 0 1 0 ORACLECLASS 0 200 3 0 ONEDAYCLASS 1 1 3 2 DAYCLASS 2 0 1 1 MONTHCLASS 9 9 8 7 TWOWEEKS 14 14 14 1 TDPDIFF 30 30 No Limit No Limit TDPDIFF-META 30 30 No Limit No Limit TDPFULL 30 30 No Limit No Limit TDPFULL-META 30 30 No Limit No Limit TDPLOGS 30 30 No Limit No Limit TDPLOGS-META 30 30 No Limit No Limit PUBCLASS 60 30 2 1 STANDARD 60 30 2 1 QUARTERCLASS 120 90 3 2 ITSCLASS 300 200 3 2 LOGCLASS 300 200 3 2 ITS_DISK 365 200 3 2 DEVCLASS 500 450 4 3 TWOYEARSCLASS 750 30 2 1 ADMCLASS 900 800 8 7 TENYEARSCLASS 4000 30 2 1 # date Fri Aug 26 13:51:51 CEST 2016 # _

This is how to Assign management class to specified directories or default.

This entry tsm was last modified 2018-06-04

This documentation is covered by GNU Free Documentation License.