Ajout de scripts de systemd pour les sauvegardes bd, et modif paramètres par defaut des rotations.

This commit is contained in:
Emmanuel Viennet 2023-10-18 13:16:59 +02:00
parent 91f4ee9999
commit d5cc5c5c2f
3 changed files with 38 additions and 4 deletions

View File

@ -11,10 +11,10 @@
# Must contain backup.monthly backup.weekly backup.daily backup.hourly folders # Must contain backup.monthly backup.weekly backup.daily backup.hourly folders
storage="$1" storage="$1"
NB_HOURLY=48 # nb de sauvegardes horaires a conserver (1 par heure) NB_HOURLY=24 # nb de sauvegardes horaires a conserver (1 par heure)
NB_DAILY=40 # nb de sauvegardes quotidiennes a conserver NB_DAILY=7 # nb de sauvegardes quotidiennes a conserver
NB_WEEKLY=30 # nombre de sauvegardes hebdomadaires a conserver NB_WEEKLY=4 # nombre de sauvegardes hebdomadaires a conserver
NB_MONTHLY=200 # nombre de sauvegardes mensuelles a conserver NB_MONTHLY=12 # nombre de sauvegardes mensuelles a conserver
# Work in backup directory: # Work in backup directory:
cd $storage cd $storage

View File

@ -0,0 +1,18 @@
#
# Systemd service to backup ScoDoc postgresql database
#
# Put this file in /etc/systemd/system, along with scodoc-updater.timer
# and then run
# systemctl enable scodoc-updater.timer
# systemctl start scodoc-updater.timer
#
# E. Viennet jun 2019
#
[Unit]
Description=Update ScoDoc Software
[Service]
Type=oneshot
ExecStart=/opt/scodoc/tools/backup_db9 SCODOC

View File

@ -0,0 +1,16 @@
#
# Systemd service to upgrade ScoDoc
#
# Put this file in /etc/systemd/system, along with scodoc-updater.service
#
# E. Viennet oct 2023
#
[Unit]
Description=Dump ScoDoc database each hour (*:07)
[Timer]
OnCalendar=*-*-* *:07:00
[Install]
WantedBy=timers.target