add simple backup-function for customers (testing state)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-04-28 09:20:35 +02:00
parent a485d9f4f9
commit c8bbefb2bb
13 changed files with 554 additions and 88 deletions

View File

@@ -556,7 +556,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('panel', 'password_special_char_required', '0'),
('panel', 'password_special_char', '!?<>§$%+#=@'),
('panel', 'version', '0.9.35.1'),
('panel', 'db_version', '201603150');
('panel', 'db_version', '201604270');
DROP TABLE IF EXISTS `panel_tasks`;
@@ -765,7 +765,8 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
(4, 'froxlor/ticket', 'ticketarchive', '1 MONTH', '1', 'cron_ticketarchive'),
(5, 'froxlor/reports', 'usage_report', '1 DAY', '1', 'cron_usage_report'),
(6, 'froxlor/core', 'mailboxsize', '6 HOUR', '1', 'cron_mailboxsize'),
(7, 'froxlor/letsencrypt', 'letsencrypt', '5 MINUTE', '0', 'cron_letsencrypt');
(7, 'froxlor/letsencrypt', 'letsencrypt', '5 MINUTE', '0', 'cron_letsencrypt'),
(8, 'froxlor/backup', 'backup', '1 DAY', '1', 'cron_backup');

View File

@@ -3292,3 +3292,21 @@ if (isFroxlorVersion('0.9.35')) {
updateToVersion('0.9.35.1');
}
if (isFroxlorVersion('0.9.35.1') && isDatabaseVersion('201603150')) {
showUpdateStep("Adding new backup-cron entry");
$stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_CRONRUNS . "` SET
`module` = 'froxlor/backup',
`cronfile` = 'backup',
`interval` = '1 DAY',
`desc_lng_key` = 'cron_backup',
`lastrun` = 0,
`isactive` = 0"
);
Database::pexecute($stmt);
lastStepStatus(0);
updateToDbVersion('201604270');
}