数据库备份 Robocopy
我有一个作业每 15 分钟运行一次,它使用 robocopy 将事务日志的备份复制到不同的服务器。此作业失败 用户对主文件夹和目标文件夹具有完全访问权限。
作业 SQL:
robocopy "e:\Backup\SQL02$PROD" “\SERVER\DRIVE$\prod\sql\backup\” /MIR /E /Z /NS /NFL /NDL /NJH /NP /R:10 /W:30 if %errorlevel% LSS 8 set errorlevel=0
错误日志:
日期 22/06/2010 09:05:00 记录作业历史记录(将生产备份同步到 app040)
步骤 ID 1 服务器 NDAHHSQL02\生产 作业名称 同步生产备份到 app040 步骤名称 robocopy 制作 持续时间 00:00:00 SQL 严重性 0 SQL消息ID 0 操作员通过电子邮件发送
运营商网络发送
操作员寻呼
已尝试重试 0 条
消息 以用户身份执行:DOMAIN\USER。 2010/06/22 09:05:00
ERROR 5 (0x00000005) 获取目标的文件系统类型 \\SERVER\DRIVE$\prod\sql\backup\ 访问被拒绝。
2010/06/22 09:05:00 ERROR 5 (0x00000005) 创建目标目录 \\SERVER\DRIVE$\prod\sql\backup\ 访问被拒绝。处理退出代码 16。该步骤失败。
I have job that runs every 15 minutes that uses robocopy to copy a backup of the tranaction logs to a different server. This job is failing USER has full access rights to both home folder and the destination folder.
JOB SQL:
robocopy "e:\Backup\SQL02$PROD"
"\SERVER\DRIVE$\prod\sql\backup\" /MIR /E /Z /NS /NFL /NDL /NJH /NP /R:10 /W:30
if %errorlevel% LSS 8 set errorlevel=0
Error Log:
Date 22/06/2010 09:05:00
Log Job History (Sync Production backup to app040)
Step ID 1
Server NDAHHSQL02\PRODUCTION
Job Name Sync Production backup to app040
Step Name robocopy production
Duration 00:00:00
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: DOMAIN\USER. 2010/06/22 09:05:00
ERROR 5 (0x00000005) Getting File System Type of Destination \\SERVER\DRIVE$\prod\sql\backup\ Access is denied.
2010/06/22 09:05:00 ERROR 5 (0x00000005) Creating Destination Directory \\SERVER\DRIVE$\prod\sql\backup\ Access is denied. Process Exit Code 16. The step failed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经解决了这个问题 虽然该文件夹具有帐户在其间复制文件的权限,但没有在根驱动器上设置共享权限。
共享权限教程链接
I have solved the issue Although the folder had permissions for the account to copy files accross it did not have share permissions set on the root drive.
Link to share permissions tutorial
用户无权将备份文件写入 \SERVER\DRIVE$\prod\sql\backup\。
The user does not have access to write the backup file to \SERVER\DRIVE$\prod\sql\backup\.