One node with Daily, Weekly, Monthly and Yearly schedules

Rigido

ADSM.ORG Senior Member
Joined
Apr 21, 2006
Messages
151
Reaction score
7
Points
0
Location
Rome, Italy
PREDATAR Control23

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.
 
PREDATAR Control23

To avoid such issues, don't use TSM scheduler. Use either Task scheduler (Windows) or CRON (UNIX/AIX/Linux).
 
PREDATAR Control23

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
 
PREDATAR Control23

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.
 
PREDATAR Control23

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
 
Top