免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3896 | 回复: 6
打印 上一主题 下一主题

[存储备份] 在command line执行tsm的脚本备份成功,但把该脚本放到crontab中执行时报错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-10 22:03 |只看该作者 |倒序浏览
用root用户直接执行自己写的脚本backtsm.sh进行tsm备份时,备份成功
#backtsm.sh      //运行该脚本备份成功
但把该脚本放到crontab中执行时报错:
ANS1398E Initialization functions cannot open one of the Tivoli Storage Manager
logs or a related file: /dsmerror.log. errno = 13, The file access permissions d
o not allow the specified action.



但是我的dsmerror.log文件的权限已经全部打开为:777,请教高手!!

[ 本帖最后由 ap0106404 于 2007-1-10 22:32 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-01-10 22:52 |只看该作者
This message is displayed and the process stops:
ANS1398E Initialization functions cannot open one of the Tivoli Storage Manager logs or a related file: /dsmerror.log. errno = 13, The file access permissions do not allow the specified action.
Beginning with TSM5.3, client applications will not run without a writable log. The system has denied write access to the log file named in the message. So the following (using dsmerror.log as an example, but all logs are treated equally) rules apply:
If the log does not exist, it will be created with default permissions
The name and the directory specified by the ERRORLOGNAME option will be used.
If the obtion is absent, the name dsmerror.log in the directory specified in the DSM_LOG environment variable, if present, will be used.
Otherwise, the name dsmerror.log in the current working directory will be used.

Because default permissions are used, a log created by the root user may not be writable by any other user. If this is the case, the root user must set the proper permissions or ACLs to allow free use of the TSM application by all users who need to use it.
If the log is successfully created, an error-free session will leave a zero-length (empty) log file.
The client does not attempt to create logs in the root directory. ANS1398E is displayed when the method in rule 1 directs the log file to be created in the root directory.
If a log file exists and can be located using the method in rule 1, it will be used (and it can be in the root directory if you choose). Furthermore, whatever permissions you give that log file will be preserved by TSM code.
Recommendation:
Create your log file in advance of first use, making sure all eligible users have write access to that log. Define the ERRORLOGNAME option or the DSM_DIR environment variable to designate your predefined log file.
Additional info:
Certain background TSM applications may fail to start due to errors writing to dsmerror.log. When these errors occur, a number of errors are recorded in the Windows system event log (System log on other platforms). One of which is an error indicating that dsmerror.log could not be written to.
For example:
C:\Program Files\Tivoli\Tsm\baclient>net start "TSM Sched"
The TSM sched service is starting.
The TSM Sched service could not be started.
A service specific error occurred: 12.
Additional setup steps are required for non-root users to run TSM applications or TSM for data protection applications. You will receive the ANS1398E error attempting to run TSM applications using an error log which has already been generated by root that is left with default permissions. For data protection clients, you may only receive a TSM API error <which one?>. Here is one method for setting up dsmerror.log for use by non-root users:

Set ERRORLOGNAME in dsm.sys. For example, errorLogName /var/msgs/tsm/dsmerror.log
Generate dsmerror.log. dsmc q sess
Modify the permissions on dsmerror.log to allow writing by all users. chmod 666 /var/msgs/tsm/dsmerror.log

论坛徽章:
1
水瓶座
日期:2014-03-20 18:21:14
3 [报告]
发表于 2007-01-11 12:19 |只看该作者
原帖由 ap0106404 于 2007-1-10 22:03 发表
用root用户直接执行自己写的脚本backtsm.sh进行tsm备份时,备份成功
#backtsm.sh      //运行该脚本备份成功
但把该脚本放到crontab中执行时报错:
ANS1398E Initialization functions cannot open one of th ...

crontab里面跑得脚本,要这样运行:
su - -c "your.sh"

论坛徽章:
0
4 [报告]
发表于 2007-01-11 14:28 |只看该作者
如果你用的TSM的话,你用TSM的自动调度就好了,没必要那么麻烦

论坛徽章:
0
5 [报告]
发表于 2007-01-19 09:56 |只看该作者

问题已解决,还会是日志文件dsmerror.log的问题

在系统中查找dsmerr.log日志文件,发现有多个dsmerr.log的文件,全部打开权限,备份成功。

论坛徽章:
0
6 [报告]
发表于 2007-01-19 12:44 |只看该作者
保证日志文件具有可写权限就ok了

论坛徽章:
0
7 [报告]
发表于 2007-01-19 13:23 |只看该作者
为啥不用自动调动呢,多简单啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP