Setup gitea-backup crontab

This commit is contained in:
flyingscorpio@clevo 2022-09-28 22:03:57 +02:00
parent 1dfe585364
commit a12b50a01f
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1 @@
0 5 * * * USER=git /home/git/gitea_backup.sh backup >/home/git/gitea_backup.log 2>/home/git/gitea_backup.err && USER=git /home/git/gitea_backup.sh prune 2 >>/home/git/gitea_backup.log 2>>/home/git/gitea_backup.err

View file

@ -201,4 +201,9 @@
cmd: "/home/git/gitea_backup.sh restore /home/git/gitea-dumps/gitea-dump-{{ today }}.zip"
creates: /home/git/gitea-repositories # when this dir exists, the command won't run, so we don't overwrite existing repos
# TODO: setup gitea_backup cron
- name: Setup gitea-backup crontab
become: true
copy:
src: gitea-backup.cron
dest: /etc/cron.d/gitea-backup
mode: 0644