diff --git a/backup.php b/backup.php index 0e859cdf..8a2ca441 100644 --- a/backup.php +++ b/backup.php @@ -28,14 +28,27 @@ authentication_require_role('global-admin'); (($CONF['backup'] == 'NO') ? header("Location: main.php") && exit : '1'); // TODO: make backup supported for postgres -if ('pgsql'==$CONF['database_type']) -{ - $smarty->assign ('tMessage', '
Sorry: Backup is currently not supported for your DBMS ('.$CONF['database_type'].').
'); +if ('pgsql'==$CONF['database_type']) { + $smarty->assign ('tMessage', 'Sorry: Backup is currently not supported for your DBMS ('.$CONF['database_type'].').
', false); $smarty->assign ('smarty_template', 'message'); $smarty->display ('index.tpl'); -// print 'Sorry: Backup is currently not supported for your DBMS.
'; -die; + die; } + +if (safeget('download') == "") { + $smarty->assign ('tMessage', ' +Warning: The backup module of PostfixAdmin is poorly maintained and might contain bugs.
+Please use mysqldump to get a reliable backup of your database.
++
If you still trust this backup module, you can download the database dump now
+ ', false); + $smarty->assign ('smarty_template', 'message'); + $smarty->display ('index.tpl'); + die; +} + +# Still here? Then let's create the database dump... + /* SELECT attnum,attname,typname,atttypmod-4,attnotnull,atthasdef,adsrc AS def FROM pg_attribute,pg_class,pg_type,pg_attrdef