Results 1 to 6 of 6
-
06-29-2011, 05:12 PM #1Newcomer
- Join Date
- Jun 2011
- Posts
- 4
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Scripting Help Needed for Backing up NAS File Systems
Hi, I'm wondering if anyone could help me out here with a script I need to write.
I need the script to start four concurrent NAS backup jobs of filesystems and then as one finishes - start another one up, making sure there is only ever 4 jobs running at one time (a limitation of Celerra data movers). I have about 14 filesystems I need to get backed up. If anyone has any ideas to get me started on how to script this I would appreciate it a lot.
Thanks!
-
06-29-2011, 05:43 PM #2
Define the commands in a TSM script by putting the commands in a list and use WAIT=YES along with the SERIAL and PARALLEL options. What the example shows below is 4 run using the PARALLEL option and the SERIAL tells TSM to wait til the previous 4 commands complete before running the next line which is PARALLEL which will allow the next 4 to kick off then the serial tells TSM to wait for those 4 to complete to move to the next line and so on...
EXAMPLE TSM SCRIPT
PARALLEL
BACKUP NODE NAS1 /vol/vol0 mgmt=NASclass toc=YES wait=YES mode=FULL
BACKUP NODE NAS1 /vol/vol1 mgmt=NASclass toc=YES wait=YES mode=FULL
BACKUP NODE NAS1 /vol/vol2/data mgmt=NASclass toc=YES wait=YES mode=FULL
BACKUP NODE NAS1 /vol/vol3/data2 mgmt=NASclass toc=YES wait=YES mode=FULL
SERIAL
PARALLEL
BACKUP NODE NAS1 /vol/vol4/DB mgmt=NASclass toc=YES wait=YES mode=FULL
BACKUP NODE NAS1 /vol/vol5/file01 mgmt=NASclass toc=YES wait=YES mode=FULL
BACKUP NODE NAS1 /vol/vol6/file02 mgmt=NASclass toc=YES wait=YES mode=FULL
BACKUP NODE NAS1 /vol/vol7/file03 mgmt=NASclass toc=YES wait=YES mode=FULL
SERIAL
PARALLEL ....
-
06-29-2011, 05:57 PM #3Newcomer
- Join Date
- Jun 2011
- Posts
- 4
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Thanks, I understand this will work. My aim though is to always have 4 backups running at any given time to optimize my backup window. The Files systems vary in sizes so for example - vol0 could finish hours before vol2 so for those hours I'm only having 3 file systems backing up. I'm sure there must be a way to do this - I'm just not sure of the syntax that's valid in the admin scripting that I could use.
I'm thinking I could use a counter - a variable that keeps track of how many jobs are running. When one job finishes it decreases the counter - indicating another job can start, which, in turn, increases the counter.
I'm just new to TSM in general so I'm not sure what kind of scripting I can do with it.
-
06-29-2011, 06:50 PM #4
You'd need to run a select that counts the # of NAS backup processes and if less than 4 it kicks off the next line in a list until the count reachs 4 then pauses and checks every X minutes until the list is completed.
I figure the following would count the processes....now to just write the rest.
J=`dsmadmc -id=admin -pa=admin -servern=TSMSERV1 -dataonly=yes select count(process) from processes where process='NAS Backup'
-
06-29-2011, 06:57 PM #5
On further testing that select works best if you make it a macro and call it from the dsmadmc command.
macro
select count(process) from processes where process='NAS Backup'
Portion of shell script
J=`dsmadmc -id=admin -pa=admin -servern=TSMSERV1 -dataonly=yes macro /home/user1/macros/process_chk.mac `
-
06-29-2011, 07:02 PM #6Newcomer
- Join Date
- Jun 2011
- Posts
- 4
- Thanks
- 0
- Thanked 0 Times in 0 Posts
That is a great idea! Although I do have a bit of a wrench. I have 3 celerra data movers so I can have 4 jobs running on EACH running so doing a general count of NAS backup processes won't quite work. My plan was to have 3 scripts. One for backups on each data mover. I assume I could just add to the SQL select .."where node=<node name specific to Datamover> and that would solve the issue?
Similar Threads
-
File Systems backup in AIX
By mohsin786 in forum TSM Installation, Upgrade and ConfigurationReplies: 3Last Post: 01-07-2010, 04:43 AM -
Scripting help needed!!!
By rprice6 in forum ScriptingReplies: 4Last Post: 12-05-2008, 08:07 AM -
Moving data across file systems
By Aria in forum Backup / Archive DiscussionReplies: 5Last Post: 02-20-2008, 08:10 PM -
Sr. Systems Engineer/Consultant needed in Denver, CO (Need Expert TSM and AIX Skills)
By dfoshe in forum Storage Management JobsReplies: 0Last Post: 07-10-2006, 05:31 PM -
TSM 5.2.3.4 and MS Encrypted File Systems
By Clumster in forum Backup / Archive DiscussionReplies: 1Last Post: 11-09-2004, 07:55 PM


Reply With Quote
