Restore Incremental Cobian Backups – Easily

02/05/2014

Have you been running your Cobian backup for many months and have just had your server or computer crash and need to restore your backups urgently? Snap! So did we. What we didn’t realise until we looked at the backups that every folder is stored in its entirety for every single day of our incremental backups. This means we need to manually drag and drop each folder on to the new restore location to fully rebuild the backup into a single repo. That will take forever, I hear you say. Ah, but fear not, there is a really simple DOS command which can help us out here.

Enter stage left, xcopy! A simple command can easily restore all that we need. Here’s what I did:-

  1. Before running incremental backups we ran a full backup way back at the beginning. I now copied the contents of the full backup folder to my “Design” folder on my Y drive.
  2. I thne  clicked the Windows start button and typed cmd, then pressed enter. This opened the command window.
  3. Then it was simply a case of typing in the line of code below and then pressing enter. You need to replace the drive and folder names to match your own.
for /f "delims=" %a in ('dir /b/ad "F:\design\Design*Inc*" ') do xcopy "F:\design\%a" Y:\Design\ /e /y

 

This copies the contents of any folders within F:\design\ that starts with “Design” and has “Inc” in it’s name. The asterisks are wildcard characters. The last 2 commands then forces xcopy to overwrite existing files and don’t display warning messages. xcopy will run through and do all this in the date order that the folders were created and provide a single, merged copy of all your backups. That way only newer files overwrite older files. Simple!