Can I backup my databases by copying "data" folder instead of mysqldump?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • 21novembre@gmail.com

    Can I backup my databases by copying "data" folder instead of mysqldump?

    Hi all,

    I made a question several days before to describe my strange trouble of
    mysqldump. But I still can't figour it out. Well, I just want to ask
    another question whether I could just backup my databases by copying
    the data folder to some place? Then if I meet some disaster, could I
    just copy the backup folder back to recover my databases?
    Thank you.

    Zh.y

  • Thomas Bartkus

    #2
    Re: Can I backup my databases by copying "data&quot ; folder instead of mysqldump?

    <21novembre@gma il.com> wrote in message
    news:1115300156 .327292.163170@ g14g2000cwa.goo glegroups.com.. .[color=blue]
    > Hi all,
    >
    > I made a question several days before to describe my strange trouble of
    > mysqldump. But I still can't figour it out. Well, I just want to ask
    > another question whether I could just backup my databases by copying
    > the data folder to some place? Then if I meet some disaster, could I
    > just copy the backup folder back to recover my databases?
    > Thank you.
    >
    > Zh.y[/color]

    Yes!
    Presuming that you will shut down the server during a copy/restore
    operation, you may do a simple copy on the data directory.

    Thomas Bartkus


    Comment

    • steve

      #3
      Re: Re: Can I backup my databases by copying &amp;quot;data& amp;quot; fo

      "tom173" wrote:[color=blue]
      > <21novembre@gma il.com> wrote in message
      > news:1115300156 .327292.163170@ g14g2000cwa.goo glegroups.com.. .[color=green]
      > > Hi all,
      > >
      > > I made a question several days before to describe my strange[/color]
      > trouble of[color=green]
      > > mysqldump. But I still can't figour it out. Well, I just[/color]
      > want to ask[color=green]
      > > another question whether I could just backup my databases by[/color]
      > copying[color=green]
      > > the data folder to some place? Then if I meet some disaster,[/color]
      > could I[color=green]
      > > just copy the backup folder back to recover my databases?
      > > Thank you.
      > >
      > > Zh.y[/color]
      >
      > Yes!
      > Presuming that you will shut down the server during a
      > copy/restore
      > operation, you may do a simple copy on the data directory.
      >
      > Thomas Bartkus[/color]

      It is detailed, with the tar parameters and all, in the mysql manual
      (Section 6 but I could be wrong).

      You can also issue an sql command to lock tables, and then make a
      backup. A little drastic than shutting down mysql, but still may stop
      service to users.

      --
      Posted using the http://www.dbforumz.com interface, at author's request
      Articles individually checked for conformance to usenet standards
      Topic URL: http://www.dbforumz.com/mySQL-backup...ict221584.html
      Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=763035

      Comment

      • 21novembre@gmail.com

        #4
        Re: Can I backup my databases by copying &amp;quot;data& amp;quot; fo

        Thank you very much! I'm reading the manual.
        But, I still wish somebody could help me out from my previous question
        about mysqldump. Here is the link:


        Comment

        Working...