ghenry has asked for the wisdom of the Perl Monks concerning the following question:

Dear Master Monks,

I am trying to script a MySQL and PostgreSQL backup.

I have found MySQL::Backup and DBA::Backup, but I wanted some advice as to whether I should just use system commands or the above modules. I suppose this comes down to whether or not the backup script will be used on different OS's.

Can anyone recommend a good solution?

Thanks.

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!

Replies are listed 'Best First'.
Re: Backing up MySQL and PostgreSQL
by jasonk (Parson) on Jun 08, 2005 at 13:03 UTC

      Ah, sorry. Having an off day today. I completely forgot about those.

      My head is too stuck in the world of Perl.

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!
Re: Backing up MySQL and PostgreSQL
by fauria (Deacon) on Jun 08, 2005 at 13:29 UTC
Re: Backing up MySQL and PostgreSQL
by JupiterCrash (Monk) on Jun 08, 2005 at 13:46 UTC
    It wasn't mentioned yet, so I will mention it- for mysql, also take a look at the 'mysqldump' utility. It's pretty quick, and dumps all the tables to a textfile full of sql create table and insert commands.

    Matt