Skip to content
Snippets Groups Projects
Commit b272b7cc authored by jurgenhaas's avatar jurgenhaas
Browse files

Fix mysql backup context

parent 351ce84b
Branches
Tags
1 merge request!23Merging develop into main
Pipeline #525420 passed
......@@ -252,14 +252,15 @@ class Handler extends BaseHandler {
$traefik['usessl'] = 1;
$traefik['ports'] = 443;
$crontabs = $this->config->readValue('crontabs');
$crontabs['enable'] = (array_sum(array_map('count', $crontabs)) > 0);
if (!$isStaging) {
$crontabs['www-data']['MySQL backup'] = [
'schedule' => '5 0 * * *',
'command' => 'cd /var/www/html && /usr/local/bin/drush sql:dump --result-file=/var/backups/mysql/drupal.sql',
];
$crontabs['enable'] = TRUE;
$crontabs['enable_mysql_backup'] = TRUE;
}
$crontabs['enable'] = (array_sum(array_map('count', $crontabs)) > 0);
$this->config->setValue('crontabs', $crontabs, FALSE);
$overwriteConfig = [
'staging' => $isStaging,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment