Avatar of Yashy
Yashy
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Robocopy command along with security permissions?

hi guys

I've got a file server which I have set up and I want to transfer the files over from the old to the new using robocopy (seems like the fastest option I have at the moment right now!).

So I wanted to do the following:

1. Copy files from old to new server along with security permissions (if possible?).

2. Once the files have been copied over, for a mirroring to occur so that I can run a command and copy over any changes made on the old server and have them transferred to the new?

Would you be able to help me with the switches I'd need to use on both occasions?

Thanks a lot
Yashy
PHPWindows Server 2008Windows Server 2003

Avatar of undefined
Last Comment
JezNolan

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
JezNolan

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Yashy

ASKER
Awesome JazNolan, thank you.

So then, let's say I've copied files over. And I haven't deployed the new fileserver yet. People are now working on the old server still and making changes. If I wanted to get those changes across, do I just use the same command as above? What would be the difference between doing a copy and a mirror switch?

Thanks again
JezNolan

Use the same command. The /Mir command should be okay. I've never used it but if security settings may change and/or there is likely to be stuff deleted on the source it may be a better option. I get nervous if commands that can delete data. The logs are thorough and also tell you of extra files in place on destination that may not be on source, but /Mir may save you a bit of grief.

Quote:

/mir
Mirrors a directory tree (equivalent to /e plus /purge). For additional information, see Remarks.

/purge
Deletes destination files and directories that no longer exist in the source. For additional information, see Remarks.

Remark:

The /mir option is equivalent to the /e plus /purge options with one small difference in behavior:

With the /e plus /purge options, if the destination directory exists, the destination directory security settings are not overwritten.

With the /mir option, if the destination directory exists, the destination directory security settings are overwritten.
JezNolan

Hmm - think you need /copyall for security attributes actually.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
SOLUTION
Muhammad Farjad Arshad

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
JezNolan

Testing with /mir and /copyall (/mir didn't copy security on its own). Will post back.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.