Compare commits
9 Commits
aff169fd40
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 0196223ee1 | |||
| 2aab34b8ce | |||
| de7f45083a | |||
| f3f05cd014 | |||
| 3373ae8f08 | |||
| ff1e2e6e4a | |||
| b9bbbe7d55 | |||
| b839038784 | |||
| 9eab1fc5d3 |
@@ -9,6 +9,10 @@ backends:
|
|||||||
type: local
|
type: local
|
||||||
path: /mnt/hdd/autorestic.backup
|
path: /mnt/hdd/autorestic.backup
|
||||||
|
|
||||||
|
oiseauroch:
|
||||||
|
type: sftp
|
||||||
|
path: backup_oiseauroch:/backup_sagouin/backups
|
||||||
|
|
||||||
glacier:
|
glacier:
|
||||||
type: rclone
|
type: rclone
|
||||||
path: scaleway-glacier:/autorestic-sagou.in
|
path: scaleway-glacier:/autorestic-sagou.in
|
||||||
@@ -18,6 +22,7 @@ locations:
|
|||||||
from: /mnt/ssd/backup-working/db-dumps
|
from: /mnt/ssd/backup-working/db-dumps
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
hooks:
|
hooks:
|
||||||
before:
|
before:
|
||||||
@@ -27,11 +32,11 @@ locations:
|
|||||||
configs:
|
configs:
|
||||||
from:
|
from:
|
||||||
- /etc
|
- /etc
|
||||||
- /home/yunohost.conf
|
|
||||||
- /var/spool/cron/crontabs/
|
- /var/spool/cron/crontabs/
|
||||||
- /opt/yunohost/wireguard/db/
|
- /opt/yunohost/wireguard/db/
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
- glacier
|
- glacier
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
options:
|
options:
|
||||||
@@ -43,6 +48,7 @@ locations:
|
|||||||
- /var/www/bludit/bl-content/pages/
|
- /var/www/bludit/bl-content/pages/
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
- glacier
|
- glacier
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
options:
|
options:
|
||||||
@@ -53,20 +59,30 @@ locations:
|
|||||||
from: /mnt/ssd/backup-working/gitea
|
from: /mnt/ssd/backup-working/gitea
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
- glacier
|
- glacier
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
hooks:
|
hooks:
|
||||||
before:
|
before:
|
||||||
- sudo -u gitea /opt/gitea/gitea dump -f - > /mnt/ssd/backup-working/gitea/gitea.zip
|
- sudo -u gitea /var/www/gitea/gitea dump -f - > /mnt/ssd/backup-working/gitea/gitea.zip
|
||||||
|
|
||||||
home:
|
home:
|
||||||
from:
|
from:
|
||||||
|
- /home/agathe
|
||||||
- /home/antoine
|
- /home/antoine
|
||||||
- /home/baptiste
|
- /home/baptiste
|
||||||
- /home/con
|
- /home/con
|
||||||
|
- /home/josephine
|
||||||
|
- /home/mariage
|
||||||
|
- /home/marieclaire
|
||||||
|
- /home/oiseauroch
|
||||||
|
- /home/raphaeldutrieux
|
||||||
- /home/roxane
|
- /home/roxane
|
||||||
|
- /home/shrek
|
||||||
|
- /home/thomas
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
- glacier
|
- glacier
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
|
|
||||||
@@ -82,6 +98,7 @@ locations:
|
|||||||
- '**/appdata_ocfigi57i0ri'
|
- '**/appdata_ocfigi57i0ri'
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
- glacier
|
- glacier
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
#hooks:
|
#hooks:
|
||||||
@@ -90,15 +107,14 @@ locations:
|
|||||||
#after:
|
#after:
|
||||||
#- sudo -u www-data php occ maintenance:mode --off
|
#- sudo -u www-data php occ maintenance:mode --off
|
||||||
|
|
||||||
dokuwiki:
|
bookstack:
|
||||||
from:
|
from:
|
||||||
- /var/www/dokuwiki/conf
|
- /var/www/bookstack/.env
|
||||||
- /var/www/dokuwiki/data/pages
|
- /var/www/bookstack/public/uploads
|
||||||
- /var/www/dokuwiki/data/meta
|
- /var/www/bookstack/storage/uploads
|
||||||
- /var/www/dokuwiki/data/media
|
|
||||||
- /var/www/dokuwiki/data/media_meta
|
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
- glacier
|
- glacier
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
|
|
||||||
@@ -107,6 +123,7 @@ locations:
|
|||||||
- /var/mail
|
- /var/mail
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
- glacier
|
- glacier
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
|
|
||||||
@@ -120,12 +137,6 @@ locations:
|
|||||||
- '/home/yunohost.multimedia/share'
|
- '/home/yunohost.multimedia/share'
|
||||||
to:
|
to:
|
||||||
- hdd
|
- hdd
|
||||||
|
- oiseauroch
|
||||||
- glacier
|
- glacier
|
||||||
cron: '0 3 * * 4' # At 3:00am on Thursday
|
cron: '0 3 * * 4' # At 3:00am on Thursday
|
||||||
|
|
||||||
shared_multimedia:
|
|
||||||
from:
|
|
||||||
- /home/yunohost.multimedia/share
|
|
||||||
to:
|
|
||||||
- hdd
|
|
||||||
cron: '0 3 1 * *' # At 3:00am on the 1st
|
|
||||||
|
|||||||
10
runcron
10
runcron
@@ -1,13 +1,13 @@
|
|||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
autorestic -c /etc/autorestic/.autorestic.yml --ci cron --lean 1> /tmp/autorestic.log 2>/tmp/autorestic-err.log
|
autorestic -c /etc/autorestic/.autorestic.yml --ci cron 1> /tmp/autorestic.log 2>/tmp/autorestic-err.log
|
||||||
ret=$?
|
ret=$?
|
||||||
|
|
||||||
if [ "$ret" != 0 ] || [ -s /tmp/autorestic-err.log ]
|
if [[ "$ret" != 0 || -s /tmp/autorestic-err.log ]]
|
||||||
then
|
then
|
||||||
cat <(echo -e "Command failed with return code $ret and log:") /tmp/autorestic-err.log | mail -s "Autorestic Backup: Failed" root
|
cat <(echo "Command failed with return code $ret and log:") /tmp/autorestic-err.log <(echo "===============") /tmp/autorestic.log | mail -s "Autorestic Backup: Failed" root
|
||||||
else
|
else
|
||||||
if [ $(wc -l < /tmp/autorestic.log) -gt 3 ]
|
if [[ $(wc -l < /tmp/autorestic.log) -gt 15 ]]
|
||||||
then
|
then
|
||||||
cat <(echo -e "Command successfully finished with the following log:") /tmp/autorestic.log | mail -s "Autorestic Backup: Success" root
|
cat <(echo -e "Command successfully finished with the following log:") /tmp/autorestic-err.log <(echo "===============") /tmp/autorestic.log | mail -s "Autorestic Backup: Success" root
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
autorestic -c /etc/autorestic/.autorestic.yml --ci forget --all --prune 1> /tmp/autorestic-prune.log 2>/tmp/autorestic-prune-err.log
|
autorestic -c /etc/autorestic/.autorestic.yml --ci forget --all --prune 1> /tmp/autorestic-prune.log 2>/tmp/autorestic-prune-err.log
|
||||||
ret=$?
|
ret=$?
|
||||||
|
|
||||||
if [ "$ret" != 0 ] || [ -s /tmp/autorestic-prune-err.log ]
|
if [[ "$ret" != 0 || -s /tmp/autorestic-prune-err.log ]]
|
||||||
then
|
then
|
||||||
cat <(echo -e "Command failed with return code $ret and log:") /tmp/autorestic-prune-err.log | mail -s "Autorestic Pruning: Failed" root
|
cat <(echo "Command failed with return code $ret and log:") /tmp/autorestic-prune-err.log <(echo "===============") /tmp/autorestic-prune.log | mail -s "Autorestic Pruning: Failed" root
|
||||||
else
|
else
|
||||||
cat <(echo -e "Command successfully finished with the following log:") /tmp/autorestic-prune.log | mail -s "Autorestic Pruning: Success" root
|
cat <(echo "Command successfully finished with the following log:") /tmp/autorestic-prune.log | mail -s "Autorestic Pruning: Success" root
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user