forked from ScoDoc/ScoDoc
Ajout de scripts de systemd pour les sauvegardes bd, et modif paramètres par defaut des rotations.
This commit is contained in:
parent
91f4ee9999
commit
d5cc5c5c2f
@ -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
|
||||||
|
18
tools/etc/scodoc-backup-db.service
Normal file
18
tools/etc/scodoc-backup-db.service
Normal 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
|
||||||
|
|
16
tools/etc/scodoc-backup-db.timer
Normal file
16
tools/etc/scodoc-backup-db.timer
Normal 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
|
Loading…
Reference in New Issue
Block a user