I am going to move files from one file server to another file server. Thought I would use Robocopy with these parameters:<\/p>\n
Advertisement
Robocopy \\ server \\ D $ \\ SHARE01 E: \\ SHARE01 / e / s / zb / copyall / r: 3 / w: 3 / log: c: \\ ROBOCOPY-Logs \\ SHARE01. log / V / NP<\/p>\n
Are these parameters ok?<\/p>\n
Is there a command that only copies changes or new files?<\/p>\n
I plan to do this in 2 rounds. First I move everything and step 2 a few days later, copy changes or new files.<\/p>","upvoteCount":11,"answerCount":14,"datePublished":"2022-05-04T11:48:21.000Z","author":{"@type":"Person","name":"neptun2211","url":"https://community.spiceworks.com/u/neptun2211"},"acceptedAnswer":{"@type":"Answer","text":"
One issue with those parameters is any files or folders that are deleted in the source won’t be deleted in the destination on your second run. If you want to keep them in sync use MIR instead. Here’s an example of a script I use.<\/p>\n
I am going to move files from one file server to another file server. Thought I would use Robocopy with these parameters:<\/p>\n
Robocopy \\ server \\ D $ \\ SHARE01 E: \\ SHARE01 / e / s / zb / copyall / r: 3 / w: 3 / log: c: \\ ROBOCOPY-Logs \\ SHARE01. log / V / NP<\/p>\n
Are these parameters ok?<\/p>\n
Is there a command that only copies changes or new files?<\/p>\n
I plan to do this in 2 rounds. First I move everything and step 2 a few days later, copy changes or new files.<\/p>","upvoteCount":11,"datePublished":"2022-05-04T11:48:21.000Z","url":"https://community.spiceworks.com/t/copying-files-using-robocopy/831962/1","author":{"@type":"Person","name":"neptun2211","url":"https://community.spiceworks.com/u/neptun2211"}},{"@type":"Answer","text":"
Robocopy will only copy changed or new files.<\/p>\n
I suggest adding /mir, which will DELETE extra files at the destination that are not at the source.<\/p>\n
Be careful with /mir, as it deletes files. Make sure your source and destination are correct.<\/p>\n
Have tested backups.<\/p>\n
For a first run, I like to also use /create . It prevents directory fragmentation. You need to do a second and third run afterwards, as /create doesn’t actually copy files…just file name information.<\/p>","upvoteCount":1,"datePublished":"2022-05-04T12:00:26.000Z","url":"https://community.spiceworks.com/t/copying-files-using-robocopy/831962/3","author":{"@type":"Person","name":"kevinhsieh","url":"https://community.spiceworks.com/u/kevinhsieh"}},{"@type":"Answer","text":"
Forgot to mention, as Kevin has stated, my command will skip files on the second/subsequent runs if they already exist and have not changed between the source and destination. The source is always authoritative here.<\/p>","upvoteCount":1,"datePublished":"2022-05-04T12:03:57.000Z","url":"https://community.spiceworks.com/t/copying-files-using-robocopy/831962/4","author":{"@type":"Person","name":"jrp78","url":"https://community.spiceworks.com/u/jrp78"}},{"@type":"Answer","text":"
is a little scared to use / mir<\/p>\n
So if run this command, will it not work?<\/p>\n
Robocopy \\ server \\ D $ \\ folder E: \\ Bilder / e / zb / copy: DATSOU / r: 3 / w: 3 /log:c:\\ROBOCOPY-Logs\\folder.log / V / NP<\/p>","upvoteCount":0,"datePublished":"2022-05-04T12:13:18.000Z","url":"https://community.spiceworks.com/t/copying-files-using-robocopy/831962/5","author":{"@type":"Person","name":"neptun2211","url":"https://community.spiceworks.com/u/neptun2211"}},{"@type":"Answer","text":"