List:General Discussion« Previous MessageNext Message »
From:Daniel Kasak Date:September 26 2007 3:14am
Subject:Re: Ouch! ibdata files deleted. Why no catastrophe?
View as plain text  
On Tue, 2007-09-25 at 23:11 -0400, Gary Josack wrote:

> Well if you can stop all instances of writes to the databases you should 
> be able to recover them.
> 
> Each file is going to be in /proc/5460/fd/10-17
> 
> the file number corresponds to the fd you see in lsof output
> 
> ex:
> cp /proc/5460/fd/10 ibdata2
> 
> This is still risky and i reccomend you get a dump immediately. As soon 
> as you restart mysql those files are gone forever.

Yes I've been reading / thinking more about this, and I've decided
against it. There's no real guarantee that MySQL will have written
everything to the ibdata files at the point when I make a snapshot of
them ( at least as far as I know ). Since the nightly backups are still
working perfectly, I'll just shut down MySQL when the backup completes,
delete /var/lib/mysql, and import the backup. That sounds a lot safer
than anything else at the moment.

Thanks again for your response. At least I learned about lsof and
recovering deleted files :)


--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@stripped
website: http://www.nusconsulting.com.au

Thread
Ouch! ibdata files deleted. Why no catastrophe?Daniel Kasak26 Sep
  • Re: Ouch! ibdata files deleted. Why no catastrophe?Gary Josack26 Sep
    • Re: Ouch! ibdata files deleted. Why no catastrophe?Daniel Kasak26 Sep
      • Re: Ouch! ibdata files deleted. Why no catastrophe?Gary Josack26 Sep
        • Re: Ouch! ibdata files deleted. Why no catastrophe?Daniel Kasak26 Sep
          • Re: Ouch! ibdata files deleted. Why no catastrophe?Gary Josack26 Sep
        • Re: Ouch! ibdata files deleted. Why no catastrophe?Baron Schwartz26 Sep
          • Re: Ouch! ibdata files deleted. Why no catastrophe?Ananda Kumar26 Sep
            • Re: Ouch! ibdata files deleted. Why no catastrophe?Baron Schwartz26 Sep
  • Re: Ouch! ibdata files deleted. Why no catastrophe?Martijn Tonies26 Sep
    • RE: Ouch! ibdata files deleted. Why no catastrophe?Jerry Schwartz26 Sep
      • RE: Ouch! ibdata files deleted. Why no catastrophe?Daniel Kasak27 Sep
      • Re: Ouch! ibdata files deleted. Why no catastrophe?Joerg Bruehe28 Sep
  • Re: Ouch! ibdata files deleted. Why no catastrophe?Martijn Tonies27 Sep