1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
  2. Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)
    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

One node with Daily, Weekly, Monthly and Yearly schedules

Discussion in 'Backup / Archive Discussion' started by Rigido, Jan 8, 2017.

  1. Rigido

    Rigido ADSM.ORG Senior Member

    Joined:
    Apr 21, 2006
    Messages:
    103
    Likes Received:
    4
    Occupation:
    AIX, TSM and Storage specialist
    Location:
    Rome, Italy
    Hi, a customer asked for such backup schedule and I was thinking to:
    • Set offline backup day to Saturday at 07:00
    • Define daily, weekday, online backup
    • Define a weekly offline backup every Saturday with priority of 3
    • Define a monthly offline backup Saturday, first week of every month with priority of 2
    • Define a yearly offline backup Saturday, first week, January with priority of 1.
    The problem I see is that priority rely on window start and as we are talking about AIX shell scripts to start DB2 backups, start time is near 0 and I think TSM could try to start all other schedules.
    Am I wrong? Did someone face such configuration?

    Thanks.
     
  2.  
  3. moon-buddy

    moon-buddy ADSM.ORG Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,814
    Likes Received:
    358
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    To avoid such issues, don't use TSM scheduler. Use either Task scheduler (Windows) or CRON (UNIX/AIX/Linux).
     
  4. LED888

    LED888 ADSM.ORG Moderator

    Joined:
    Oct 15, 2002
    Messages:
    807
    Likes Received:
    62
    NOTE: If there is a problem encounter with the schedule backup.
    If you do not use the TSM Scheduler, there will be no messages in the dsmsched.log.
    Its because the schedule service/daemon did not start the schedule backup.
    Can look in the dsmerror.log, will not know what events leading up to the error since there are no messages in the dsmsched.log.

    When using the Task scheduler or CRON will need to redirect the out put into a file.
    Bad news, there will be no date and time stamp with the messages.

    Good Luck,
    Sias
     
  5. marclant

    marclant ADSM.ORG Moderator

    Joined:
    Jun 16, 2006
    Messages:
    2,533
    Likes Received:
    354
    Occupation:
    Accelerated Value Specialist for Spectrum Protect
    Location:
    Canada
  6. Rigido

    Rigido ADSM.ORG Senior Member

    Joined:
    Apr 21, 2006
    Messages:
    103
    Likes Received:
    4
    Occupation:
    AIX, TSM and Storage specialist
    Location:
    Rome, Italy
    Hi,
    I thought to switch from execute a shell script to launch a "su - USER -c" commnd so, if I understood well, the process will last as long as the backup process lasts so it should be enough to set the startup window to few minutes and lower priority schedules should not run.

    I would like to keep using TSM scheduler for the messages (thank you Marclant for the tip about clctimestamp) and for the centralized management.

    Instead of cron I would schedule a shell script that checks "which saturday is today" (1st of the year, 1st of the month or just another of the month) and launch the backup accordingly. ;)

    Thanks for the advices.
     
  7. Rigido

    Rigido ADSM.ORG Senior Member

    Joined:
    Apr 21, 2006
    Messages:
    103
    Likes Received:
    4
    Occupation:
    AIX, TSM and Storage specialist
    Location:
    Rome, Italy
    Something like this:
    Code:
    #!/bin/ksh
    
    #
    # Controlla se e' Sabato
    # %w: Displays the weekday as a decimal number in the range 0-6 (Sunday = 0).
    #
    WD=$(date +%w)
    if [ $WD -eq 6 ] ; then
      #
      # Controlla se e' il primo Sabato dell'anno
      # %j: Displays the day of year as a decimal number (001-366)
      #
      if [ $(date +%j) -lt 8 ] ; then
        FREQ="Y"
      #
      # Controllo se e' il primo Sabato del mese in corso
      # %d: Displays the day of the month as a decimal number (01-31)
      #
      elif [ $(date +%d) -lt 8 ] ; then
        FREQ="M"
      else
        FREQ="W"
      fi
    elif [ $WD -gt 0 ] ; then
      FREQ="D"
    else
      FREQ="NOGO"
    fi
    
    case "$FREQ" in
    "Y") echo "YEARLY" ;;
    "M") echo "MONTHLY" ;;
    "W") echo "WEEKLY" ;;
    "D") echo "DAILY" ;;
      *) echo "NO GO" ;;
    esac
    
    exit 0
     

Share This Page