Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#197 backup.php doesn't use customized table names

v_2.3
open
nobody
Database (41)
4
2011-04-19
2010-06-03
mediaf
No

When trying to use the backup function (backup.php) I get the error message (partially in french) :
DEBUG INFORMATION:
Invalid query: La table 'postfix.alias_domain' n'existe pas (The table 'postfix.alias_domain doesn't exist)

The reason is that backup.php contains an array called $tables which redefines the tables used.
It should instead use $CONF['database_prefix'] and $CONF['database_tables'] which can be defined in config.inc.php.

Discussion

  • In fact, it should use the table_by_key() function ;-)

    That said: backup.php isn't really maintained and does not work with PostgreSQL.

    IMHO mysqldump is the better way to do backups. I'm even thinking about removing backup.php from postfixadmin - better no backup feature at all (people _will_ then use mysqldump) than a possibly broken one that gives you a broken backup...
    What do you think?

     
  • Charles
    Charles
    2010-06-23

    Hi Christian,

    I use this all the time, and find it extremely useful to be able to simply click a button and save a dump of the current database on my workstation.

    I would beg you to keep it... but maybe just change it to use the mysqldump command for mysql databases, and pgdump for postgresql databases?

     
  • mediaf
    mediaf
    2010-06-23

    I usually make database backups using phpMyAdmin, so for me it isn't critical to have a working backup module inside postfixadmin.

     
    • priority: 5 --> 4