List:General Discussion« Previous MessageNext Message »
From:Johnny Withers Date:September 10 2010 5:00pm
Subject:Re: hard disk crash: how to discover the db?
View as plain text  
I agree with everyone else here.

This NOT a backup job listed here. it is a RESTORE job that is restoring
data previously backed up into a file named 'file.tar' (should probably be
file.tar.gz or file.tgz anyway).

This sequence of commands should never be run on a server that you are
wanting to backup (development, testing, stage and/or production).

> service mysql stop
> cd /var/lib/mysql
> *rm -rf * (this will delete all your MySQL data)*
> tar zxvf file.tar
> rm -rf ib_logfile*
> chown -R mysql.mysql
> service mysql start



-JW



On Fri, Sep 10, 2010 at 9:51 AM, Steve Staples <sstaples@stripped> 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
> >
> > On 9 September 2010 17:08, Uwe Brauer <oub@stripped> wrote:
> > > andrew.2.moore@stripped wrote:
> > >>
> > >> Try using the failed hdd as a slave in a Linux machine.
> > >
> > >> You might find that the hdd won't boot to OS but may have enough in it
> to
> > >> access the file system.
> > >
> > > I have done that already and I have access. But I don't know how to
> extract
> > > the db (via dump) since the corresponding mysql server software is not
> > > running. how can i tell linux to use the mysql db of the Mac?
> > >
> > > Uwe Brauer
> > >
> > > --
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:
> > >  http://lists.mysql.com/mysql?unsub=1
> > >
> > >
> >
>
>
> --
>
> Steve Staples
> Web Application Developer
> 519.258.2333 x8414
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>


-- 
-----------------------------
Johnny Withers
601.209.4985
johnny@stripped

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