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 .env
map.json map.json
*.log *.log
backups/
media/ media/
# Virtualenv # 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 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 * * * * * 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 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 # 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 00 4 * * * root cd /var/www/note_kfet && env/bin/python manage.py check_consistency --sum-all --check-all --mail
# TODO # TODO