3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Roll your own version control/automated backup

Roll your own version control/automated backup
Writing a software project on WIndows? Want access to all your old versions? Don't want to have to say "Oh man, I just lost a week's work" ever again? You need version control and automated backups.

A little background: I wrote this simple pair of scripts to save me time and effort at work. I am currently working on a software project that needs frequent rebuilding, so wrote my own custom build script. After the second or third time I accidentally overwrote my most recent changes and lost some small amount of work, I decided that I wanted to back up every time I built the thing.

Secondly, now that the project is being distributed and others are testing it, I get bug reports saying "I found this bug using the version from the 18th of August, can you reproduce it and fix it?". I need to be able to do that, so needed an easily accessible copy of the older versions of the project to recreate bugs on.

Having stored versions of your old code also makes fixing regressions (breaking things that you previously had working) a snap- you flick back through your old versions to find the point at which one version works and the one after it doesnt, find the differences between the two and your problem will be right there.

I decided to write this up
a) to share my work with people who might appreciate it
b) lest anyone suggest all I do is bitch about Instructables about batch files and never contribute any useful ones myself.

Please Note: I have licensed this as "all rights reserved" because it's possible that my employer owns the IP to this project, not me. As such I can't license it for modification and redistribution, so please don't redistribute this code. If you want to point people in the direction of the Instructable, however...
 
Remove these adsRemove these ads by Signing Up
 

Step 1You will need

You will need
- A command line zip program. I use 7zip because it's free and easy to use from the command line.

- Windows. I am aiming this at WIndows because that's what I have the code for, and I'm sure there are plenty of scripts like this one for Linux already. The idea would work just as well in Linux but you'd probably have to translate the batch file and VB Script so it's hardly worth the bother.

- Hard disk space. This isn't an incremental backup, it's a naive save-the-whole-lot-every-time backup. Hard disk space is cheap, but if your project is very large or you want to back up twenty times a day for a whole academic year then you might have some hard disk space issues. Worst comes to worst, buy a spindle of CD-Rs and shift your backups onto one of those when you hit 600mb or so.
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Jul 5, 2010. 9:12 AME_MAN says:
Nice Instructable!! How could I modify this to back up to a network server? Batch files do not UNC paths. I would be backing up to \\Server\Backups\ if that helps at all. Thanks so much. Happy instructabling. :D
Aug 21, 2010. 12:51 PMsylvain01 says:
free backup http://www.educ.umu.se/~cobian/cobianbackup.htm
Jul 5, 2010. 9:38 AME_MAN says:
Never mind. I figured it out. dim filesys set filesys=CreateObject("Scripting.FileSystemObject") filesys.MoveFile "Backup.zip", "\\Server\Backups\" It just moves a file called Backup.zip to \\Server\Backups\ Add it before the rest of the script in snapshot.vbs, and change the path in the existing code to be \\Server\Backups\ Happy instructabling. :D
Mar 31, 2009. 3:16 PMfwjs28 says:
wow! at first it seemed a little complicated, but its actually quite simple...im thinkging of using it for my little server project...
Oct 30, 2008. 6:26 PMcamintmier says:
Instead of going Day - Month - Year, you might want to go Year - Month - Day. YMD tends to sort better than DMY. Otherwise it looks fairly decent.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
148
Followers
18
Author:PKM