Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utilise borg aussi pour les sauvegardes de la base de données
* Grosse réécriture de la documentation des sauvegardes * Vérification dans le script de restauration que les sauvegardes de la base de données s'étaient bien terminées
- Loading branch information
1 parent
5ae4b07
commit 5a6212a
Showing
5 changed files
with
227 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
#!/bin/sh | ||
|
||
# Get the list of full database backups, excluding the 60 more recent ones: | ||
db_full_backups_to_remove=`find /opt/sauvegarde/db -type d -name *-full | sort -nr | tail -n +61` | ||
|
||
for db_full_backup in $db_full_backups_to_remove | ||
do | ||
# We remove the 0315-full part to keep only the day | ||
db_daily_backups=`echo $db_full_backup | head -c -10` | ||
# We remove the full database backup, its incremental database backups and logs: | ||
echo "rm -r $db_daily_backups*" | ||
rm -r $db_daily_backups* | ||
done | ||
|
||
# We keep the data backups for last 60 days and remove the rest | ||
borg prune --keep-within 60d --list /opt/sauvegarde/data/ | ||
borg prune --keep-within 60d --list /opt/sauvegarde/db-borg/ |
Oops, something went wrong.