Windows 10: Tough Command Line Backup using Robocopy or Xcopy

Discus and support Tough Command Line Backup using Robocopy or Xcopy in Windows 10 Backup and Restore to solve the problem; I must backup my BSOD'd PC from the command line before re-installing Windows 10, but Robocopy is glacially slow and Xcopy emits"Insufficient Memory"... Discussion in 'Windows 10 Backup and Restore' started by cabujones, Feb 12, 2018.

  1. cabujones Win User

    Tough Command Line Backup using Robocopy or Xcopy


    I must backup my BSOD'd PC from the command line before re-installing Windows 10, but Robocopy is glacially slow and Xcopy emits"Insufficient Memory" (due to long pathnames). I am now running Windows 10 from a USB 3.0 drive downloaded from MSft which brought me to [Install Now] or [Repair Your Computer]. Though MS states that [Install Now] would not destroy my personal files, I do not trust that. Hence I wish to first backup from [Repair Your Computer] at command line. I already tried the System Restore option to no avail. And other options like [Safe Mode with Command Prompt] just gets me back to the BSOD. So I am now at a Command Prompt X:>

    • Robocopy /e /zb /b /sl /xj /create from C:\users to Seagate D:\users runs at a glacial 80MB/hr and would take thousands of hours to back up anything sizable.
    • Xcopy /e /c /h /y /b /s /r runs at a tolerable 25GB/hr (20hrs for my entire C: drive). However it stops with "Insufficient Memory" which definitely is a pathname > 256 chars problem, and I have many of them--for example, in .eml filenames of which I have about 100,000. Note that the /c option already requests "continue on error" but apparently not that error. There is a LongPathNames=0 setting in the registry which I can set to 1, but the doc says I need to reboot and this does not appear to get saved on the USB drive.
    • Even though I cannot boot from my C:drive, I can run many executables from them. Can I run standard MS backup from the command line and make a disk image? I do not need a backup to restore from, just want to keep all my data in case Windows 10 re-install destroys too much. I found that System32/sdclt.exe does not run alone. The Seagate backup utilities on D: are not compatible with Windows 10.
    This post is mainly to ask if anyone knows why Robocopy is so slow or how I could get around the LongPathNames in Xcopy. I have spent many many hours trying to restore.

    :)
     
    cabujones, Feb 12, 2018
    #1

  2. xcopy copy set-up

    Robocopy has superseded Xcopy, we are just going to focus on using that command for this example. Robocopy includes a number of arguments you can use to copy lots of folders thoroughly. It’s particularly great for creating backups. For instance, if I want
    to make a backup copy of my Downloads folder to a folder on my thumb drive named Backup, this is how you do it.

    robocopy “D:\Users\Andre\Downloads” “F:\Backup”

    source:
    https://www.groovypost.com/howto/10-command-lin...
     
    Andre Da Costa, Feb 12, 2018
    #2
  3. Command Line - Command for paste

    The command line supports several types of copy commands:

    Copy: If you just want to copy files or folders from location to the other.

    Xcopy: A robust copy option suitable for copying the contents of a folder with subfolders to a destination folder. Xcopy is being superseded by Robocopy which provides the same functionality.

    Here are some examples how to use these copy commands.

    I want to copy the PowerPoint presentation named Evolution of the Settings interface.pptx to the Work folder located in the Groovy folder we created earlier. First, change your directory to the location of the file.

    In my case, the PowerPoint file is in my User folder under Documents. First, type the copy command, followed by a file name with open and close quotes then the file path destination, example: copy “Evolution of the Settings interface.pptx” c:\Users\Andre\Documents\Sample\Groovy\Work

    Since Robocopy has superseded Xcopy, we are just going to focus on using that command for this example. Robocopy includes a number of arguments you can use to copy lots of folders thoroughly. It’s particularly great for creating backups. For instance, if I
    want to make a backup copy of my Downloads folder to a folder on my thumb drive named Backup, this is how you do it.

    robocopy “D:\Users\Andre\Downloads” “F:\Backup”

    Learn more:
    https://www.groovypost.com/howto/10-command-lin...
     
    Andre Da Costa, Feb 12, 2018
    #3
  4. lx07 Win User

    Tough Command Line Backup using Robocopy or Xcopy

    Why not use Windows 10 Recovery Tools - Bootable Rescue Disk - Windows 10 Forums ?

    It is a bootable PE image that contains Macrium, AOMEI and Acronis so you could make an image with whichever you prefer. That would be the fastest way to backup.

    As for robocopy I'm not sure why it is slow - it is faster than xcopy for me. You could try with the /mt switch (multi threading) and reduce the wait and retry

    Something like Code: robocopy <whatever> /b /e /r:0 /w:0 /copyall /mt /log:<wherever>.log[/quote]
     
  5. cabujones Win User
    @Ix07: Thank you kindly for your prompt reply. I was using a win10 recovery .iso downloaded from MSFT, but it does not have a lot of tools. But now I don't know how to create a bootable USB drive with Winpese on it (MSFT webpage created the one I am using). What I tried: I downloaded the Winpese-x64-.iso to a win7 laptop, formatted a USB flash drive there as a 32GB fat32 (using Diskpart) and copied the downloaded .iso to it. But when I put that USB into my win10 and selected the Boot Manager, it does not find the new .iso. It finds my windows hard drive, and my windows recovery iso as bootable, but does not see the Winpese as a bootable drive.
    - How do I put the Winpese.iso on a USB drive and make it bootable?
     
    cabujones, Feb 12, 2018
    #5
  6. lx07 Win User
    1. Insert the USB flash drive.
    2. Open a Command Prompt and enter: diskpart (if it isn't an administrator command prompt, it will ask for administrator permission).
    3. list disk
    4. select disk # <- replace # with the actual disk number of the USB flash drive
    5. clean <- this will erase the disk selected above, make sure it is the USB flash drive!
    6. create partition primary
    7. format fs=fat32 quick
    8. active
    9. exit <enter> exit <enter> - and if the first command prompt was not an administrator command prompt, exit that one too.

    Mount ISO. In Windows 10 it is easy - you just double click. If you are using Windows 7 it is more convoluted - you can see this tutorial: ISO - Disk Image File : Extract to the Desktop - Windows 7 Help Forums

    Copy contents of ISO (not the ISO file) to the USB key. It should look like this (except for the "Other" directory which is something I added - you don't need that)...



    Tough Command Line Backup using Robocopy or Xcopy [​IMG]


    Disable secureboot in your UEFI (if it is turned on) then it should boot.
     
  7. cabujones Win User
    @Ix07--Thank you--thank you. I now have a bootable USB drive with the winpese-x64.iso provided at
    Windows 10 Recovery Tools - Bootable Rescue Disk - Windows 10 Help Forums
    I had to make it on a Win7 and employ it on a win10. At first I tried just copying the winpese-x64.iso to my usb drive (being a dummy) but it would not boot correctly on the win10. You said this would have to be specially created if done on a win7. Thankfully I was able to take the shortcut described by NavyLCDR at the bottom of that winpese website:take a standard Windows 10 install USB flash drive, copy the boot.wim file from \sources from Kyhi's recovery drive to the \sources on the Windows 10 install USB flash drive (overwrite the old file). Now your Windows 10 install USB flash drive will boot into Kyhi's recovery drive giving you all those utilities. I did have a standard windows 10 install disk which was wholly created for me by Microsoft at How to Download Official Windows 10 ISO files Using Media Creation - Microsoft Community .
    But it did not have the backup (and many other) utilities that the winpese has. So I copied the sources/boot.wim from the unzipped winpese to the MSFT install disk per NavyLCDR. This booted up into the grand winpese recovery environment.
    • Now I haven't rescued my Win10 yet, but since this complaint was only about command-line backups not working, I declare it solved.
     
    cabujones, Apr 5, 2018
    #7
Thema:

Tough Command Line Backup using Robocopy or Xcopy

Loading...
  1. Tough Command Line Backup using Robocopy or Xcopy - Similar Threads - Tough Command Line

  2. XCOPY command does not work

    in Windows 10 Network and Sharing
    XCOPY command does not work: XCOPY command does not work? https://answers.microsoft.com/en-us/windows/forum/all/xcopy-command-does-not-work/2989b013-3a30-428c-a9e2-a5d1ebafac11
  3. XCOPY command does not work

    in Windows 10 Gaming
    XCOPY command does not work: XCOPY command does not work? https://answers.microsoft.com/en-us/windows/forum/all/xcopy-command-does-not-work/2989b013-3a30-428c-a9e2-a5d1ebafac11
  4. XCOPY command does not work

    in Windows 10 Software and Apps
    XCOPY command does not work: XCOPY command does not work? https://answers.microsoft.com/en-us/windows/forum/all/xcopy-command-does-not-work/2989b013-3a30-428c-a9e2-a5d1ebafac11
  5. Using the xcopy command when also using OneDrive

    in Windows 10 Network and Sharing
    Using the xcopy command when also using OneDrive: My topic is the xcopy command. Like every year at the end of the year, I want to copy my empty folder structure for next year. The command for 2020 to 2021 that I successfully used was as follows: "C:\Users\Myname\Documents\Priv 2020" "C:\Users\Myname\Documents\Priv 2021" /T...
  6. Using the xcopy command when also using OneDrive

    in Windows 10 Gaming
    Using the xcopy command when also using OneDrive: My topic is the xcopy command. Like every year at the end of the year, I want to copy my empty folder structure for next year. The command for 2020 to 2021 that I successfully used was as follows: "C:\Users\Myname\Documents\Priv 2020" "C:\Users\Myname\Documents\Priv 2021" /T...
  7. Using the xcopy command when also using OneDrive

    in Windows 10 Software and Apps
    Using the xcopy command when also using OneDrive: My topic is the xcopy command. Like every year at the end of the year, I want to copy my empty folder structure for next year. The command for 2020 to 2021 that I successfully used was as follows: "C:\Users\Myname\Documents\Priv 2020" "C:\Users\Myname\Documents\Priv 2021" /T...
  8. Most useful commands for PowerCFG command line

    in Windows 10 News
    Most useful commands for PowerCFG command line: [ATTACH] [ATTACH]Power Configuration or powercfg.exe is a command-line tool in Windows which allows you to configure power system settings. It is especially useful for laptops which run on battery and will enable you to configure hardware-specific configurations which are...
  9. Command line copy, Xcopy cant see files unless 'onedrive' is inserted.

    in Windows 10 Network and Sharing
    Command line copy, Xcopy cant see files unless 'onedrive' is inserted.: I am stuck. Acer aspire with broken screen. (can see lower right 15% of it). HDMI is no longer putting out signal apparently so no second screen. Back when I had HDMI working, managed to download all docs and photos to external SSD. However, about 30 .txt files are on my...
  10. Robocopy command is not recognized

    in Windows 10 Network and Sharing
    Robocopy command is not recognized: When I try and run robocopy, I get the following return statement within my command prompt: 'robocopy' is not recognized as an internal or external command, operable program or batch file Is there any way to get this working? I would like to be able to use for...

Users found this page by searching for:

  1. robocopy and xcopy backup from cmd windows 10