tsm_check
At the Department of Computer Science we use IBM:s “Tivoli Storage Management” (TSM) for backup.
TSM is a very solid backup system, but unfortunatley the end user contact is pretty bad. It tells the end user nothing about what happens (or don't happens). Therefore we have developed out own bash-scripts for that. Tomas Richter wrote av script for Linux and I one for Mac clients (which is what this is about).
To install TSM on a Mac is not dealth with on this page (however, a copy of my install-script is here). That script assumed a file server here at CS and will also install Growl. It is, however, not hard to customize for your needs!
How it works
The script, tsm_check
, resides in /usr/local/bin
and is run by cron
every 5 minutes. It looks in the log file (/Library/Logs/tivoli/tsm/dsmsched.log
– only root
can read it) and looks for certain key phrases, for example “completed successfully”.
When a backup has concluded successfully this is communicated to the user with the help of Growl/growlnotify
(which one must have). Additionally, a cuple of files are created in the directory /CS/Backup
:
• Backed_up_nodname_date.txt
• Bigfiles_nodname_date.txt
• Errors_nodname_date.txt
• TSM_diary_nodname.txt
These files tell the user which files have been backed up a specific day, which were > 10 MB and which errors that happend (if any). The purpose of these files is to make it possible and simple for the user to see for themself what happens with the backup.
The diary file loggs which messages are communicated to the user (and when). It also tells about the next feature:
Automatic update
When the script is more than a week old, it checks if there is a new version and then installs that (using checksums to make sure it's correct).
Additionally, a couple of files are added to the /CS
-directory: PDF document that tell the user about the backup system, which files are selected (and not) and how the user restores lost files themselves.
Report
tsm_check
normally reports using Growl and growlnotify (command line component of Growl). But tsm_check can be run interactively in a terminal window – by an admin user.
The following options can be used:
-s: 'sticky', makes the message stick (default)
-n: non 'sticky', the message will go away after 15 seconds
-l: presents a short message that only says 'Backup Successful'
-L: ”Long report”: tells how many files, how many MBytes and how long time it took
-t: mostly for debugging: tell you the time when the message was being showed
-S: speaks the message as well
-u: update the tsm_check scriptet. Must be run by root
Where the script resides
The script can be fetched here:
http://fileadmin.cs.lth.se/intern/Backup-klienter/TSM/Mac/tsm_check
Rights and stuff
We at the Dept. of Computer Science have written it and like to keep the copyright for it, but it's absolutely free to use and improve! :-) If you realize something that should be there, or any error, we are really happy to be informed of it!
Useful links for TSM
Descriptions of errors etc:
http://publib.boulder.ibm.com/infocenter/tivihelp/v1r1/index.jsp?topic=/com.ibm.itsmm.doc_5.3.3/update/ANR0480W.htm
(Replace the error message in the above link, “ANR0480W”, with what you have)
IBM:s description of the “restore” command:
http://publib.boulder.ibm.com/infocenter/tivihelp/v1r1/index.jsp?topic=%2Fcom.ibm.itsmfdt.doc%2Fans50000476.htm
Example from IBM on how to perform a backup from the command line:
http://publib.boulder.ibm.com/tividd/td/TSMC/GC32-0789-04/en_US/HTML/ans50000100.htm#back020
…and how to restore:
http://publib.boulder.ibm.com/tividd/td/TSMC/GC32-0789-04/en_US/HTML/ans50000127.htm
Documentation on EncryptKey:
http://publib.boulder.ibm.com/infocenter/tivihelp/v1r1/topic/com.ibm.itsmfdt.doc/ans50000288.htm?path=1_1_2_12_50#keysav
Documentation about “include” options (for encryption):
http://publib.boulder.ibm.com/infocenter/tivihelp/v1r1/topic/com.ibm.itsmfdt.doc/ans50000108.htm?path=1_1_2_7_2_4#encrypt
Extra information
We have written some extra information that is being delivered to the clients (end up in the /CS
directory). As a convenience, they are here as well:
Deselect files from the TSM Backup
How to restore files from the TSM backup
How to restore files from the TSM backup using CLI
Finally: if you need to perform an immediate backup, become root and type:dsmc incremental
in a terminal window – or run it in the GUI with “TSM for administrators”
(you need to know the admin account/password in both cases)