New
#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.
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.
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.
Hi Hugh,
I have made some queries on your behalf, but haven't heard anything back yet. Try this:
Regards,Code:robocopy C:\Users\{username} Z:\UserProfiles /COPYALL /MIR /E
Golden
good tutorial:)
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
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.
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:
https://en.wikipedia.org/wiki/RobocopyMirror A to B, destroying any files in B that are not present in A (/MIR)
The technet article simply states that the directory structures are mirrored.
Regards,
Golden
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!