Help - Search - Members - Calendar
Full Version: Backup Program
BleepingComputer.com > Software > Programming
   
Billy O'Neal
Hello, I have finally gotten my backup program to a state where I think people can start testing it.
http://billy-oneal.com/Projects/Automatic%...ta%20Copier.exe

Many backup tools exist for windows. However, few are able to deal with situations where windows cannot boot.
This program is designed for the business that repeatedly does backups of consumer data. You create "maps", which describe backup procedures that can be used over and over. I wrote this program for internal use by my employer, but I hold the rights to it, not my boss! So I am releasing it under the GPL. Source code is here: http://billy-oneal.com/Projects/Automatic%...20Data%20Copier

Once you have created backup maps (for example, one that goes with My Documents), you can backup that same spot repeatedly with the touch of a button.

Each map contains "OS Operations", which allow you to specify different directories and such for each different operating system, or combination of operating systems.g

Known caveats:
Currently this program has no cancel or pause button, as I have not figured out how to have the UI thread tell the backup thread to pause or stop yet.
Does not detect OS automatically yet. Im not exactly sure how to go about doing this. I was going to simply MD5 ntoskrnl, but windows update changes the hash on a regular basis. If I was booting into the installation to back up, I'd simply query the registry, but that doesn't work, because that installation is not booted.

Some things that would be helpful:
Some way to read the registry of a non booted system.......
Testers who can point out bugs to me.

Special thanks to groovicus who was very good about answering my questions!


Billy3
Keithuk
QUOTE(Billy O @ Mar 3 2008, 12:45 AM) *
Many backup tools exist for windows. However, few are able to deal with situations where windows cannot boot.

I'm not sure what you mean by "situations where windows cannot boot". You can shutdown or restart with API calls.

QUOTE(Billy O @ Mar 3 2008, 12:45 AM) *
Currently this program has no cancel or pause button, as I have not figured out how to have the UI thread tell the backup thread to pause or stop yet.

Well I can't say for VB.Net but in VB6 I would have a Public variable called Running As Boolean. Then in your code you check the value of Running. If its False then stop what ever operation it is doing. The Cancel button would just be Running = False. You would also need to put a few DoEvents in the code so it can respond to the Cancel button being clicked.

QUOTE(Billy O @ Mar 3 2008, 12:45 AM) *
Does not detect OS automatically yet. Im not exactly sure how to go about doing this.

You can check what OS is running again with a few API calls. dry.gif

Billy O'Neal
No, thats not really what I mean. I cannot make calls to the API, because I am pulling the hard disk from the client machine, placing it in a USB2 enclosure, and then backing it up with the workshop machine. Then, Im taking the backup, and burning it to a dvd. Therefore, typical API calls to get the OS version dont work, because the OS partition that I am backing up is not booted.

Yes, the boolean thing would work, but each time I've tried to use that method .NET complains about cross-thread violations. I have to use a synclock or monitor on the variable, which I dont know how to do as of yet.

Also, it has the issue of: Where do I check the cancel button? How often? Versions of this program that have used that method have been horrendously slow. Its a simple matter of placing checkpoints judiciously, but I have not had time to implement and test that portion as of yet.

On the whole, its still a very immature program, but I figured I'd post it in case someone else might find it useful.

.NET doesn't use the DoEvents system anymore, rather, it's event system is based on delegates, which are basically the .NET framework's implementation of function pointers.

Billy3
Keithuk
QUOTE(Billy O @ Mar 3 2008, 03:29 PM) *
I cannot make calls to the API, because I am pulling the hard disk from the client machine, placing it in a USB2 enclosure, and then backing it up with the workshop machine.

Well to run this .Net app you must be using the .Net Framework from somewhere.
QUOTE(Billy O @ Mar 3 2008, 03:29 PM) *
Yes, the boolean thing would work, but each time I've tried to use that method .NET complains about cross-thread violations. I have to use a synclock or monitor on the variable, which I dont know how to do as of yet.

Also, it has the issue of: Where do I check the cancel button? How often? Versions of this program that have used that method have been horrendously slow. Its a simple matter of placing checkpoints judiciously, but I have not had time to implement and test that portion as of yet.

Well I'm not sure how your code is structured but is this code being run in a Do While, For/Next loop or something else? You just put the Boolean in the loop with the equivalent DoEvents. dry.gif
Billy O'Neal
Yeah, thats what ive been trying. Problem is, the loop runs every time the program copies a kb. Which makes it take forever.

Dont worry about it.. I'll see if I can just increase the buffer size...

Billy3
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.