summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--topics/deploy/installation.gmi26
-rw-r--r--topics/systems/fallback.gmi31
-rw-r--r--topics/systems/mariadb/mariadb.gmi8
3 files changed, 49 insertions, 16 deletions
diff --git a/topics/deploy/installation.gmi b/topics/deploy/installation.gmi
index ef25079..2f5ebaf 100644
--- a/topics/deploy/installation.gmi
+++ b/topics/deploy/installation.gmi
@@ -127,14 +127,30 @@ startup script.
These are the steps you can take to install a fresh installation of
mariadb (which comes as part of the GNU Guix genenetwork2 install).
-As root configure the Guix profile
+As root configure the Guix profile, previously that was
-: . ~/opt/genenetwork2/etc/profile
+```
+. ~/opt/genenetwork2/etc/profile
+```
+
+But now we use the recommended
+
+```
+/usr/local/guix-profiles/guix-pull/bin/guix install mariadb borg -p /usr/local/guix-profiles/gn-latest
+. /usr/local/guix-profiles/gn-latest/etc/profile
+```
+
+Exctract the db (that takes a while too)
+
+```
+/usr/local/guix-profiles/gn-latest/bin/borg extract /export2/data/wrk/tux01/borg-tux01::borg-backup-mariadb-20240218-06:16-Sun --progress
+```
and run for example
-#+BEGIN_SRC bash
-adduser mariadb && addgroup mariadb
+```
+adduser mariadb
+addgroup mariadb (and add user to group)
mkdir -p /export2/mariadb/database
chown mariadb.mariadb -R /export2/mariadb/
mkdir -p /var/run/mysqld
@@ -144,7 +160,7 @@ mysql --version
mysql Ver 15.1 Distrib 10.1.45-MariaDB, for Linux (x86_64) using readline 5.1
mysql_install_db --user=mariadb --datadir=/export2/mariadb/database
mysqld -u mariadb --datadir=/exportdb/mariadb/database/mariadb --explicit_defaults_for_timestamp -P 12048"
-#+END_SRC
+```
If you want to run as root you may have to set
diff --git a/topics/systems/fallback.gmi b/topics/systems/fallback.gmi
index a529735..af6a9fc 100644
--- a/topics/systems/fallback.gmi
+++ b/topics/systems/fallback.gmi
@@ -1,6 +1,6 @@
# Fallbacks
-We will run fallback servers using Arun's Guix machine configuration.
+We will run fallback servers using Arun's Guix machine configuration. Outside the system container there are a few dependencies, particularly MariaDB and a number of file directories.
# Tags
@@ -11,14 +11,31 @@ We will run fallback servers using Arun's Guix machine configuration.
# Tasks
-Prepare backups to copy to the new machines:
+## Prepare backups to copy to the new machines
-* [.] Copy backup from tux01 to balg01
-* [.] Copy backup from tux01 to tux04
-* [ ] Copy backup from tux01 to tb
+Note that copying from the new machines is 10x faster.
+
+* [X] Copy backup from tux01 to balg01
+* [X] Copy backup from tux01 to tux04
+* [.] Copy backup from balg01 to tb
* [ ] Make sure CRON works on tux01 for balg01
-* [ ] Make sure CRON works on tux01 for tux04
+* [X] Make sure CRON works on tux01 for tux04
* [ ] Make sure CRON works on tb
* [ ] Create borg-borg on tux04
* [ ] Create borg-borg on tb
-* [ ] Add CRON `borg prune' on tux01
+* [ ] After borg-borg add CRON `borg prune' on tux01
+
+## Update guix
+
+* [X] Make sure guix is on a large partition (200Gb)
+* [X] Update guix in /usr/local/guix-profiles
+* [X] Disable default guix on Debian
+* [X] Reboot
+* [X] Update nftables
+
+Having issues with sdd drive.
+
+## Install mariadb
+
+* [X] Extract DB from backup on a fast partition
+* [ ] Install mariadb using guix
diff --git a/topics/systems/mariadb/mariadb.gmi b/topics/systems/mariadb/mariadb.gmi
index 4000482..ae0ab19 100644
--- a/topics/systems/mariadb/mariadb.gmi
+++ b/topics/systems/mariadb/mariadb.gmi
@@ -2,9 +2,9 @@
Here we capture some common actions
-To install Mariadb (as a container) see
+To install Mariadb (as a container) see below and
-=> setting-up-local-development-database.gmi
+=> topics/deploy/installation
# Tags
@@ -39,9 +39,9 @@ To get a log with some stuff filtered out try
mysql -p -u webqtlout db_webqtl -e "SHOW BINLOG EVENTS IN 'gn0-binary-log.000014';" -r -s |grep -v -e "Access\|GTID\|INSERT_ID\|COMMIT\|Temp\|lastlogin\|LITERA\|flush\|ROLLBACK"
```
-# Update MariaDB on penguin2 to the latest production database
+# Update MariaDB to the latest production database using borg recovery
-The MariaDB instance running on penguin2 needs to be periodically updated to the latest version of the database running on production. We do this by restoring backups of the production database stored on penguin2 into the penguin2 MariaDB database directory. Here's how.
+The MariaDB instance needs to be periodically updated to the latest version of the database running on production. We do this by restoring backups of the production database into MariaDB database directory. Here's how.
Backups are managed using Borg as the ibackup user. First, become the ibackup user.
```