stuff
This commit is contained in:
parent
a30b023cda
commit
63a900dd13
2 changed files with 22 additions and 1 deletions
|
@ -156,3 +156,16 @@
|
|||
dest: /etc/forgejo/app.ini
|
||||
notify:
|
||||
- Restart forgejo
|
||||
|
||||
#Backup
|
||||
- name: backup script
|
||||
ansible.builtin.template:
|
||||
src: backup.sh
|
||||
dest: /usr/local/bin/backup.sh
|
||||
mode: '0770'
|
||||
- name: Backup
|
||||
ansible.builtin.cron:
|
||||
name: "backup"
|
||||
minute: "0"
|
||||
hour: "3"
|
||||
job: "/usr/local/bin/backup.sh > /dev/null"
|
8
debian12-forgejo/templates/backup.sh
Normal file
8
debian12-forgejo/templates/backup.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
set +e
|
||||
d=$(date +%Y-%m-%d)
|
||||
cd /tmp
|
||||
sudo -u git /usr/local/bin/forgejo dump --config /etc/forgejo/app.ini --file /tmp/gitea-dump.zip
|
||||
/usr/local/bin/b2 upload-file --noProgress --quiet kekskurse-backups /tmp/gitea-dump.zip git.keks.cloud/forgejo/$d.zip
|
||||
rm /tmp/gitea-dump
|
||||
curl "{{ monitorurl }}"
|
Loading…
Reference in a new issue