Commit 81ec25f5 authored by HongzheWang's avatar HongzheWang

matomo-tutorial:Add regular backup

parent 0054135b
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[template-matomo-instance] [template-matomo-instance]
filename = matomo-instance.cfg.in filename = matomo-instance.cfg.in
md5sum = 2183607e3c22bc57d3898742ea0c1ef5 md5sum = 9ff98282480b9edf9af75fca5da5f349
[template-matomo-backup.sh] [template-matomo-backup.sh]
filename = matomo-backup.sh.in filename = matomo-backup.sh.in
......
...@@ -5,6 +5,13 @@ dir-backup = ${directory:backup} ...@@ -5,6 +5,13 @@ dir-backup = ${directory:backup}
find-bin = {{ findutils_location }} find-bin = {{ findutils_location }}
diff-bin = {{ diffutils_location }} diff-bin = {{ diffutils_location }}
[matomo-backup-cron]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = matomo-backup
frequency = 0 0 * * *
command = ${matomo-backup.sh:output}
[matomo-backup.sh] [matomo-backup.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
url = {{ matomo_backup_sh }} url = {{ matomo_backup_sh }}
......
...@@ -32,7 +32,7 @@ archive-root = matomo ...@@ -32,7 +32,7 @@ archive-root = matomo
# Without it the instance-matomo.cfg file will not be executed # Without it the instance-matomo.cfg file will not be executed
[custom-application-deployment] [custom-application-deployment]
path = ${template-matomo-instance:output} path = ${template-matomo-instance:output}
part-list = matomo-backup.sh part-list = matomo-backup.sh matomo-backup-cron
db-name = matomo db-name = matomo
db-user = matomo db-user = matomo
db-password = 12345678 db-password = 12345678
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment