1

I wanted to know if it is possible to make incremental and differential backups using just Robocopy and arguments.

Putting it in a simple bat and making that bat run in Task Scheduler seems like a simple backup plan that I would need.

I think I prefer "incremental" because differential would erase things that I don't have anymore (using /MIR argument)

StackzOfZtuff
  • 1,754
  • 12
  • 21
riahc3
  • 506
  • 4
  • 11
  • 28
  • 2
    To be perfectly honest, Robocopy isn't a proper backup solution, IMO. If you're using Robocopy as a backup solution in any kind of business/enterprise environment then you're doing it wrong. – joeqwerty Apr 27 '15 at 11:33
  • Why isnt it a proper backup solution? It makes copies of the files I want to where I want. Can't get much simpler than that. – riahc3 Apr 27 '15 at 12:58
  • 7
    The lack of cataloging, indexing, incremental/differential backups, database integration, Exchange integration, rotational media sets, tape drivers, and support are all things that come to mind. – Hyppy Apr 27 '15 at 13:46
  • Cataloging and indexing is not needed if you organize your file structure correctly. My exact question is if I can do incremental/differential backups. We dont use databases nor Exchange. Scripting can be used to detect media sets that are present or isnt. We do not use tape. That being said, if you have some alternative suggestions, please add. – riahc3 Apr 27 '15 at 14:07
  • AFAIK robocopy does not support versioning beyond doing a simple compare if source files/folders have changed since the last copy. It is probably possible to hack it together somehow anyway, but I doubt it would be worth it considering the merits of readily available alternative solutions. From the way you phrase your question, if I were you I would cast a good long look at rdiff-backup instead. I have used it to back up Windows to a Linux host with great success, using the side-by-side as indicated: http://www.nongnu.org/rdiff-backup/Windows-README.txt – ErikE Apr 27 '15 at 18:53
  • @ErikE I think that is all I need: If the source file is not the same on the destination, overwrite it and thats it. On a weekly backup, this should be more than enough. You suggest a Linux solution which I want to avoid as by members here at Server Fault (and sister sites), it gives problems. – riahc3 Apr 28 '15 at 06:47
  • Ok, then you more or less answered your own question. /E or /MIR should do the trick. – ErikE Apr 28 '15 at 07:08
  • First question is - Do you really need to use Robocopy? There are many free backup utilities out there that will do exactly what you want (Iperius / Cobian etc.). They will take a full cop then backup the changes, have you thought about using DFS and point it to another server on the Domain. Good luck mate – Mikeburns55 Aug 04 '16 at 11:37
  • 1
    There are few things as reliable (well tend to be reliable) as Robocopy that copies file per file. I don't want a closed format where I need the program and look thru to recover a file. – riahc3 Aug 04 '16 at 12:29

6 Answers6

1

Technically can, but probably shouldn't if you require the ability to roll back to a point in time. It's not really what the program was intended for.

http://ss64.com/nt/robocopy.html

Might be better off using something like Git. Or there are native Windows options

Conan1989
  • 234
  • 2
  • 5
1

Windows Server Backup has too many restrictions to be useful. 1. It has limited number of files restriction, so I have to split huge files into multiple separated backups. 2. It is designed to perform a backup to local storage, not remote. 3. On backing up to remote storage, it cannot support versioning.

1

My 2 cents worth. Having recovered from a server crash caused by a faulty UPS, I can add the following experiential info. Robocopy (or in my case xcopy) does just that, copy files. There is no rollback, versioning or 'aggregation' into a "system specific filetype." The huge problem was, of course, in order to read the server backup files I needed an operation server2003 system, which I didn't have because it had just crashed, and being a small administration, only one server was ever installed.

Thus the huge .bkf files created by server2003 backup were unreadable on any other system.

I had, thanks to foresight, used a simple xcopy command in a batchfile to copy all user files to an external harddrive, and after the crash was able to still provide all these files to the users.

It makes sense to do BOTH, system specific backups, that will require a functioning system to read and reinstall from, AND a non-sytem specific open COPY that can be read by any other operating system, for just the scenario where the system that was supposed to be able to read the backup files isn't running.

Now I have a server with RAID 1, against single HD failure, incremential server backup twice a day to a 3rd exclusive HDD, and an RDX with 5 cartridges for rotational simple copy of user files, plus regular complete system back up to RDX in case of requiring to rebuild the system on other hardware. The cartridges are kept in a fire-safe.

0

You probably need to execute the following command: robocopy /copyall /e /zb

However, the lack of versioning is a very serious drawback of such a method. While it is not necessarily wrong, please think twice on your current environment and use it only and only if it really make sense.

shodanshok
  • 44,038
  • 6
  • 98
  • 162
  • Currently Im using: "robocopy \\source \\destination /E /MT:20 /R:50 /W:10 /V /ETA /LOG:c:\robocopy.txt" The only change Im looking at is to timestamp the logfile. The reason I dont use /copyall is because of concerns of locking myself out of my backups vias security. – riahc3 Apr 28 '15 at 06:53
0

You can use this Robocopy command to backup data with incremental backup mode.

SET source="Type you source path";
SET dest="Type you destination path";
robocopy %source% %dest% /S /COPYALL /NP /TEE /R:3 /W:3 /Log:c:\Documents\logs.txt
Ben Wong
  • 101
  • To me an incremental backup is one that means you can roll back to a previous version of a backup. I think this command backs up new or changed files, which is different. I'm not sure which the question is asking about, proper incremental or copying changed files. – Tim Oct 05 '16 at 23:29
  • Explain ***parameters*** `/S /COPYALL /NP /TEE /R:3 /W:3` – Kiquenet Mar 22 '17 at 16:55
0
/S = Copy Subdirectories, but not empty ones
/NP = No Progress - don't display percentage of copied
/TEE = output to console windows, as well as the log file
/W:3 = Wait time between retries: default is 30 seconds
/R:3 = Number of Retries on failed copies: default is 1 million
Alexander Tolkachev
  • 4,513
  • 3
  • 14
  • 23