PHP and MySql database backup

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

    PHP and MySql database backup

    I have an internet portal based on MySql database and what I need is
    to make a database backup , after each actualization of data.

    I know how should PHP code look like but I have no idea how to create
    SQL command that will backup full database.

    I know that this group does't concern MySql directly but lots of PHP
    programmers have wide knowledge of MySql.

    I will be grateful for help.

    Greetings

    Konrad
  • Steven Stern

    #2
    Re: PHP and MySql database backup

    On 11 Oct 2004 05:55:06 -0700 (more or less), konio@eranet.pl (Konrad) wrote:
    [color=blue]
    >I have an internet portal based on MySql database and what I need is
    >to make a database backup , after each actualization of data.
    >
    >I know how should PHP code look like but I have no idea how to create
    >SQL command that will backup full database.
    >
    >I know that this group does't concern MySql directly but lots of PHP
    >programmers have wide knowledge of MySql.
    >[/color]


    I run this script from cron every night:

    $ more sql-backup.sh
    export test2
    declare test2=`date|cut -c 1-3`
    /usr/local/mysql/bin/mysqldump --all-databases -ppassword |gzip >
    /var/backups/all_databases_$ test2.sql.gz

    but I found a lot of php based solutions at


    Comment

    Working...