Introduction: Batch Backup System - to Make Life That Little Bit Easier!

This Instructable will show you the reasoning behind, and the correct codes to create a backup system, backing up an external drive (e.g. SD Card, USB Drive etc.)

This system should be used entirely for your own personal use and too make your life that little bit easier. I therefore reserve the right not to be held responsible for any activity, in which you should use this information, outside of this Instructable.

Step 1: Huh?!? Why Notepad, That's the Most Useless Program Ever!

There is one basic command really and that's ROBOCOPY.
Those with earlier versions of windows may be more familiar with it as XCOPY.

Robocopy is basically a mass copying command, used to copy many files over networks in businesses or otherwise.

Here is the script for my system, you'll have to change yours so that you can copy what to where.

So type this out on Notepad!

@echo off
ROBOCOPY I:\. F:\sd_card_backup /E /ETA /Z /MIR
EXIT

I:/. (that's my target drive, the . is to specify "copy the whole thing")

F:/sd_card_backup (that's my destination drive, the "sd_card_backup" is the name of the folder I want to save it all in. If this older doesn't exist then one will be created. Oh, and my drive value is "F:/" cause I have an external one. Yours will probably be "C:/")

/E (tells the system to copy all the folders, even if there empty. This way you can have a complete replication of the folder/drive you copied.)

/ETA (will give you an Estimated Time of Arrival, see what they did there?)

/Z (you don't need to worry about this, it's just the type of copying that works best for small copies)

/MIR (again, this assures you have a mirror of what you copied, to make sure you've got absolutely everything)

SO!

Your text may look like this if you were backing up your USB drive for example:

@echo off
ROBOCOPY G:\. C:\users\user\documents\USB_backup /E /ETA /Z /MIR
EXIT

This would copy your entire G drive (hopefully your USB) to your documents, creating and placing it in a folder called "USB_backup".

Lovely!

Step 2: So Now What, All I've Got Is This Rubbish Writting That Means Nothing!

Time to save it!

All you need to do now is save it as a batch file

Got to
File --> Save

Make sure your drop down box is selecting "All Files" and you type ".bat" at the end of the file name!

See the picture for more details!

Step 3: And Hey Presto!

So that's basically it. The rest is really easy.

You just click on the file, and depending on the amount of stuff you copy, it might just flash up for a second and go.

If your really lazy then you can download the script for mine below and change it as you wish:

And if enough people ask for it then i'll design one where you can input the details yourself and it'll do it for you. Laziness at it's fullest! P.M me if you have any real problems or any requests.

Have fun!
Hope this helped!

EDIT: I got so bored today that I decided to make that system file I talked about earlier, so here it is. I called it "IBUS" (I liked it to!) and it prompts you for input to personalise your backup. Oh and read the READ ME file that comes with it too!

Let me know what you think!

Comments

author
PCfreak made it!(author)2012-12-21

i downloaded your ibus file, tried and absoulely love it thks for great instructable
Two Thumbs up

author
mikedoth made it!(author)2008-06-15

I've been using robocopy for a while now, I was looking for an alternative to rsync in unix and found it then made up some batch files. Good instructable though.

author
Redgerr made it!(author)2008-07-19

i robocopy the same as xcopy?

author
mikedoth made it!(author)2008-07-19

Robocopy is designed for reliable mirroring of directories or directory trees. It has features to ensure all NTFS attributes and properties are copied, and includes additional restart code for network connections subject to disruption. xcopy was just an extension of the plain old copy command so that it could do directories.

author
Redgerr made it!(author)2008-07-20

ohhh... thanks i wasnt sure :] but is robocopy a seprate program or is it still in the command prompt :S sorry for all the questions lol

author
mikedoth made it!(author)2008-07-20

Robocopy is a separate program that is run from the command prompt. You'd need to obtain it, at say here: http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

It's in a resource kit on their site, download and extract the exe. I just also read somewhere that they have a gui for it as well somewhere.

author
Redgerr made it!(author)2008-07-21

i see, thank you very much :)

author
kirk.cieszkiewicz made it!(author)2011-08-26

Even though xcopy.exe is an extension of the original "copy" command, it supports the copying of archived, hidden, and system files, as well as preserving any attributes that these files have.

However, you can just open up "My Computer", and right-click on the desired drive, and select "Copy" from the drop-dialog

This way, you can rely on the Windows copying system to cover everything you need reliably, as well as any hidden files in the parent directory that you may not have selected when copying from the parent directory.

author
berky93 made it!(author)2009-01-26

if I add another line before the EXIT with the same commands on it but a different path to copy to (so it backs up my flash drive to my pc and to my external hard drive) will it copy the files to BOTH locations before exiting?

author
berky93 made it!(author)2009-01-26

ok I tested it, and it SEEMS to have worked. I havent made sure EVERY file is correct, but I checked both backup locations and all of the folders are correct, and the files inside SEEM to be correct, even my invalid files (such as an encrypted mountable drive that is disguised as an invalid .png file) are there.

author
theknight made it!(author)2009-01-28

Yeah it should work, just use the same idea s the instructalbe for the line before exit and your ready to go. And yes the system is designed to mirror your directory tree (but not deleting files in the destination if deleted in the source).

author
berky93 made it!(author)2009-01-28

I noticed something weird - when my flash drive is plugged in, the backup directory mirrors it perfectly. but when its unplugged, any changes Ive made to the backup directory come back

author
berky93 made it!(author)2009-01-26

this is a great instructable! I always find it a hassle to backup my flash drive manually, but now I just run this file and it does it automatically! sweet.