diff --git a/postgres/files/crontab b/postgres/files/crontab index 0f991b9527b858c01d9588af93459357df9672b4..9cc887a5ad0ebed81045f3778886d58943cf1f7e 100644 --- a/postgres/files/crontab +++ b/postgres/files/crontab @@ -1,13 +1,5 @@ -# -# For more information see the manual pages of crontab(5) and cron(8) -# -# m h dom mon dow command -5,20,35,50 * * * * /usr/bin/rsnapshot frequently - -3 * * * * /usr/bin/rsnapshot hourly - -51 23 * * * /usr/bin/rsnapshot daily - -41 23 * * 6 /usr/bin/rsnapshot weekly - -31 23 2 * * /usr/bin/rsnapshot monthly +5,20,35,50 * * * * root /usr/bin/rsnapshot frequently +3 * * * * root /usr/bin/rsnapshot hourly +51 23 * * * root /usr/bin/rsnapshot daily +41 23 * * 6 root /usr/bin/rsnapshot weekly +31 23 2 * * root /usr/bin/rsnapshot monthly diff --git a/postgres/tasks/main.yml b/postgres/tasks/main.yml index f9a0d4d3805f834ec08979850fe9339c1731a8b4..3a00f677bd954bfc91a17e7483ed0c26f547c468 100644 --- a/postgres/tasks/main.yml +++ b/postgres/tasks/main.yml @@ -42,7 +42,7 @@ - config - name: ensure rsnapshot is running regularly - copy: src=crontab dest=/var/spool/cron/crontabs/root owner=root group=root mode=0600 + copy: src=crontab dest=/etc/cron.d/postgres-snapshot owner=root group=root mode=0644 tags: - postgres - rsnapshot