Creates SQL backups
This commit is contained in:
parent
2733ab9e7e
commit
5edbe76402
35
sympa.cf
35
sympa.cf
|
@ -8,6 +8,10 @@ classes:
|
|||
"sympa_b";
|
||||
|
||||
vars:
|
||||
"user" string => "sympa";
|
||||
"group" string => "sympa";
|
||||
|
||||
|
||||
debian::
|
||||
"lib_dir" string => "/usr/lib/sympa";
|
||||
"var_lib_dir" string => "/var/lib/sympa";
|
||||
|
@ -126,6 +130,20 @@ commands:
|
|||
depends_on => {"sympa_config_updated"};
|
||||
|
||||
|
||||
# Configure Backup stuff
|
||||
files:
|
||||
run_backups::
|
||||
"$(cfg[backup_dir])/."
|
||||
create => "true";
|
||||
methods:
|
||||
run_backups::
|
||||
"any" usebundle => create_mysql_backup_cron_job(@(cfg[db_settings]),"$(cfg[backup_dir])/sympa.sql","user_table","true");
|
||||
!run_backups::
|
||||
"any" usebundle => create_mysql_backup_cron_job(@(cfg[db_settings]),"$(cfg[backup_dir])/sympa.sql","user_table","false");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -313,7 +331,16 @@ methods:
|
|||
reports:
|
||||
}
|
||||
|
||||
|
||||
bundle agent sympa_create_mailname(cfg)
|
||||
{
|
||||
files:
|
||||
debian::
|
||||
"/etc/mailname"
|
||||
create => "true",
|
||||
perms => m("644"),
|
||||
content=>"$(cfg[settings][domain])";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -324,6 +351,7 @@ vars:
|
|||
"domains_idx" slist => getindices(@(cfg[domains]));
|
||||
# "cfg_domains" slist => {"a","b","c"};
|
||||
methods:
|
||||
"any" usebundle => sympa_create_mailname(@(cfg));
|
||||
"any" usebundle => wmde_install_packages(@(sympa.pkgs),"sympa");
|
||||
"any" usebundle => sympa_update_config(@(cfg));
|
||||
"any" usebundle => sympa_init_db(@(cfg));
|
||||
|
@ -553,5 +581,10 @@ methods:
|
|||
|
||||
|
||||
reports:
|
||||
run_backup::
|
||||
"SYMPA IS RUN BACKUP";
|
||||
|
||||
!run_backup::
|
||||
"SYMPA DOES NOT RUN BACKUP";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue