NEW Can set number of dump to keep with job "local database backup"
This commit is contained in:
parent
43f3e46aac
commit
74e8fb9c19
@ -2,6 +2,13 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** ChangeLog for 5.0.0 compared to 4.0.* *****
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regression for some external modules, but were necessary to make Dolibarr better:
|
||||||
|
* The hook getNodeList has been replaced by a normalized 'addreplace' hook getDirList.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 5.0.0 compared to 4.0.* *****
|
***** ChangeLog for 5.0.0 compared to 4.0.* *****
|
||||||
|
|||||||
@ -111,8 +111,9 @@ jQuery(document).ready(function() {
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("Backup"),'','title_setup');
|
print load_fiche_titre($langs->trans("Backup"),'','title_setup');
|
||||||
|
//print_barre_liste($langs->trans("Backup"), '', '', '', '', '', $langs->trans("BackupDesc",DOL_DATA_ROOT), 0, 0, 'title_setup');
|
||||||
|
|
||||||
print $langs->trans("BackupDesc",DOL_DATA_ROOT).'<br><br>';
|
print '<div class="center">'.$langs->trans("BackupDesc",DOL_DATA_ROOT).'</div><br><br>';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -121,7 +122,7 @@ print $langs->trans("BackupDesc",DOL_DATA_ROOT).'<br><br>';
|
|||||||
name="token" value="<?php echo $_SESSION['newtoken']; ?>" /> <input
|
name="token" value="<?php echo $_SESSION['newtoken']; ?>" /> <input
|
||||||
type="hidden" name="export_type" value="server" />
|
type="hidden" name="export_type" value="server" />
|
||||||
|
|
||||||
<fieldset id="fieldsetexport"><legend style="font-size: 3em">1</legend>
|
<fieldset id="fieldsetexport"><legend class="legendforfieldsetstep" style="font-size: 3em">1</legend>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
print $langs->trans("BackupDesc3",$dolibarr_main_db_name).'<br>';
|
print $langs->trans("BackupDesc3",$dolibarr_main_db_name).'<br>';
|
||||||
@ -468,7 +469,7 @@ print '</td></tr></table>';
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="backupdatabaseright" class="fichehalfright" style="height:400px; overflow: auto;">
|
<div id="backupdatabaseright" class="fichehalfright" style="height:480px; overflow: auto;">
|
||||||
<div class="ficheaddleft">
|
<div class="ficheaddleft">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -484,7 +485,7 @@ print '<br>';
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<fieldset><legend style="font-size: 3em">2</legend>
|
<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>
|
||||||
<?php
|
<?php
|
||||||
print $langs->trans("BackupDesc2",DOL_DATA_ROOT).'<br>';
|
print $langs->trans("BackupDesc2",DOL_DATA_ROOT).'<br>';
|
||||||
print $langs->trans("BackupDescX").'<br><br>';
|
print $langs->trans("BackupDescX").'<br><br>';
|
||||||
|
|||||||
@ -145,6 +145,7 @@ class HookManager
|
|||||||
'formatNotificationMessage',
|
'formatNotificationMessage',
|
||||||
'getFormMail',
|
'getFormMail',
|
||||||
'getIdProfUrl',
|
'getIdProfUrl',
|
||||||
|
'getDirList',
|
||||||
'moveUploadedFile',
|
'moveUploadedFile',
|
||||||
'pdf_build_address',
|
'pdf_build_address',
|
||||||
'pdf_writelinedesc',
|
'pdf_writelinedesc',
|
||||||
|
|||||||
@ -154,6 +154,7 @@ class Utils
|
|||||||
global $db, $conf, $langs, $dolibarr_main_data_root;
|
global $db, $conf, $langs, $dolibarr_main_data_root;
|
||||||
global $dolibarr_main_db_name, $dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_port, $dolibarr_main_db_pass;
|
global $dolibarr_main_db_name, $dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_port, $dolibarr_main_db_pass;
|
||||||
|
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
dol_syslog("Utils::dumpDatabase type=".$type." compression=".$compression." file=".$file, LOG_DEBUG);
|
dol_syslog("Utils::dumpDatabase type=".$type." compression=".$compression." file=".$file, LOG_DEBUG);
|
||||||
@ -406,6 +407,19 @@ class Utils
|
|||||||
$this->result = array("commandbackuplastdone" => "", "commandbackuptorun" => $command." ".$paramcrypted);
|
$this->result = array("commandbackuplastdone" => "", "commandbackuptorun" => $command." ".$paramcrypted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clean old files
|
||||||
|
if ($keeplastnfiles > 0)
|
||||||
|
{
|
||||||
|
$tmpfiles = dol_dir_list($conf->admin->dir_output.'/backup', 'files', 0, '', '(\.err|\.old|\.sav)$', 'date', SORT_DESC);
|
||||||
|
$i=0;
|
||||||
|
foreach($tmpfiles as $key => $val)
|
||||||
|
{
|
||||||
|
$i++;
|
||||||
|
if ($i <= $keeplastnfiles) continue;
|
||||||
|
dol_delete_file($val['fullname']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -378,7 +378,7 @@ input:-webkit-autofill {
|
|||||||
input:-moz-placeholder { color:#ccc; }
|
input:-moz-placeholder { color:#ccc; }
|
||||||
|
|
||||||
fieldset { border: 1px solid #AAAAAA !important; }
|
fieldset { border: 1px solid #AAAAAA !important; }
|
||||||
|
.legendforfieldsetstep { padding-bottom: 10px; }
|
||||||
|
|
||||||
.button, .buttonDelete, input[name="sbmtConnexion"] {
|
.button, .buttonDelete, input[name="sbmtConnexion"] {
|
||||||
font-family: <?php print $fontlist ?>;
|
font-family: <?php print $fontlist ?>;
|
||||||
|
|||||||
@ -355,6 +355,7 @@ input:-webkit-autofill {
|
|||||||
input:-moz-placeholder { color:#ccc; }
|
input:-moz-placeholder { color:#ccc; }
|
||||||
|
|
||||||
fieldset { border: 1px solid #AAAAAA !important; }
|
fieldset { border: 1px solid #AAAAAA !important; }
|
||||||
|
.legendforfieldsetstep { padding-bottom: 10px; }
|
||||||
|
|
||||||
|
|
||||||
.button, sbmtConnexion {
|
.button, sbmtConnexion {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user