robocopy script : Insufficient system resources

北慕城南 提交于 2019-12-04 09:27:42

Based on a similar issue discussed here: the errors you are getting are issues related to Windows memory managent and availability of specific kind of resources (Kernel Paged Memory) which could happen during backups of big filesystems, or particularly large files.

Windows has a certain amount of memory pool space that it can allocate to programs, if the program uses all the memory available from that pool then ERROR 1450 (0x000005AA) raise up.

As literature several Microsoft Knowledge Base Articles describe this error code:

Specially Q304101 describes how to monitor resources to determine your state and offers a possible solution by tuning PoolUsageMaximum setting in Memory Management; this involvers changing registry settings therefore requires many cautions; you have been warned to read careffully the article before.

One thing you might do is separate the backup into different backups; together with monitoring memory this could help isolating the problem.

Let me suggest you an additional hint, to consider adding the /XJ swith to your comman line script; this way robocopy eXclude Junctions , this is important for example when copy user accounts (the \Users.. foleder) in some Windows such as Vista, because without this you can run in loop coused by some kind of hidden links called "junctions"

The Robust File Copy (Robocopy) won't be very robust if set to retry only once after waiting only one second. Retrying multiple times after waiting long enough for transitory errors to resolve will succeed a lot more often.

/R:n :: number of Retries on failed copies: default 1 million.
/W:n :: Wait time between retries: default is 30 seconds.

Retry a dozen times with a 30 second wait between:

/R:12 /W:30

I use 7-Zip to split any files larger than 4GB into 650MB Chunks. (7-Zip limitis what size you can split them into but, anything under 4GB works.) I then use Robocopy to copy each chunk down and use 7-Zip to reassemble the chunks back into the file. It even works with SQL Backup files. I haven't tried to automate this yet as I don't have to do it too often.

I found that using /Z restartable mode works best. It is a bit slower but at least it copes with larger files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!