Hi

For those who are interested, I have created a little perl script to backup a MySQL database.

The script can be found here. ( actual script here )

Working:

You first need to configure it, by editing the file. Things you should change:

$use -> your MySQL username
$password -> your MySQL password

Note : You should use a username that have access to all tables.

The script will then gather the info of all databases ( excluding the mysql db ) and dump the content ( valid SQL statements ) to standard output ( stdout ).

You should call the script like this:

prompt> mysqlbackup.pl > backupfile.sql

The reason I did not include the mysql db are numerous, so you should backup that manually, especially the user table.

When you need to restore the database, just call the backup.sql file from the mysql client, or use phpMyAdmin.

I hope this helps somebody

itfirms.co.za