Results 1 to 6 of 6
  1. #1
    Newcomer
    Join Date
    Jun 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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!

  2. #2
    Moderator chad_small's Avatar
    Join Date
    Dec 2002
    Location
    Gilbert, AZ
    Posts
    2,191
    Thanks
    1
    Thanked 25 Times in 24 Posts

    Default

    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 ....
    Chad Small
    IBM Certified Deployment Professional
    chadsmal@gmail.com
    http://www.tsmadmin.com

  3. #3
    Newcomer
    Join Date
    Jun 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Moderator chad_small's Avatar
    Join Date
    Dec 2002
    Location
    Gilbert, AZ
    Posts
    2,191
    Thanks
    1
    Thanked 25 Times in 24 Posts

    Default

    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'
    Chad Small
    IBM Certified Deployment Professional
    chadsmal@gmail.com
    http://www.tsmadmin.com

  5. #5
    Moderator chad_small's Avatar
    Join Date
    Dec 2002
    Location
    Gilbert, AZ
    Posts
    2,191
    Thanks
    1
    Thanked 25 Times in 24 Posts

    Default

    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 `
    Chad Small
    IBM Certified Deployment Professional
    chadsmal@gmail.com
    http://www.tsmadmin.com

  6. #6
    Newcomer
    Join Date
    Jun 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  1. File Systems backup in AIX
    By mohsin786 in forum TSM Installation, Upgrade and Configuration
    Replies: 3
    Last Post: 01-07-2010, 04:43 AM
  2. Scripting help needed!!!
    By rprice6 in forum Scripting
    Replies: 4
    Last Post: 12-05-2008, 08:07 AM
  3. Moving data across file systems
    By Aria in forum Backup / Archive Discussion
    Replies: 5
    Last Post: 02-20-2008, 08:10 PM
  4. Replies: 0
    Last Post: 07-10-2006, 05:31 PM
  5. TSM 5.2.3.4 and MS Encrypted File Systems
    By Clumster in forum Backup / Archive Discussion
    Replies: 1
    Last Post: 11-09-2004, 07:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •