ROBOCOPY - Create Backup Script

Page 9 of 32 FirstFirst ... 789101119 ... LastLast

  1. Posts : 5
    Windows 7 32 and 64 bit
       #80

    I would suspect the user would be logged off. Since the scheduled task would run at night, we could instruct them to log off each weeknight when they leave for the day.
      My Computer


  2. Posts : 5
    Windows 7 32 and 64 bit
       #81

    batch file creation


    Hi Golden

    Haven't heard anything from you since my last question. The boss wants me to figure this out by tomorrow ( 6-26-2012 ). He also said he is more concerned with backing up the profile than restoring it. Could you possible show me how to create a batch file to automatically back up the currently logged in user profile to either an external drive, or a network location?
    I am going to experiment with some of the examples given here.
      My Computer


  3. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #82

    Hi Hugh,

    I have made some queries on your behalf, but haven't heard anything back yet. Try this:

    Code:
     
    robocopy C:\Users\{username} Z:\UserProfiles /COPYALL /MIR /E
    Regards,
    Golden
      My Computer


  4. Posts : 6
    win7 unl 32bit
       #83

    good tutorial:)
      My Computer


  5. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #84

    Thanks babysister - I hope you find it useful
      My Computer


  6. Posts : 5
    Windows 7 32 and 64 bit
       #85

    Hi Golden,

    Thanks for the reply. I have been experimenting with this. It will copy the NTUSER.DAT file if I run it from another administrator account. I havent tried it, but I would hope if it is set to run as a scheduled task, using domain admin creds, and the user logs off, it would be able to copy the NTUSER.DAT file. YThe boss tells me it is imperative that we do back that file up.

    robocopy "C:\Users\username" "G:\username" /e /MIR /R:0 /ZB /COPYALL /XD "Temporary Internet Files" /W:0 /NP /FFT /log:"G:\TH\username_LOG.txt" /NDL

    I also added the /MT:16 switch and robocopy errored out saying the /MT switch was an invalid parameter
    Last edited by Hugh Jasse; 27 Jun 2012 at 12:29. Reason: adding info
      My Computer


  7. Posts : 1
    Windows 7 Home Premium 32 bit
       #86

    Robocopy - Create Backup Script


    Thanks for a very helpful article Golden.

    Just a query about the /MIR option. You write that you include this to "check the files in the destination, and only copy newer files". I've only just started to research Robocopy but I have read that the default action of this programme is only to replace files in the destination folder which have a different time stamp or a different size to the source file. This implies that updated source files will always overwrite the destination file and unchanged files will not.

    If this is so then perhaps one doesn't need to use the /MIR option. Perhaps there is another reason. I realise that omiting it will mean that files which have been deleted from the source folder will remain in the destination folder.
      My Computer


  8. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #87

    Hi Azion,

    Welcome to SevenForums and thanks for the comment,

    Perhaps you are correct. I re-read the robocopy entry in Wikipedia, and it seems to imply the /MIR switch is more useful for removing files from the destination, if they are no longer present at the source:

    Mirror A to B, destroying any files in B that are not present in A (/MIR)
    https://en.wikipedia.org/wiki/Robocopy

    The technet article simply states that the directory structures are mirrored.

    Regards,
    Golden
      My Computer


  9. Posts : 1,797
    Win 7 Ultimate, Win 8.1 Pro, Linux Mint 19 Cinnamon (All 64-Bit)
       #88

    I just want to say a massive Thanks to Golden for creating this thread. Never even used Robocopy before this and now I'm using it everyday with different switches for different scenarios! Love it!
      My Computer


  10. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #89

    No worries Burdus - glad you are finding it useful
      My Computer


 
Page 9 of 32 FirstFirst ... 789101119 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:23.
Find Us