Windows operating systems

Examples: Automating backups

This section provides examples of how to automate your backups.

About this task

The example below uses the following assumptions:

On the server:

Procedure

  1. Enter the following command on the server console or from an administrative client to define the schedule: def sched bacliwnt wnt_daily_incr desc="Daily Incremental Backup" priority=2 starttime=21:00 duration=15 durunits=minutes period=1 perunits=days dayofweek=any. The administrative client does not have to be running on the same system as the Tivoli Storage Manager server. Tivoli Storage Manager displays this message: ANR2500I Schedule WNT_DAILY_INCR defined in policy domain BACLIWNT.
  2. To associate the backup-archive client to this schedule, issue the following command: define association bacliwnt wnt_daily_incr mars. Tivoli Storage Manager displays this message: ANR2510I Node MARS associated with schedule WNT_DAILY_INCR in policy domain BACLIWNT. At this point, a schedule that performs an incremental backup is defined on the Tivoli Storage Manager server. The schedule starts around 9:00 pm. The schedule is re-executed once a day and can start on any day of the week. If you want to confirm that the schedule and association are set correctly, you can use the Query Schedule command.

Results

On the backup-archive client:

This example assumes that you installed the Tivoli Storage Manager backup-archive client in the c:\program files\tivoli\tsm\baclient directory. It also assumes that the options files in each of these directories are updated so that the communication parameters point to the Tivoli Storage Manager server.

  1. Login using an account with administrative privileges.
  2. Open a command prompt window and issue the following command: cd /d "c:\program files\tivoli\tsm\baclient". If the path contains a space, for example c:\program files\tivoli\tsm\baclient, enclose the name in double quotation marks.
  3. In the window, issue the following command: dsmcutil inst scheduler /name:"TSM Client Scheduler" /node:mars /password:marspswd /clientdir:"c:\program files\ tivoli\tsm\baclient" /optfile:"c:\program files\tivoli\tsm\ baclient\dsm.opt" /autostart:yes. Your system is now ready to run automatic daily incremental backups. The /autostart:yes option specifies that the scheduler service starts automatically each time the system is rebooted. You can use the /startnow:[Yes|No] option to specify whether to start the scheduler service after executing the command; the default is Yes. If you specify /startnow:No you must start the service manually using the services control panel applet on NT, or issue the following command: net start "TSM Client Scheduler".
  4. The scheduler uses the backup-archive client options file to validate the node and password, and to contact the server for schedule information. This example assumes that the dsm.opt file is updated so that the communication parameters point to the Tivoli Storage Manager server. If you see the following message: A communications error occurred connecting to the TSM server. You should ensure that the options file contains entries that point to the correct Tivoli Storage Manager server. You should also ensure that the server is running. Use the dsmcutil update command to correct one of the parameters which was incorrectly specified during the dsmcutil install. For example, to update the client directory and options file for the specified scheduler service, enter: dsmcutil update scheduler /name:"TSM Central Scheduler Service" /clientdir:c:\tsmptf3\baclient /optfile:c:\tsmptf3\baclient\dsm.opt. Then reissue the net start "TSM Client Scheduler" command.
Note:
  1. If any changes that affect the scheduler service are made to the backup-archive client options file, the scheduler service has to be restarted. If you are using CAD managed scheduling this is not necessary since the scheduler is restarted by the CAD for each backup and the changes are picked up. An example of this is the Tivoli Storage Manager server address or the schedule mode. This can be done by issuing the following commands: net stop "TSM Client Scheduler" and then net start "TSM Client Scheduler".
  2. The dsmsched.log file contains status information for the Tivoli Storage Manager scheduler service. In this example, the file is located in this path: c:\program files\tivoli\tsm\baclient\dsmsched.log. You can override this file name by specifying the schedlogname option in the options file, dsm.opt.
  3. Output from scheduled commands is sent to the log file. After scheduled work is performed, check the log to ensure the work completed successfully. When a scheduled command is processed the schedule log might contain the following entry: Scheduled event eventname completed successfully. This is merely an indication that 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 should assess the success or failure of the command by evaluating the return code from the scheduled command in the schedule log. The schedule log entry for the return code of the command is prefaced with the following text: Finished command. Return code is:.