List:General Discussion« Previous MessageNext Message »
From:george larson Date:September 10 2010 3:26pm
Subject:Re: hard disk crash: how to discover the db?
View as plain text  
Hi Steve.

Steve Staples wrote:
> did I miss the joke here?   Why does this backup script look SO wrong,
> and very malicious?
>
> service mysql stop -- stopping mysql... that's fine.
> cd /var/lib/mysql -- changing directories to the /var/lib/mysql, ok...
> fine
> rm -rf * -- WHAT?  WHY ARE YOU REMOVING RECUSIVLY and FORCING DELETES on
> all the MySQL files??   are you insane?  this is going to make a bad day
> for a lot of people
> tar zxvf file.tar -- Wait, you just blew away all the files in
> the /var/lib/mysql directory, how can you extract a tar file, when it
> does not exist, since you just deleted everything?????
>
> anyway, I hope I missed the joke here, or missed something...
>
> Steve.
>
>
> On Thu, 2010-09-09 at 18:02 -0400, George Larson wrote:
>> We do nightly backups at work just by taring the mysql directory.  In
>> my environment, that is /var/lib/mysql.
>>
>> Like this:
>>
>> service mysql stop
>> cd /var/lib/mysql
>> rm -rf *
>> tar zxvf file.tar
>> rm -rf ib_logfile*
>> chown -R mysql.mysql
>> service mysql start
>>
>> Something similar might work for you.  Somebody with more MySQL
>> expertise than me can probably help you customize the process to your
>> environment.
>>
>> Good luck!
>> G
>>
Nope.  No joke.  It's a process that's been in place long before I got
here and it is done, with varying frequency, by the entire staff of
developers here.  It seemed a little odd to me at first also, but I was
told only that it was faster than any other method.  It might make a
little more sense if you realize that it isn't a script, it's just me
listing the commands that are used.  This process is on /my/
(development) environment, so hasn't the potential to make bad days for
anybody except me. 

And, yeah, I suppose I could have gone with a "tar zxvf
/path/to/file.tar" but I didn't expect OP was going to tar up his
database first, so it seemed good enough for example purposes. 

Sorry for any alarming confusion.
G
Thread
hard disk crash: how to discover the db?Uwe Brauer9 Sep
Re: hard disk crash: how to discover the db?andrew.2.moore9 Sep
  • Re: hard disk crash: how to discover the db?Uwe Brauer9 Sep
    • Re: hard disk crash: how to discover the db?George Larson10 Sep
      • Re: hard disk crash: how to discover the db?Mike McMullin10 Sep
        • Re: hard disk crash: how to discover the db?Uwe Brauer10 Sep
          • Re: hard disk crash: how to discover the db?Mike McMullin10 Sep
      • Re: hard disk crash: how to discover the db?Joerg Bruehe10 Sep
        • Re: hard disk crash: how to discover the db?Johan De Meersman10 Sep
        • Re: hard disk crash: how to discover the db?Uwe Brauer10 Sep
      • Re: hard disk crash: how to discover the db?Uwe Brauer10 Sep
      • Re: hard disk crash: how to discover the db?Steve Staples10 Sep
        • Re: hard disk crash: how to discover the db?george larson10 Sep
        • Re: hard disk crash: how to discover the db?Johnny Withers10 Sep
      • no success (was: hard disk crash: how to discover the db?)Uwe Brauer13 Sep
        • RE: no success (was: hard disk crash: how to discover the db?)Gavin Towey14 Sep
Re: hard disk crash: how to discover the db?george larson10 Sep
  • Re: hard disk crash: how to discover the db?Uwe Brauer10 Sep
  • Re: hard disk crash: how to discover the db?MySQL)10 Sep
    • Re: hard disk crash: how to discover the db?george larson10 Sep
      • Re: hard disk crash: how to discover the db?Johnny Withers10 Sep
Re:hard disk crash: how to discover the db?kapil verma11 Sep