Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i have mysql database in which millions of insertions go on. Now there is a possibilty that the power present on laptop is going down and hence i would like to pause the application and resume it afterwards in same machine or in a different machine. All this has to be done programatically. Basically i would read the battery level of the syatem and then save the state. I am using ubuntu linux. I googled for saving application state but could find cryopid that doesn't seem the right candidate for this job. Any ideas on how to accomplish this.

share|improve this question

migrated from stackoverflow.com Mar 5 '11 at 5:17

This question came from our site for professional and enthusiast programmers.

4  
Shouldn't the system do this (i.e. hibernate if there is a danger of the battery running out) anyway? Windows does it, I'm sure Ubuntu can too. If it doesn't, it may be a hardware incompatibility. Anyway, it's off-topic here, voting to migrate on Superuser –  Pekka 웃 Mar 4 '11 at 22:47
    
@Sean for a hibernation issue on a battery-powered Laptop? Not really IMO. He happens to be running mySQL on the machine, but the question has nothing to do with it –  Pekka 웃 Mar 4 '11 at 22:51
    
@Sean: A server on a battery-powered laptop? ;-) –  Philipp Mar 4 '11 at 22:55
    
ok.. i agree that saving application state is OS issue. I would like to migrate the mysql from between two systems under some situations, when it is running –  nikhil Mar 4 '11 at 22:55
    
@Pekka, @Philipp -- Chuckles I know it sounds crazy, but that was the only reason I could think of off the top of my head why one would have millions of insertions going on on continuously enough that one would have to worry about backup in case of catastrophic power loss. –  Sean Vieira Mar 4 '11 at 23:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.