Hi Guys,<\/p>\n
Hoping the community can tell me what I am doing wrong-<\/p>\n
I have the following backup batch file to backup my server’s data:<\/p>\n
robocopy E:\\Accounting /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\Imports /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\Planning /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\Production /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\Abacus /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\SalesReps /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
My problem is this when I look at drive F: after the backup is completed, the parent folder is not created, and all the contents of the folders being backed up are created in drive F:.<\/p>\n
What am I doing wrong?<\/p>\n
TIA<\/p>","upvoteCount":2,"answerCount":2,"datePublished":"2015-12-12T02:10:08.000Z","author":{"@type":"Person","name":"eddelrincon1522","url":"https://community.spiceworks.com/u/eddelrincon1522"},"acceptedAnswer":{"@type":"Answer","text":"
Because you are not giving a target directory i.e, you need to do it as:<\/p>\n
robocopy E:\\Accounting F:\\Account /S /r:1 /w:1 /LOG+:BACKUP12102015.TXT<\/p>\n
I always use a /r:1 /w:1 (or zero, you’re choice) otherwise you will be pausing the default (I believe 10 seconds for x number of tries) - if you have a lot of open files, you’ll never get it done.<\/p>\n
In my case, I use it to back up my profile folders on my laptop, but use /MIR instead:<\/p>\n
robocopy “C:\\Users\\micha\\Favorites” “F:\\Users\\Michael M Tallman\\Favorites” /MIR /r:1 /w:1<\/p>\n
This way, if a file is deleted on the source, it is then deleted on the target - otherwise, you could run into an overflow eventually. I can add the /LOG+:profilebackup.txt at the end if I wanted to.<\/p>\n
To test it BEFORE running it live - add a /L switch, this will just do a dry run on the data and show you in the logs what gets backed up. If you see a lot of “EXTRA” files, that means you need to tweak it some more. If you see “Newer File”, then you’re golden - it just means that your source is newer than the target, so if there was a file updated, it would overwrite the older file on the target.<\/p>","upvoteCount":2,"datePublished":"2015-12-12T03:18:48.000Z","url":"https://community.spiceworks.com/t/robocopy-help/457993/2","author":{"@type":"Person","name":"michaelmtallman","url":"https://community.spiceworks.com/u/michaelmtallman"}},"suggestedAnswer":[{"@type":"Answer","text":"
Hi Guys,<\/p>\n
Hoping the community can tell me what I am doing wrong-<\/p>\n
I have the following backup batch file to backup my server’s data:<\/p>\n
robocopy E:\\Accounting /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\Imports /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\Planning /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\Production /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\Abacus /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
robocopy E:\\SalesReps /S F: /LOG+:BACKUP12102015.TXT<\/p>\n
My problem is this when I look at drive F: after the backup is completed, the parent folder is not created, and all the contents of the folders being backed up are created in drive F:.<\/p>\n
What am I doing wrong?<\/p>\n
TIA<\/p>","upvoteCount":2,"datePublished":"2015-12-12T02:10:09.000Z","url":"https://community.spiceworks.com/t/robocopy-help/457993/1","author":{"@type":"Person","name":"eddelrincon1522","url":"https://community.spiceworks.com/u/eddelrincon1522"}}]}}