Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Backup Program


  • Please log in to reply
4 replies to this topic

#1 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:04:22 PM

Posted 02 March 2008 - 07:45 PM

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
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

BC AdBot (Login to Remove)

 


#2 Keithuk

Keithuk

  • Members
  • 956 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:12:22 AM

Posted 03 March 2008 - 08:15 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.

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.

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. :thumbsup:

Keith

Windows ME (spare computer)
Windows XP 2002 Professional SP3 (desktop computer)
Windows 7 Professional SP1 32bit (laptop computer)

Windows 8 64bit spare drive for laptop computer


#3 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer

  • Topic Starter

  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:04:22 PM

Posted 03 March 2008 - 10:29 AM

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
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#4 Keithuk

Keithuk

  • Members
  • 956 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:12:22 AM

Posted 03 March 2008 - 02:59 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.

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. :thumbsup:

Keith

Windows ME (spare computer)
Windows XP 2002 Professional SP3 (desktop computer)
Windows 7 Professional SP1 32bit (laptop computer)

Windows 8 64bit spare drive for laptop computer


#5 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer

  • Topic Starter

  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:04:22 PM

Posted 06 March 2008 - 02:01 PM

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
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users