1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-22 15:32:22 +00:00

Backup database daily

This commit is contained in:
Yohann D'ANELLO 2020-08-06 09:27:33 +02:00
parent fd7e314ca3
commit 315af75c45
3 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View File

@ -39,6 +39,7 @@ secrets.py
.env
map.json
*.log
backups/
media/
# Virtualenv

@ -1 +1 @@
Subproject commit a66ce1ad8520b792e6fdcbc6c9196cb3542565c1
Subproject commit b311d7d51b3777b6cfc60e100a61bf563dee51ec

View File

@ -6,6 +6,8 @@
* * * * * root cd /var/www/note_kfet && env/bin/python manage.py send_mail >> /var/www/note_kfet/cron_mail.log
* * * * * root cd /var/www/note_kfet && env/bin/python manage.py retry_deferred >> /var/www/note_kfet/cron_mail_deferred.log
00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log 7 >> /var/www/note_kfet/cron_mail_purge.log
# Faire une sauvegarde de la base de données
00 2 * * * root cd /var/www/note_kfet && apps/scripts/shell/backup_db
# Vérifier la cohérence de la base et mailer en cas de problème
00 4 * * * root cd /var/www/note_kfet && env/bin/python manage.py check_consistency --sum-all --check-all --mail
# TODO