MySQL backup script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • somaBoy MX

    MySQL backup script

    I'm looking for a script that I can run periodically (from crontab) that
    creates a dump from a mysql database, stores it in a folder on the server
    and maybe sends me a copy via email.

    I think I would be able to write this myself, but I'm sure there must be
    some decent ones around. Why reinvent the wheel, right?

    Does anyone know a good one?


    ..soma


  • Cameron

    #2
    Re: MySQL backup script

    somaBoy MX wrote:[color=blue]
    > I'm looking for a script that I can run periodically (from crontab) that
    > creates a dump from a mysql database, stores it in a folder on the server
    > and maybe sends me a copy via email.
    >
    > I think I would be able to write this myself, but I'm sure there must be
    > some decent ones around. Why reinvent the wheel, right?
    >
    > Does anyone know a good one?
    >
    >
    > .soma
    >
    >[/color]

    there is an app "mysqldump" which can be run with the command line switches


    mysqldump -u<username> -p<password> -ac >> sqlbackup.sql

    the a means all mysql specific create options

    and the c means complete insert statments

    ~Cameron

    Comment

    • Neil

      #3
      Re: MySQL backup script

      On Thu, 29 Jan 2004 00:33:30 +0100, "somaBoy MX" <none@nonesuch. net>
      wrote:
      [color=blue]
      >I'm looking for a script that I can run periodically (from crontab) that
      >creates a dump from a mysql database, stores it in a folder on the server
      >and maybe sends me a copy via email.
      >
      >I think I would be able to write this myself, but I'm sure there must be
      >some decent ones around. Why reinvent the wheel, right?
      >
      >Does anyone know a good one?
      >
      >
      >.soma[/color]

      Here you go.... http://www.phpfreaks.com/script/view/11.php I'm using
      it with a daily cron job and each morning my Mysql database turns up
      in my email. It was also store a copy on your server in whatever
      directory you like to choose.

      HTH,
      Neil

      Comment

      • somaBoy MX

        #4
        Re: MySQL backup script


        "Neil" <me@nospam.ne t> wrote ...
        : Here you go.... http://www.phpfreaks.com/script/view/11.php I'm using
        : it with a daily cron job and each morning my Mysql database turns up
        : in my email. It was also store a copy on your server in whatever
        : directory you like to choose.

        Thanks, it's exactly what I was looking for...


        ..soma


        Comment

        Working...