今天试验了一把 schedule 的定制:
tsm: TSM_SVR1>define schedule do_vtl daily_backup startdate=01/20/2012 starttime=10:00 duration=6 durunits=hours perunits=days
ANR2500I Schedule DAILY_BACKUP defined in policy domain DO_VTL.
其实这个help define schedule 里面还有example 很详细的。
tsm: TSM_SVR1>update schedule do_vtl daily_backup startdate=01/20/2012 starttime=10:00 duration=6 objects="/shp/daily_back.sh" durunits=hours perunits=days
Session established with server TSM_SVR1: Linux/i386
Server Version 5, Release 5, Level 1.0
Server date/time: 05/18/2008 02:22:40 Last access: 05/18/2008 01:43:06
ANR2502I Schedule DAILY_BACKUP updated in policy domain DO_VTL.
cat /shp/daily_back.sh
#! /bin/sh
logfile=/shp/log/`date +%Y_%m_%d__%H_%M_%S`.log
cd /opt/tivoli/tsm/client/ba/bin/
./dsmc selective /home/ -subdir=yes >> $logfile
tsm: TSM_SVR1>q sche
Domain * Schedule Name Action Start Date/Time Duration Period Day
------------ - ---------------- ------ -------------------- -------- ------ ---
DO_VTL DAILY_BACKUP Inc Bk 01/20/2012 10:00:00 6 H 1 D Any
tsm: TSM_SVR1>q sche f=d
Policy Domain Name: DO_VTL
Schedule Name: DAILY_BACKUP
Description:
Action: Incremental
Options:
Objects: /shp/daily_back.sh
Priority: 5
Start Date/Time: 01/20/2012 10:00:00
Duration: 6 Hour(s)
Schedule Style: Classic
Period: 1 Day(s)
Day of Week: Any
Month:
Day of Month:
Week of Month:
Expiration:
Last Update by (administrator): ADMIN
Last Update Date/Time: 05/18/2008 02:22:40
Managing profile:
因为client 时间是
[root@sheng log]# echo `date +%Y_%m_%d__%H_%M_%S`
2012_01_20__18_29_17
[root@sheng log]# date
Fri Jan 20 18:35:11 PST 2012
我看到:
q sche f=d 是,Last Update Date/Time: 05/18/2008 02:22:40
看来是startdate 时候不对,
看一下备份的log ,没有东西生成,
看一下event 时间记录:
tsm: TSM_SVR1>q event do_vtl DAILY_BACKUP
ANR2034E QUERY EVENT: No match found using this criteria.
ANS8001I Return code 11.
也是没有,下面改一下startdate:
update schedule do_vtl daily_backup startdate=05/17/2008 starttime=02:00 duration=6 objects="/shp/daily_back.sh" durunits=hours perunits=days
tsm: TSM_SVR1>q sch f=d
Policy Domain Name: DO_VTL
Schedule Name: DAILY_BACKUP
Description:
Action: Incremental
Options:
Objects: /shp/daily_back.sh
Priority: 5
Start Date/Time: 05/17/2008 10:00:00
Duration: 6 Hour(s)
Schedule Style: Classic
Period: 1 Day(s)
Day of Week: Any
Month:
Day of Month:
Week of Month:
Expiration:
Last Update by (administrator): ADMIN
Last Update Date/Time: 05/18/2008 02:41:25
Managing profile:
应该可以了啊。
但是确实还是没有备份,
原因找到,是没有做关联:
DEFINE ASSOCIATION (Associate client nodes with a schedule)
下面做一下:
tsm: TSM_SVR1>define ASSOCIATION do_vtl daily_backup huiping
ANR2510I Node HUIPING associated with schedule DAILY_BACKUP in policy domain DO_VTL.
tsm: TSM_SVR1>q event do_vtl daily_backup f=d
Policy Domain Name: DO_VTL
Schedule Name: DAILY_BACKUP
Node Name: HUIPING
Scheduled Start: 05/18/2008 02:00:00
Actual Start:
Completed:
Status: Pending
Result:
Reason:
tsm: TSM_SVR1>q event do_vtl daily_backup
Scheduled Start Actual Start Schedule Name Node Name Status
-------------------- -------------------- ------------- ------------- ---------
05/18/2008 02:00:00 DAILY_BACKUP HUIPING Pending
pengding 问题不知道在哪,以后研究。
-----------
继续研究,发现client 没有启动 调度程序:
:启动客户机调度程序。为了使调度可用于工作站,用户必须从节点启动调度程序
启动后:
root@sheng bin]# ./dsmc schedule
IBM Tivoli Storage Manager
Command Line Backup/Archive Client Interface
Client Version 5, Release 5, Level 1.0
Client date/time: 01/20/2012 22:54:33
(c) Copyright by IBM Corporation and other(s) 1990, 2008. All Rights Reserved.
TSM Backup-Archive Client Version 5, Release 5, Level 1.0
Querying server for next scheduled event.
Node Name: HUIPING
Session established with server TSM_SVR1: Linux/i386
Server Version 5, Release 5, Level 1.0
Server date/time: 05/18/2008 06:46:02 Last access: 05/18/2008 02:59:19
Next operation scheduled:
------------------------------------------------------------
Schedule Name: DAILY_BACKUP
Action: Incremental
Objects: /shp/daily_back.sh
Options:
Server Window Start: 02:00:00 on 05/18/2008
------------------------------------------------------------
Command will be executed in 46 minutes.
Time remaining until execution: 00:40:17