Jump to content
RESET Forums (homeservershow.com)

RoboCopy Backup Scripts

Recommended Posts

  • Replies 76
  • Created
  • Last Reply

Top Posters In This Topic

  • ikon


  • Jason


  • jmwills


  • mediadogg


Top Posters In This Topic

Popular Posts

Sounds like a good idea.   When I ordered my first EX-503, I wanted to get 2 of them, but their site only showed 1 available, so I ordered it and figured I'd get another when they had them in stock

Was just reviewing the script above.  if my \serverfolders resides on drive F:\ (it's a RAID 6 array) and I had a single external HDD that I'm using as my NearLine backup destination assigned drive letter S:, would this:


Robocopy "<drive:>\ServerFolders\Documents\email" "<drive:>\ServerFolders\Documents\email" *.*  /e /r:1 /<drive:>1 /mir /tee /np /log:"<drive:>\ServerFolders\Backup\logs\NearLine\BackupToNearLine_RoboCopy.log"


become this:


Robocopy "F:\ServerFolders\Documents\email" "F:\ServerFolders\Documents\email" *.*  /e /r:1 /S:1 /mir /tee /np /log:"S:\ServerFolders\Backup\logs\NearLine\BackupToNearLine_RoboCopy.log"


and this would need to be repeated for every applicable child folder under F:\Serverfolders.. like F:\Serverfolders\Software, F:\serverfolders\Users, etc?

Link to post
Share on other sites

OK.  It doesn't appear to like this.


F:\serverfolders is my source

I've also create a new folder f:\serverfolders\backup\logs\nearline for storing the backup logs


S:\ is my external drive for inline backup


Robocopy "F:\ServerFolders\Blueiris" "S:\ServerFolders\Blueiris" *.*  /e /r:1 /S1 /mir /tee /np /log:"F:\ServerFolders\Backup\logs\NearLine\BackupToNearLine_RoboCopy.log"




ERROR : Invalid Parameter #6 : "/S:1"


What is the correct syntax for the portion in red?

Link to post
Share on other sites



LOL.  Was jk. :D  Nevertheless the highlighted part when using /S:1 or /F:1 (any valid drive #) is returned invalid in the command line.  Must have been included in script by accident.  Thanks.


.../e /r:1 /<drive:>1 /mir /tee /np..

Link to post
Share on other sites

Jason, I have to profusely apologize. In making my scripts generic, I failed to properly proofread the result. There (were) errors in what I posted. I have, hopefully corrected then in the post above so that you can do simple SearchNreplace to customize the scripts to your setup.


First, the whole "/S:1" thing. The correct syntax is "/w:1". It's the "wait" parameter. It specifies who many seconds RoboCopy waits between retries if it runs into a problematic file. It got changed to S during my own SearchNreplace :wacko:


Second, I removed the whole "email" thing. That's something specific to my setup because I run my own email server. You, and most others, most likely don't need it.


Finally, I changed all the drive references so they're easier to use. Simply do a global SearchNreplace:

  1. replace "<drive1>" with your source drive letter;
  2. replace "<drive2>" with your NearLine destination drive letter;
  3. replace "<drive3>" and "<drive4>" with your OffSite destination drive letters. I use 2 drive letters because I have 2 sets of OffSite drives. Each has its own drive letter so that the system will pick it up properly when it's reconnected. If you were to attempt to use the same drive letter for both OffSite drive sets, the system would encounter some issues in that the 2 drive sets aren't identical.


I hope that makes a lot more sense to you know and resolves any issues you had. If not, let me know; I promise I'll address any issues.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...