Skip to content

Commit

Permalink
Add cron jobs for quarterly and weekly backups
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Jul 15, 2024
1 parent d0236d1 commit ca795b8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ansible/roles/datalab/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,21 @@
day: "*"
month: "*"
job: cd /home/{{ ansible_ssh_user }}/datalab; docker compose exec api pipenv run invoke admin.create-backup --strategy-name daily-snapshots

- name: Add weekly backup task to crontab
ansible.builtin.cron:
name: Weekly snapshots
minute: "5"
hour: "5"
day: "7"
month: "*"
job: cd /home/{{ ansible_ssh_user }}/datalab; docker compose exec api pipenv run invoke admin.create-backup --strategy-name weekly-snapshots

- name: Add quarterly backup task to crontab
ansible.builtin.cron:
name: Quarterly snapshots
minute: "5"
hour: "2"
day: "1"
month: "1,4,7,10"
job: cd /home/{{ ansible_ssh_user }}/datalab; docker compose exec api pipenv run invoke admin.create-backup --strategy-name quarterly-snapshots

0 comments on commit ca795b8

Please sign in to comment.