From dad3bcdc2e1d6bf2f67f36c6bb87e342b3cdfcbb Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 6 Mar 2025 07:36:50 +0100 Subject: Fixing the database from backup --- topics/systems/backups-with-borg.gmi | 16 ++++++++++++++++ topics/systems/mariadb/mariadb.gmi | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'topics') diff --git a/topics/systems/backups-with-borg.gmi b/topics/systems/backups-with-borg.gmi index 5cdb2a3..d5bfd1b 100644 --- a/topics/systems/backups-with-borg.gmi +++ b/topics/systems/backups-with-borg.gmi @@ -200,3 +200,19 @@ Our production server runs databases and file stores that need to be backed up t Once backups work it is useful to copy them to a remote server, so when the machine stops functioning we have another chance at recovery. See => ./backup-drops.gmi + +# Recovery + +With tux04 we ran into a problem where all disks were getting corrupted(!) Probably due to the RAID controller, but we still need to figure that one out. + +Anyway, we have to assume the DB is corrupt. Files are corrupt AND the backups are corrupt. Borg backup has checksums which you can + +``` +borg check repo +``` + +it has a --repair switch which we needed to remove some faults in the backup itself: + +``` +borg check --repair repo +``` diff --git a/topics/systems/mariadb/mariadb.gmi b/topics/systems/mariadb/mariadb.gmi index ae0ab19..c575bf4 100644 --- a/topics/systems/mariadb/mariadb.gmi +++ b/topics/systems/mariadb/mariadb.gmi @@ -60,4 +60,7 @@ Stop the running mariadb-guix.service. Restore the latest backup archive and ove => https://www.borgbackup.org/ Borg => https://borgbackup.readthedocs.io/en/stable/ Borg documentation -# +# Uprade mariadb + +It is wise to upgrade mariadb once in a while. In a disaster recovery it is better to move forward in versions too. +Before upgrading make sure there is a decent backup of the current setup. -- cgit 1.4.1