无法使用“copy”、“robocopy”复制大数据库文件甚至“eseutil”

发布于 2024-08-20 15:19:11 字数 1188 浏览 11 评论 0原文

我在尝试为 Windows Server 编写的自动脚本中复制大型数据库文件(~100GB)时遇到问题。我尝试过使用“copy”、“robocopy”,甚至“eseutil”。

我的脚本在 Windows 2008 Server(文件的目标)上运行,并从 Windows 2003 Server(文件的源)中提取。

我已经尝试更改 IRPStackSize 注册表设置以及 HKLM/SYSTEM/CurrentControlSet/Control/SessionManager/MemoryManagement 配置单元中的两个设置。这一切都是在2008年的服务器上完成的,然后重新启动,没有效果。有人有好的解决方法吗?

Copy 和 Robocopy 都给我这个:

没有足够的服务器存储可用于处理此命令。

Eseutil.exe 给我这个:

H:\TempSQLBackups>eseutil /y \\SRC_SERVER\SQL_BACKUPS\BIG_DB.BAK /d H:\TempSQLBackups\BIG_DB.bak

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 08.01
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating COPY FILE mode...
     Source File: \\SRC_SERVER\SQL_BACKUPS\BIG_DB.BAK
Destination File: H:\TempSQLBackups\BIG_DB.bak

                      Copy Progress (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ........FAILURE: ReadFile: The specified network name is no longer available.


Operation terminated unsuccessfully after 11336.16 seconds.


H:\TempSQLBackups>

I am having a problem copying large DB files (~100GB) in an automated script I am trying to write for a Windows Server. I have tried using "copy", "robocopy", and even "eseutil".

My script is running on a Windows 2008 Server (destination of the file) and is pulling from a Windows 2003 Server (source of the file).

I have already tried changing the IRPStackSize registry setting, as well as both of the ones in the HKLM/SYSTEM/CurrentControlSet/Control/SessionManager/MemoryManagement hive. This was all done on the 2008 server and rebooted with no effect. Does anyone have a good workaround?

Copy and Robocopy both give me this:

Not enough server storage is available to process this command.

Eseutil.exe gives me this:

H:\TempSQLBackups>eseutil /y \\SRC_SERVER\SQL_BACKUPS\BIG_DB.BAK /d H:\TempSQLBackups\BIG_DB.bak

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 08.01
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating COPY FILE mode...
     Source File: \\SRC_SERVER\SQL_BACKUPS\BIG_DB.BAK
Destination File: H:\TempSQLBackups\BIG_DB.bak

                      Copy Progress (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ........FAILURE: ReadFile: The specified network name is no longer available.


Operation terminated unsuccessfully after 11336.16 seconds.


H:\TempSQLBackups>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

我是男神闪亮亮 2024-08-27 15:19:11

我想出了如何解决这个问题!

使用LINUX机器通过samba挂载源和目标目录/驱动器并通过网络复制它们。就我个人而言,我使用 rsync,因为它将重新创建目录结构,并且仅复制不存在或不同的文件。因此,您可以随时停止和/或重新启动,而不会丢失进度。

我不敢相信我们还在为这个垃圾操作系统付钱给微软。我也遇到了类似的问题,除了这个之外似乎没有其他解决办法。它有点慢,但并不像本地那样慢,因为它每次都会失败。

有一次我认为 robocopy 肯定会使用 /IPG:xx 选项(InterPacketGap 以毫秒为单位)来完成此操作。没有。它只会延长堆栈溢出和远程控制台锁定。我想,也许微软在这个操作系统上做对了。 Win2K8 的稳定性就到此为止了。啊! Windoze 适用于工作站。对于服务器,您需要服务器操作系统而不是修补代码。

I figured out how to fix this!

Use a LINUX machine to samba mount the source and destination directories/drives and copy them via the network. Personally, I use rsync since it will recreate the directory structure and only copy files that aren't there or are different. Thus, you can stop and/or restart at anytime without losing your progress.

I can't believe we're still paying Microsoft for this trash of an OS. I had similar problems and there seems to be no fix other than this one. Its a little slow but not nearly as slow as doing on natively since it will fail EVERY TIME.

At one point I thought robocopy would surely do it using the /IPG:xx option (InterPacketGap in milliseconds). Nope. It just PROLONGS the stack overflow and remote console lockout. I thought, maybe, Microsoft got it right with this OS. So much for Win2K8 being solid. Ugh! Windoze is for workstations. For servers you need a server OS not tinkertoy code.

故事和酒 2024-08-27 15:19:11

XCOPY/J选项结合使用可以避免大文件的网络故障。不过,这仅适用于 2008 R2 和 Windows 7。这解决了我的超时问题。

请检查。

Use the XCOPY with the /J option to avoid network failures of large files. This will ONLY works in 2008 R2 and Windows 7 though. This solved my timeout issue.

Please check.

悲喜皆因你 2024-08-27 15:19:11

您是否尝试过使用旧的拖放方式复制文件?

我会这样做一次,以确保不是您的网络故障。确保该方法有效,然后尝试查看其他解决方案。

1) 确保您的目标驱动器是 NTFS 而不是 Fat32。
2)检查复制失败的时候,是否总是在同一个点? (IE如果在2gb之后总是失败)

Have you tried to copy the files with the old fasion way of drag and drop?

I would do this once, to make sure its not your network failing. Make sure that works, and then try look at other solutions.

1) Make sure your destination drive, is NTFS and NOT Fat32.
2) Check when its failing to copy, is it always at the same point? ( IE if it always failing after 2gb )

生活了然无味 2024-08-27 15:19:11

您尝试过 xcopy 吗?它更适合大文件和递归复制。 文档

此外,根据我自己的经验,使用网络驱动器和命令行是一件痛苦且有问题的事情。映射网络驱动器并使用驱动器号(例如 z:\)也是一个好主意

xcopy /K /R /E /I /S /C /H /G /X /Y s:\*.* t:\

/K 复制属性。普通Xcopy会重置只读属性。

/R 覆盖只读文件。

/E 复制目录和子目录,包括空目录。

/I 如果目标不存在并且复制多个文件,则假定目标必须是一个目录。

/S 复制目录和子目录(空目录除外)。

/C 即使发生错误也继续复制。

/H 还复制隐藏文件和系统文件。

/Y 禁止提示您确认要覆盖现有目标文件。

/G 允许将加密文件复制到不支持加密的目标。

/X 复制文件审核设置(隐含 /O)。

Have you tried xcopy? It works better for large files and recursive copy. doc

Also, from my own experience working with network drives and command line is a pain and buggy. It is also a good idea to map the network drive and use drive letter such as z:\

xcopy /K /R /E /I /S /C /H /G /X /Y s:\*.* t:\

/K Copies attributes. Normal Xcopy will reset read-only attributes.

/R Overwrites read-only files.

/E Copies directories and subdirectories, including empty ones.

/I If destination does not exist and copying more than one file, assumes that destination must be a directory.

/S Copies directories and subdirectories except empty ones.

/C Continues copying even if errors occur.

/H Copies hidden and system files also.

/Y Suppresses prompting to confirm you want to overwrite an existing destination file.

/G Allows the copying of encrypted files to destination that does not support encryption.

/X Copies file audit settings (implies /O).

高跟鞋的旋律 2024-08-27 15:19:11

eseutil 第二部分的格式应为:

/d\\server\folder\filename

请注意,/d 后面没有空格

The format for the second part of eseutil should be:

/d\\server\folder\filename

Notice there is no space after the /d

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文