1. Joined : Sep 2016
    Posts : 7
    Windows 10
       20 Sep 2016 #1

    robocopy backup of important files


    hi,

    I have a standard Windows 10 build and I'm using robocopy to backup my data to an external drive. The goal is just to capture all my data so if the PC fails/gets stolen etc. I can restore my data on to another PC.

    I'm doing a backup of c:\users\ as this seems to capture all my data. Are there any other folders you think I should backup?

    I've excluded the 'AppData' folder as this seems to have a lot of stuff which is not data. Is that OK or do you think that should be backed up? Are there any other folders you think I should skip?

    Thank you very much for your comments.
      My System SpecsSystem Spec

  2.    20 Sep 2016 #2

    Welcome to the forum. Unless you have a lot of data putting everything on Google drive or ondrive is the best option there both free giving up to 20 gigs just save to that folder and it will sync on its own. A local hd is ok but if you have a fire, flood or robed its gone the cloud you can go anywhere in the world and get it and if you get a new pc it will all come back on its own without you doing anything. You can get a gui for robocopy now http://download.microsoft.com/downlo...ght2006_11.exe
      My System SpecsSystem Spec


  3. Joined : Aug 2016
    S/E England
    Posts : 1,150
    10 Home x64 (1607), Pro x86 (1511 & 1607)
       20 Sep 2016 #3

    Long ago I wrote myself a batch file to automate using Robocopy to back up my data. Since my Windows 7 upgraded to Windows 10 I continue to use it. It's now quite sophisticated and accepts command line parameters for things like specifying the drive to back up to, the name of the backup directory to create and whether to do a full or incremental backup.

    At the heart of the full backup are the commands:
    attrib +A *.* /s
    robocopy . %MyBackupDrive%\Backups\%1_Full *.* /xjd /s /e /m /r:0
    Where:
    %mybackupdrive% is, by default the UNC path to a network drive, unless I specify another drive in the command line.

    %1 is the name of the backup, I use names of the form YYYY-MM-DD so I don't loose track (plus File Explorer's 'sort by name' puts them in date-order).

    /xjd
    is required to prevent infinite recursion of directories caused by junction points.
    http://www.sevenforums.com/general-d...sting-bug.html

    /r:0 prevents seemingly endless retries on any locked files.

    attrib +A *.* /s along with Robocopy ... /m is the key to doing incremental backups. First the archive attribute is set for al files, Then the full backup backs up all files which have their archive attribute set and clears it. For an incremental backup the attrib command is skipped so that only new/modified files will be copied (they're the only ones with an archive attribute) .

    As to what else to backup, well you may want to reconsider excluding all of AppData. Almost all your software keeps their configuration settings there. For instance, your Firefox profile, extensions and bookmarks are in: C:\Users\<username>\AppData\Roaming\Mozilla

    PS: for a 'belt and braces' approach, I also have my File History pointing to my network drive.

    You can never have enough backups.
      My System SpecsSystem Spec


  4. Joined : Sep 2016
    Posts : 7
    Windows 10
       21 Sep 2016 #4

    thanks Samuria, the cloud suggestion was a good idea, however I have a lot of photos so for now I'll just back up to a hard drive which I keep at a remote location.

    Bree, thanks very much for your tips and suggestions.

    A friend suggested I use the mirror flag /mir do you know if there's any disadvantage to using that as opposed to using the attrib command? I think the mirror ensures that only recently changed files are copied.
      My System SpecsSystem Spec


  5. Joined : Aug 2016
    S/E England
    Posts : 1,150
    10 Home x64 (1607), Pro x86 (1511 & 1607)
       21 Sep 2016 #5

    robocop said: View Post
    A friend suggested I use the mirror flag /mir do you know if there's any disadvantage to using that as opposed to using the attrib command? I think the mirror ensures that only recently changed files are copied.
    I just used /m because in the early version of my batch file I had used Xcopy rather than RoboCopy - the /m switch works much the same in both, so it got carried over (I've used Xcopy since it was introduced in Dos 3.2, some 30 years ago). The mirror flag /mir should work just as well (if not better) but I haven't tried it (yet), so can't comment. Here's what the author of RoboCopy had to say about /mir ...
    https://blogs.technet.microsoft.com/...e-permissions/
      My System SpecsSystem Spec


  6. Joined : Sep 2016
    Posts : 7
    Windows 10
       22 Sep 2016 #6

    Bree said: View Post
    (I've used Xcopy since it was introduced in Dos 3.2, some 30 years ago).
    Thanks Bree, I used DOS that came with Windows 3.11 but I don't think that was version 3.2!
      My System SpecsSystem Spec


  7. Joined : Apr 2015
    Posts : 80
    Windows 10 Home x64 and Pro x86
       22 Sep 2016 #7

    robocop said: View Post
    the mirror flag /mir do you know if there's any disadvantage to using that as opposed to using the attrib command? I think the mirror ensures that only recently changed files are copied.
    Robocop,

    You are comparing chalk & cheese. The /mir switch has nothing to do with file attributes. The /m switch does.
    /mir Mirrors a directory tree
    /m Copies only files for which the Archive attribute is set, and resets the Archive attribute.

    Switches such as the /m switch operate on the source to select which files RoboCopy chooses to work with on that occasion.

    The /mir switch operates on the destination instead. It tells RoboCopy to update files on the destination from the source [where the source has newer ones] and to delete files on the destination that no longer exist in the source.

    So if you RoboCopy source files abcd then you will have abcd on the destination as well
    but if you later delete d from the source you will still have d on the destination.
    Results after next RoboCopy -
    d will stay on the destination if you RoboCopy with the /m switch
    d will be deleted from the destination if you RoboCopy with the /mir switch

    The /mir switch can be very useful.
    1 I use RoboCopy /mir as part of my backup regime. It creates a complete mirror image of all my files on the external HDD that I connect for that backup. If my computers ever failed or the place went up in flames then I could restore all my own folders & files just as they had been at the time the last RoboCopy was made.
    2 I also use RoboCopy /mir as part of my network syncing routine.

    Denis
      My System SpecsSystem Spec


  8. Joined : Sep 2016
    Posts : 7
    Windows 10
       23 Sep 2016 #8

    Denis, thank you very much for the explanation. /mir is perfect for me. Cheers
      My System SpecsSystem Spec


 


Similar Threads
Thread Forum
Solved Need to restore files to Win 10 from Win 7 backup-is this possible?
My folder is: MediaID.bin It has all my documents, photos, etc. from a PC that I converted to Win 10 and gave a family member. But I can't seem to get the file to open on my own Win 10 Pro laptop. Is there a program, command or process that...
Performance & Maintenance
Robocopy and /ETA switch
I have a few batch scripts to backup or restore files, and for some of them, I have the /ETA switch in them as they will move some larger files. In W7, It would always give the time to transfer, but in Win10 (x64), this switch doesn't seem to do...
General Support
Run Robocopy to backup file on shutdown, does not seem to work.
I want to run Robocopy to copy my Money 2005 file every shutdown, I know Money has a backup facility but when my wife runs Money on her laptop (Using Homegroup) there is always a backup conflict with my PC and if I open Money and try to backup I get...
Performance & Maintenance
Solved Recovering Files from Backup -- Not All Files Restored
I recently performed a clean installation of Windows 10 after some issues I was having with the PC. The clean install went successfully with no errors along the way. Now, however, I am trying to restore files from the backup I made prior to the...
Installation and Setup
Whats the best way to backup my files?
Along with my nice new shiny laptop with Windows 10 on it, I have a Western Digital My Passport Ultra drive with 2TB of space. What is the best way to backup all my files - should I use the WD Backup software or does Windows 10 have a backup...
Software and Apps
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 18:10.
Find Us
Twitter Facebook Google+



Windows 10 Forums