[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How to run incremental backups with ROBOCOY or RICHCopy?

Posted on 2011-05-06
Medium Priority
Last Modified: 2012-05-11
Is it possible to do incremental backups with RichCopy? If yes, please let me know how.

We want to copy files from a SOURCE and to a DESTINATION (different servers). First we will run a full copy and then we want to run incrementals every day.

Want we want to acomplish is:

1.) The files files that have changed on the SOURCE are copied over to the DESTINATION with keeping teh SOURCE NFTS permissions.
2.) We would like that if the file does not exist on the SOURCE it will be removed at the DESTINATION. Basically since the FULL copy some files have been deleted from the SOURCE when the incremental runs we want for these files (the ones that no longer exist in the source) to be removed at the DESTINATION.
Many thanks.

Question by:llarava
  • 4
  • 3
LVL 14

Accepted Solution

Wonko_the_Sane earned 2000 total points
ID: 35709273
robocopy <sourcedir> <destdir> /copyall /mir /e

/mir = Mirrors Source to Dest, incl. deletions
/copyall = keeps all attributes, including Security
/e copy all subdirs, incl. empty ones

Robocopy will automatically not copy files that have not changed in this config
LVL 14

Expert Comment

ID: 35709288
ah, and because it does replicate deletions, you need to be careful with this - e.g. confusing dest and source can be a bad mistake

also add the switch /zb (restartable backup)


Author Comment

ID: 35709347
Thanks for your reply.

We have copied all the data on the destination server and we brought all the permissions. Some permissions have been modified in the DESTINATION and they haven't been changed in the SOURCE.

If I run:

robocopy <sourcedir> <destdir> /mir /e

Would this copy incremental changes on the DESTINATION and delete the files that were removed from the SOURCE and finally keep the NTFS permission that are already configured in the DESTINATION from the full backup that we ran with Rich Copy?


Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

LVL 11

Expert Comment

ID: 35711280
Wait, now you don't want to keep the source permissions?  Why futzing with the destination permissions and why wouldn't you keep the source permissions or else fix them at the source if you need them tweaked?

If you run the later robocopy not the earlier version (check you may have several) you can include the /DCOPY:T or not.  The advantage is the datetime on destination folders will be the same as source, which can be useful information.

Author Comment

ID: 35717168
I had run RichCopy and I have the permissions copied over. Then permissions where modified in the destination server and have been adjusted to something that it will work better for during the migration that we have planned.

We want to run robocopy so that it copies that new data from the source (folder structure/subfolders/files) but we want the permissions in the destination server to remain the way they are. We want that robocopy deletes the in the DESTINATION server the data that has been removed from the SOURCE server since the first time that we ran the full copy with permissions with RichCopy

Which will be the robocopy switches that we want to run in order to acomplish that? Can you please advise?

Thank you.
LVL 14

Expert Comment

ID: 35720110
OK, then lose the /copyall switch
Instead use /copy:DAT  (copies Data, Attributes and Timestamps)
I would recommend you test this with a small directory structure first to make sure you have the parameters correct.
/DCOPY:T as mentioned above is also a good idea if you care about the directory timestamps.

Author Comment

ID: 35731807

From the target server I am running the following command:

robocopy "\\server\d$\" "D:" /MIR /E /COPY:DAT /V /NP /R:10 /W:30

I would like to exclude a configuration file (8GB) on the source server so that is not copied over to the TARGET server.

Is there any way to do that?

LVL 14

Expert Comment

ID: 35731884
/xf <filename>

include the path if the filename is not unique

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question