|
Answer» Trying to backup my Z: drive to an external and got a Insufficient Memory error using xcopy. Anyone know of a work around for this? Is there a way to see what file might be causing the condition etc.
Drive is 750GB and it has about 600GB of data to backup to a 3TB external which has PLENTY of free space.
Quote Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
Z:\>xcopy *.* e:\2015z\*.* /s/d/y Insufficient memory 0 File(s) copied
Z:\> System has 4 GB DDR2 RAM, and 2.3GB free with Windows 7 with Firefox and command shell running.Most likely cause is that one or more of the paths you tried to copy is longer than 254 characters.
Workaround is to use Robocopy.
Seems this has been asked before as well, and Salmon Trout gave effectively the same answer.If you are using xcopy with the /F switch you get logging on screen so you can see where the trouble starts. The problem can occur if the fully qualified name of either a source or POTENTIAL destination file exceeds 254 characters. As BC_P says, you can use Robocopy (Microsoft, free) or XXCopy (free for non-commercial use). There is also the "subst trick" where you substitute a spare drive letter for some part of a problem path e.g. subst z: \\myopenbsdbox\daily-backups\username\computername\C\. QuoteIf you are using xcopy with the /F switch you get logging on screen so you can see where the trouble starts. Thanks for the info. I wasnt aware of using the /F switch as a way to display error condition cause as for xcopy normally displays the files being transferred anyways and so I always thought the /F switch was useless. Was thinking I might have exceeded a maximum file size supported by xcopy vs path length.
So Robocopy will allow exceeding the 254 character limit if thats the case here? I wasnt aware of that robocopy supported greater than 254 characters in path length.
QuoteMicrosoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\dave>xcopy/? Copies files and directory trees.
XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B] [/EXCLUDE:file1[+file2][+file3]...]
source Specifies the file(s) to copy. destination Specifies the location and/or name of new files. /A Copies only files with the archive attribute set, doesn't change the attribute. /M Copies only files with the archive attribute set, turns off the archive attribute. /D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time. /EXCLUDE:file1[+file2][+file3]... Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively. /P Prompts you before creating each destination file. /S Copies directories and subdirectories EXCEPT empty ONES. /E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T. /V Verifies the size of each new file. /W Prompts you to press a key before copying. /C Continues copying even if errors occur. /I If destination does not exist and copying more than one file, assumes that destination must be a directory. /Q Does not display file names while copying. /F Displays full source and destination file names while copying. /L Displays files that would be copied. /G Allows the copying of encrypted files to destination that does not SUPPORT encryption. /H Copies hidden and system files also. /R Overwrites read-only files. /T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories. /U Copies only files that already exist in destination. /K Copies attributes. Normal Xcopy will reset read-only attributes. /N Copies using the generated short names. /O Copies file ownership and ACL information. /X Copies file audit settings (implies /O). /Y Suppresses prompting to confirm you want to overwrite an existing destination file. /-Y Causes prompting to confirm you want to overwrite an existing destination file. /Z Copies networked files in restartable mode. /B Copies the Symbolic Link itself versus the target of the link. /J Copies using unbuffered I/O. Recommended for very large files.
The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line.
C:\Users\dave> https://en.wikipedia.org/wiki/Robocopy
QuoteFeatures
Robocopy is noted for capabilities above and beyond the built-in Windows copy and xcopy commands, including the following:
Ability to tolerate network interruptions and resume copying. (incomplete files are marked with a date stamp of 1970-01-01 and contain a recovery record so Robocopy knows where to continue from)
Ability to skip NTFS junction points which can cause copying failures because of infinite loops (/XJ)
Ability to copy file data and attributes correctly, and to preserve original timestamps, as well as NTFS ACLs, owner information, and audit information using command line switches. (/COPYALL or /COPY:) Copying folder timestamps is also possible in later versions (/DCOPY:T).
Ability to assert the Windows NT "backup right" (/B) so an administrator may copy an entire directory, including files denied readability to the administrator.
Persistence by default, with a programmable number of automatic retries if a file cannot be opened.
A "mirror" mode, which keeps trees in sync by optionally deleting files out of the destination that are no longer present in the source.
Ability to skip files that already appear in the destination folder with identical size and timestamp.
A continuously updated command-line progress indicator.
Ability to copy file and folder names exceeding 254 characters — up to a theoretical limit of 32,000 characters — without errors.
Multithreaded copying. (Windows 7 and Windows Server 2008 R2)
Return code on program termination for batch file usage.
Thanks for the info on robocopy ... and 32,000 character length is insane...LOL
Robocopy did solve the problem btw... thanks It's likely that with all the PC's you work on a 32,000 character limit is not out of the realm of possibilities...
|