|
|
|
@ -29,19 +29,19 @@ authentication_require_role('global-admin');
|
|
|
|
|
|
|
|
|
|
// TODO: make backup supported for postgres
|
|
|
|
|
if ('pgsql'==$CONF['database_type']) {
|
|
|
|
|
$smarty->assign ('tMessage', '<p>Sorry: Backup is currently not supported for your DBMS ('.$CONF['database_type'].').</p>', false);
|
|
|
|
|
flash_error('<p>Sorry: Backup is currently not supported for your DBMS ('.$CONF['database_type'].').</p>');
|
|
|
|
|
$smarty->assign ('smarty_template', 'message');
|
|
|
|
|
$smarty->display ('index.tpl');
|
|
|
|
|
die;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (safeget('download') == "") {
|
|
|
|
|
$smarty->assign ('tMessage', '
|
|
|
|
|
flash_error('
|
|
|
|
|
<p><span class="error_msg">Warning:</span> The backup module of PostfixAdmin is poorly maintained and might contain bugs.</p>
|
|
|
|
|
<p>Please use <tt>mysqldump</tt> to get a reliable backup of your database.</p>
|
|
|
|
|
<p> </p>
|
|
|
|
|
<p>If you still trust this backup module, you can <a href="backup.php?download=1">download the database dump now</a></p>
|
|
|
|
|
', false);
|
|
|
|
|
<p>If you still trust this backup module, you can <a href="backup.php?download=1" class="button">download the database dump now</a></p>
|
|
|
|
|
');
|
|
|
|
|
$smarty->assign ('smarty_template', 'message');
|
|
|
|
|
$smarty->display ('index.tpl');
|
|
|
|
|
die;
|
|
|
|
@ -80,11 +80,9 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
|
|
|
|
|
|
|
|
|
|
if (!$fh = fopen ($backup, 'w'))
|
|
|
|
|
{
|
|
|
|
|
$tMessage = "<div class=\"error_msg\">Cannot open file ($backup)</div>";
|
|
|
|
|
$smarty->assign ('tMessage', $tMessage);
|
|
|
|
|
flash_error("<div class=\"error_msg\">Cannot open file ($backup)</div>");
|
|
|
|
|
$smarty->assign ('smarty_template', 'message');
|
|
|
|
|
$smarty->display ('index.tpl');
|
|
|
|
|
// include ("templates/message.php");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|