Answered by:
Install Robocopy on WHS

Question
-
I am not a SF pro,, but I have a WHS server at home, to backup clients. Reading furums I have come to the insight that I need a tool like RoboCopy to backup my NAS drives.
Could anyone give me, easy understaning, instructions to install Robocopy on my WHS server and how to setup Robocopy to start when WHS starts.
//regards
//lasse
LasseFriday, October 3, 2008 8:41 AM
Answers
-
Robocopy for Windows Server 2003 is part of the Resource Kit Tools, which you can download here:
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
The installation only works directly from the server desktop.
I recommend to copy robocopy.exe to an path like Windows\system32, so that it is always accessible without entering the installation path.
You could also install it on another machine and only copy robocopy.exe later. The Vista version of robocopy doesn't seem to work with Windows Server 2003.
You can check also http://www.ss64.com/nt/robocopy.html for the syntax.
The benefit over the Windows Home Server integrated backup is, that you can select what you wish to backup and that you can run it batch based as a Scheduled task.
Also the logging functions are great for a command line tool.
Best greetings from Germany
Olaf- Edited by Olaf EngelkeModerator Friday, October 3, 2008 9:25 AM
- Marked as answer by Lara JonesModerator Friday, October 3, 2008 4:28 PM
Friday, October 3, 2008 9:24 AMModerator -
Hi Lasse,
how did you do that?
Did you call robocopy with all it's parameters in the scheduled task or did you create a batch file and call this batch file?
The later would be better. If this does not work, could you post your entire command here?
Here in a German Windows a batch with the command
robocopy c:\temp c:\temp\test /LOG:c:\temp\%date%.txt
did function - also if started this batch as Scheduled task, I got the expected name for the file.
Best greetings from Germany
Olaf- Edited by Olaf EngelkeModerator Sunday, October 5, 2008 5:39 PM
- Marked as answer by Lars-Göran Lindstrom Tuesday, October 7, 2008 4:20 PM
Sunday, October 5, 2008 4:47 PMModerator
All replies
-
Have you looked at volume shadow copy? I use this on my WHS shares if I need to rollback to an earlier version of a file.
In terms of backing up the shares to somewhere secure, then i connect an external HD to the WHS and use the back up facility from the console to this every couple of weeks.
I do use Synctoy but not in the way that you have suggested. I use it to keep a copy of My Documents on my WHS share so that I can access my files remotely when I am away from home.Friday, October 3, 2008 8:50 AM -
Robocopy for Windows Server 2003 is part of the Resource Kit Tools, which you can download here:
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
The installation only works directly from the server desktop.
I recommend to copy robocopy.exe to an path like Windows\system32, so that it is always accessible without entering the installation path.
You could also install it on another machine and only copy robocopy.exe later. The Vista version of robocopy doesn't seem to work with Windows Server 2003.
You can check also http://www.ss64.com/nt/robocopy.html for the syntax.
The benefit over the Windows Home Server integrated backup is, that you can select what you wish to backup and that you can run it batch based as a Scheduled task.
Also the logging functions are great for a command line tool.
Best greetings from Germany
Olaf- Edited by Olaf EngelkeModerator Friday, October 3, 2008 9:25 AM
- Marked as answer by Lara JonesModerator Friday, October 3, 2008 4:28 PM
Friday, October 3, 2008 9:24 AMModerator -
Lasse Lindstrom said:
I am not a SF pro,, but I have a WHS server at home, to backup clients. Reading furums I have come to the insight that I need a tool like RoboCopy to backup my NAS drives.
Could anyone give me, easy understaning, instructions to install Robocopy on my WHS server and how to setup Robocopy to start when WHS starts.
//regards
//lasse
Lasse
I guess you know Robocopy is command line tool?
There's also a GUI which makes it easy to build scripts, which you can then run manually or from Windows task scheduler.Friday, October 3, 2008 10:23 AMModerator -
Olaf Engelke said:
Robocopy for Windows Server 2003 is part of the Resource Kit Tools, which you can download here:
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
The installation only works directly from the server desktop.
I recommend to copy robocopy.exe to an path like Windows\system32, so that it is always accessible without entering the installation path.
You could also install it on another machine and only copy robocopy.exe later. The Vista version of robocopy doesn't seem to work with Windows Server 2003.
You can check also http://www.ss64.com/nt/robocopy.html for the syntax.
The benefit over the Windows Home Server integrated backup is, that you can select what you wish to backup and that you can run it batch based as a Scheduled task.
Also the logging functions are great for a command line tool.
Best greetings from Germany
Olaf
How do I setup a Scheduled task,,, ??
(Installation seems to go ok)
//lasse
LasseFriday, October 3, 2008 1:09 PM -
Lasse Lindstrom said:Olaf Engelke said:
Robocopy for Windows Server 2003 is part of the Resource Kit Tools, which you can download here:
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
The installation only works directly from the server desktop.
I recommend to copy robocopy.exe to an path like Windows\system32, so that it is always accessible without entering the installation path.
You could also install it on another machine and only copy robocopy.exe later. The Vista version of robocopy doesn't seem to work with Windows Server 2003.
You can check also http://www.ss64.com/nt/robocopy.html for the syntax.
The benefit over the Windows Home Server integrated backup is, that you can select what you wish to backup and that you can run it batch based as a Scheduled task.
Also the logging functions are great for a command line tool.
Best greetings from Germany
Olaf
How do I setup a Scheduled task,,, ??
(Installation seems to go ok)
//lasse
Lasse
Like I said before, best use the GUI to build the script (install GUI on server, run it rom there), test the script by running it manually. Then on your server desktop (or remote desktop) do Start, Control Panel, Scheduled Tasks, Add Scheduled Task. There you can set schedule to run the batch file you created with the robocopy GUIFriday, October 3, 2008 1:21 PMModerator -
brubber said:Lasse Lindstrom said:Olaf Engelke said:
Robocopy for Windows Server 2003 is part of the Resource Kit Tools, which you can download here:
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
The installation only works directly from the server desktop.
I recommend to copy robocopy.exe to an path like Windows\system32, so that it is always accessible without entering the installation path.
You could also install it on another machine and only copy robocopy.exe later. The Vista version of robocopy doesn't seem to work with Windows Server 2003.
You can check also http://www.ss64.com/nt/robocopy.html for the syntax.
The benefit over the Windows Home Server integrated backup is, that you can select what you wish to backup and that you can run it batch based as a Scheduled task.
Also the logging functions are great for a command line tool.
Best greetings from Germany
Olaf
How do I setup a Scheduled task,,, ??
(Installation seems to go ok)
//lasse
Lasse
Like I said before, best use the GUI to build the script (install GUI on server, run it rom there), test the script by running it manually. Then on your server desktop (or remote desktop) do Start, Control Panel, Scheduled Tasks, Add Scheduled Task. There you can set schedule to run the batch file you created with the robocopy GUI
Thanx,, almost there, but yet another question. Using the GUI I created a script. This script contains directives for logging to a specific file. What is the syntax for logging to a file based on current date(when the script is running)... ... if it is possible.
My idea is to check to create a specific logging directory,,, onto which all log files goes. Then I can check this directory to see when and how the latest backup was runned.
//lasse
LasseFriday, October 3, 2008 1:56 PM -
Hi Lasse,
using the date for a file name is possible, but complicated. While the variable %date% contains the current system date, it will also contain certain characters, which are not allowed in file names (maybe depending from the local settings of your WHS), so that a simple %date%.log would often not work.
Workarounds for this:
Use always the same file name and have robocopy append the new logging information instead of overwriting the older logs.
By checking its modify date you already see, if the latest executions did work.
Set up another task to delete that file regulary, maybe one time per month.
Another workaround:
Make a separate task for each day of the week (or each week of the month, dependend from the frequency of your backups), pointing to a different log file.
The logfiles will be overwritten each time, that task runs again.
Best greetings from Germany
OlafFriday, October 3, 2008 2:20 PMModerator -
Robocopy for Windows Server 2003 is part of the Resource Kit Tools, which you can download here:
If you have a Windows Vista PC at hand, you already have robocopy.exe (you will find it in \Windows\System32).
[EDIT: The vista version of robocopy does not run on Windows Server 2003]
Some addtional info on using Robocopy.exe you may find here.
Theo
No home server like Home Server- Proposed as answer by Theo van ElsbergModerator Friday, October 3, 2008 8:18 PM
- Edited by Theo van ElsbergModerator Saturday, October 4, 2008 7:20 PM Does not run..
Friday, October 3, 2008 8:16 PMModerator -
Hi Theo,
I found robocopy from Vista not working on my server 2003 at work (as I already mentioned before in this thread) - gives invalid win32 application as error.
So before proposing please try your recommendations yourself first, if possible.
Best greetings from Germany
OlafFriday, October 3, 2008 10:51 PMModerator -
Olaf Engelke said:Yes. You did :-|
Hi Theo,
I found robocopy from Vista not working on my server 2003 at work (as I already mentioned before in this thread) - gives invalid win32 application as error.
So before proposing please try your recommendations yourself first, if possible.
Best greetings from Germany
Olaf
Lessons learned: If the solution to a problem is obvious, read again....
Thanks for correcting this Olaf (oops - and I deleted the Vista version from my WHS system32 directory as I did not realize that my synchronization command file was using a local copy of the RK-tools version :-)
No home server like Home ServerSaturday, October 4, 2008 7:17 PMModerator -
Olaf Engelke said:
Hi Lasse,
using the date for a file name is possible, but complicated. While the variable %date% contains the current system date, it will also contain certain characters, which are not allowed in file names (maybe depending from the local settings of your WHS), so that a simple %date%.log would often not work.
Workarounds for this:
Use always the same file name and have robocopy append the new logging information instead of overwriting the older logs.
By checking its modify date you already see, if the latest executions did work.
Set up another task to delete that file regulary, maybe one time per month.
Another workaround:
Make a separate task for each day of the week (or each week of the month, dependend from the frequency of your backups), pointing to a different log file.
The logfiles will be overwritten each time, that task runs again.
Best greetings from Germany
Olaf
I decided to go for the %date% alternative. Using the commandline like ...
> echo %date%
gave good result. (2008-10-09)
Also, using the command line I started Robocopy,,, and all performed well. The loggfile was created as expected,,, and my files where copied,,,
But ... using the exact syntax in the scheduled job task,,,, resulted in a log file called %date%
Whats the difference between starting a job (Sheduled task) and striting it from the commandline.... how do I avoid this???
//lasse
LasseSunday, October 5, 2008 2:57 PM -
Hi Lasse,
how did you do that?
Did you call robocopy with all it's parameters in the scheduled task or did you create a batch file and call this batch file?
The later would be better. If this does not work, could you post your entire command here?
Here in a German Windows a batch with the command
robocopy c:\temp c:\temp\test /LOG:c:\temp\%date%.txt
did function - also if started this batch as Scheduled task, I got the expected name for the file.
Best greetings from Germany
Olaf- Edited by Olaf EngelkeModerator Sunday, October 5, 2008 5:39 PM
- Marked as answer by Lars-Göran Lindstrom Tuesday, October 7, 2008 4:20 PM
Sunday, October 5, 2008 4:47 PMModerator -
Olaf Engelke said:
Hi Lasse,
how did you do that?
Did you call robocopy with all it's parameters in the scheduled task or did you create a batch file and call this batch file?
The later would be better. If this does not work, could you post your entire command here?
Here in a German Windows a batch with the command
robocopy c:\temp c:\temp\test /LOG:c:\temp\%date%.txt
did function - also if started this batch as Scheduled task, I got the expected name for the file.
Best greetings from Germany
Olaf
Hi Again.
I created a .bat file containing my robocopy commands, and let a scheduled task start it,,, and it works well......
Many, many thanks for your time and effort, tanks.
//lasse
Lasse- Marked as answer by Lars-Göran Lindstrom Tuesday, October 7, 2008 4:19 PM
- Unmarked as answer by Lars-Göran Lindstrom Tuesday, October 7, 2008 4:19 PM
Tuesday, October 7, 2008 4:19 PM