![]() |
![]() |
[ | | | ]
This chapter applies to the Authorized User only. Root authorization is only required when updating the /etc/inittab and /etc/rc files.
Your administrator can schedule Tivoli Storage Manager to perform tasks automatically. For example, you can automatically back up files at the end of each day or archive some of your files every Friday. This procedure, known as central scheduling, is a cooperative effort between the server and your client node. Your administrator associates clients with one or more schedules that are part of the policy domain maintained in the server database. The administrator defines central scheduling on the server and you start the client scheduler on your workstation. Once you start the client scheduler, further intervention is not necessary.
With client scheduling, you can also:
Notes:
You can modify scheduling options in the client system options file (dsm.sys) or in the graphical user interface. However, if your administrator specifies a value for these options, that value overrides the value in your client.
For more information about scheduling options, changing the scheduling mode, specifying the TCP/IP address or port number, or running commands before or after a schedule, see "Scheduling options".
See the following sections for more information:
for more information.
To start the client scheduler on your client node and connect to the server schedule, enter the following command:
dsmc schedule
If the current directory is not in your PATH environment variable, enter the following command:
./dsmc schedule
When you start the client scheduler, it runs continuously until you close the window, end the process, or log off your system.
To run the schedule command in the background and to keep the client scheduler running, even if you log off your system, enter the following:
nohup dsmc schedule 2> /dev/null &
If a Tivoli Storage Manager password is required for your workstation and you want to run the schedule command in the background, enter the password with the command.
Root User: To start the client scheduler automatically, ensure that the passwordaccess option is set to generate in your client system options file (dsm.sys), then follow the procedure below for your operating system:
itsm::once:/usr/bin/dsmc sched > /dev/null 2>&1 # TSM scheduler
cd /usr/lpp/Tivoli/tsm/client/ba/bin sleep 60 ./dsmc scheduleThis prevents the creation of two jobs with the same name and enables automatic shutdown. You might need to customize the time for your system.
# Set environment variables to retrieve the servername and # nodename options from dsm.sys. export DSM_DIR=/tivoli/tsm/client/ba/bin export DSM_CONFIG=/tivoli/tsm/client/ba/bin/dsm.opt # Start the TSM Client scheduler and redirect outputs to # schedule.out instead of the /etc/log file. _BPX_JOBNAME='ADSMCLNT' /tivoli/tsm/client/ba/bin/rundsmc 1>/tivoli/tsm/client/ba/bin/schedule.out 2>&1 &
The client scheduler can fail to initialize properly at IPL because TCP/IP is not fully initialized. You might need to customize the time for your system to compensate for this.
Tivoli Storage Manager does not recognize changes made to the dsm.opt or the dsm.sys file while the client scheduler is running. If you make changes to these files while the client scheduler is running, and you want to use the new values immediately, stop the client scheduler and restart it. For example, if you change the inclexcl option in your dsm.sys file to point to a different include-exclude options file, you must stop the client scheduler and restart it before Tivoli Storage Manager uses the new file.
To manually stop the client scheduler, enter the kill command if it is running in the background, or press q or Ctrl+C if it is running in the foreground. To restart the client scheduler, enter the schedule command again.
Tape prompting does not occur during a scheduled event regardless of the tapeprompt option setting in your options file.
Use the Client Acceptor daemon to manage the client scheduler. See Configuring the client scheduler for more information.
See Configuring Tivoli Storage Manager client/server communication across a firewall for information about enabling the backup-archive client, command line admin client, and the scheduler to run outside a firewall.
The backup-archive command line interface and the scheduler exit with return codes that accurately reflect the success or failure of the client operation. Users who already have scripts, batch files, or other scheduling or automation facilities that interpret the return code from the command line interface may need to make changes in order to accommodate these new return codes.
In general, the return code is related to the highest severity message during the client operation.
The exception to the above rules are warning or error messages that individual files could not be processed. For such a skipped file, the return code will be 4. For cases where the return code is not 0, you can examine the dsmerror.log file (and, for scheduled events, the dsmsched.log file).
For a description of the return codes and their meanings, see Table 42
Table 42. Return codes and their meanings
Code | Explanation |
---|---|
0 | All operations completed successfully. |
4 | The operation completed successfully, but some files were not
processed. There were no other errors or warnings. This return
code is very common. Files are not processed for various
reasons. The most common reasons are:
|
8 | The operation completed with at least one warning message. For scheduled events, the status will be Completed. Review dsmerror.log (and dsmsched.log for scheduled events) to determine what warning messages were issued and to assess their impact on the operation. |
12 | The operation completed with at least one error message (except for error messages for skipped files). For scheduled events, the status will be Failed. Review the dsmerror.log file (and dsmsched.log file for scheduled events) to determine what error messages were issued and to assess their impact on the operation. As a general rule, this return code means that the error was severe enough to prevent the successful completion of the operation. For example, an error that prevents an entire file system from being processed yields return code 12. When a file is not found the operation yields return code 12. |
other | For scheduled operations where the scheduled action is COMMAND, the
return code will be the return code from the command that was executed.
If the return code is 0, the status of the scheduled operation will be
Completed. If the return code is nonzero, then the status
will be Failed.
Some commands may issue a nonzero return code to indicate success. For these commands, you can avoid a Failed status by wrapping the command in a script that invokes the command, interprets the results, and exits with return code 0 if the command was successful (the script should exit with a nonzero return code if the command failed). Then ask your Tivoli Storage Manager server administrator modify the schedule definition to invoke your script instead of the command. |
The return code for a client macro will be the highest return code issued
among the individual commands that comprise the macro. For example,
suppose a macro consists of these commands:
selective "/home/devel/*" -subdir=yes
incremental "/home/devel/TestDriver/*" -subdir=yes
archive "/home/plan/proj1/*" -subdir=yes
If the first command completes with return code 0; the second command completes with return code 8; and the third command completes with return code 4, the return code for the macro will be 8.
Also see Handling return codes from preschedulecmd and postschedulecmd Scripts.
To view schedules that are defined for your client node, enter:
dsmc query schedule
Tivoli Storage Manager displays detailed information about all scheduled work for your client node. The figure below displays sample query schedule output.
Figure 1. Sample query schedule output
Schedule Name: DAILY_INC Description: Daily System-wide backup Action: Incremental Options: QUIET Objects: Priority: 1 Next Execution: 30 minutes Duration: 4 Hours Period: 1 Day Day of Week: Any Expire: Never Schedule Name: WEEKLY_INC Description: Weekly backup for project files Action: Incremental Options: QUIET Objects: /proj Priority: 1 Next Execution: 60 minutes Duration: 8 Hours Period: 7 Days Day of Week: Friday Expire: Never |
The schedule name, DAILY_INC, starts a daily incremental backup. The next incremental backup will start in 30 minutes. Because no objects are listed, Tivoli Storage Manager runs the incremental backup on your default domain. The schedule has no expiration date.
The schedule name, WEEKLY_INC, starts a weekly incremental backup in the /proj file system.
When you run the schedule command in the foreground, your screen displays output from the scheduled commands. Output is also directed to the dsmsched.log file in the current directory unless you change the path and file name using the schedlogname option.
When you run the schedule command in the background, output from scheduled commands is directed to the dsmsched.log file in the current directory, or to the path and file name that you specified. Please note that the dsmsched.log cannot be a symbolic link.
After scheduled work is performed, check the schedule log to verify that all work completed successfully.
When a scheduled command is processed the schedule log contains the following entry:
Scheduled event eventname completed successfully
The client indicates whether Tivoli Storage Manager successfully issued the scheduled command associated with the eventname. No attempt is made to determine the success or failure of the command. You can assess the status of the command by evaluating the return code from the scheduled command in the schedule log. The schedule log entry for the command's return code is prefaced with the following text:
Finished command. Return code is:
The schedule log continues to grow unless you prune it using the schedlogretention option. See "Specifying scheduling options" for more information.
The scheduler executes commands under a user ID of 0 (root); however, some commands might need to be executed under a user ID different than 0. In this case, your Tivoli Storage Manager administrator can define schedules for commands that will be executed under a user ID different from the scheduler user ID using the schedcmduser server option.
The schedcmduser option specifies the name of a valid user on the system where a scheduled command is executed. This option can only be defined by the Tivoli Storage Manager server administrator. If this option is specified, the command is executed with the authorization of the specified user. Otherwise, it is executed with the scheduler authorization.
>>-SCHEDCMDUser---user_name------------------------------------><
You can use the schedcmddisabled option to disable the scheduling of commands by the server. Commands are scheduled by using the action=command option on the define schedule server command.
The schedcmddisabled option does not disable the preschedulecmd and postschedulecmd commands. However, you can specify preschedulecmd or postschedulecmd with a blank or a null string to disable the scheduling of these commands. See Schedcmddisabled for more information.