1
0

Add backups for gitea

This commit is contained in:
2025-05-03 16:56:22 +03:00
parent 9a3e646d8a
commit 155d065dd0
7 changed files with 195 additions and 108 deletions

View File

@ -3,6 +3,12 @@
set -eu
set -o pipefail
echo "Backup: perform gitea backup"
su --login gitea -c '/home/gitea/gitea-dump.sh'
mkdir -p {{ backup_directory }}/gitea
mv /home/gitea/backups/* {{ backup_directory }}/gitea
echo "Backup: perform backup with gobackup"
gobackup perform --config={{ backup_gobackup_config }}
@ -21,4 +27,8 @@ curl -s -X POST 'https://api.telegram.org/bot{{ notifications_tg_bot_token }}/se
-d 'parse_mode=HTML' \
-d 'text=<b>{{ notifications_name }}</b>: бекап успешно завершен!'
echo -e "\nRemove old files"
keep-files.py {{ backup_directory }}/gitea --keep 2
echo -e "\nBackup: done"