Jump to content
RESET Forums (homeservershow.com)

Robocopy Syntax


upsidedowncake

Recommended Posts

upsidedowncake

Always good to have a simple one haha.  The robocopy is working great, both the server and pc scripts are running flawlessly and they've been set up in scheduler to run nightly.  One last question, do you recommend using /mir, and more importantly if I didn't use /mir would robocopy skip the files all ready in the destination or would it copy them again?  I ask because I am worried if I delete a file from the source, and then robocopy deletes it from the destination using /mir, I've effectively lost my backup.  I've also heard that /mir will delete folders from the source if you delete them from the destination.  

Link to post
Share on other sites

/mir does replicate exactly.

 

Yes, you would lose your backup copy if you accidentally deleted a file in your main storage and then the script ran. You may want to leave that one parameter off. I have done that myself in the past. The downside is you have to make sure you have plenty of storage space on your backup destination.

 

If you don't use /mir, RoboCopy will simply list files that are on the destination, but not on the source, as *extra*. It will skip over them with no harm done. At any time in the future, if you finally did want to get rid of the extras, you could simply run the script with /mir.

Link to post
Share on other sites
upsidedowncake

Interesting.  Since it skips duplicates anyway, I think it's better for my requirements to leave it out.  I rather have a copy of files even after I delete them in case I ever need to go back.  I suppose to that end though, I could set up an identical script with /mir and schedule it to run every 6 months or a year or something to sort of 'reset the clock' so to speak.  Would just have to make sure I don't accidentally delete a file at 5 months 29 days and then get burned.

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...