diff options
author | Pjotr Prins | 2021-10-25 17:39:13 +0200 |
---|---|---|
committer | Pjotr Prins | 2021-10-25 17:39:13 +0200 |
commit | 60405866bf37d041ae7e0ceec6e40ce25d8f6606 (patch) | |
tree | 2cfa83d26c1e025f95e0f56efdfd081c2fcabece | |
parent | b42fb26db1b90d60f3b1d3e04679c9dc3bee885d (diff) | |
download | gn-gemtext-60405866bf37d041ae7e0ceec6e40ce25d8f6606.tar.gz |
Fixes
-rw-r--r-- | tasks/dana.gmi | 2 | ||||
-rw-r--r-- | topics/systems/tux02-production.gmi | 26 |
2 files changed, 25 insertions, 3 deletions
diff --git a/tasks/dana.gmi b/tasks/dana.gmi index 8abf641..cb8ac2f 100644 --- a/tasks/dana.gmi +++ b/tasks/dana.gmi @@ -6,7 +6,7 @@ ## Tasks -* [ ] Tux02 https firewalling +* [X] Tux02 https firewalling * [ ] Octopus 10Gbs switch + cables * [ ] 4TB SSDs for Tux01 and Tux02 => ../topics/systems/decommission-machines.gmi diff --git a/topics/systems/tux02-production.gmi b/topics/systems/tux02-production.gmi index 435fe49..3a0a3c7 100644 --- a/topics/systems/tux02-production.gmi +++ b/topics/systems/tux02-production.gmi @@ -22,18 +22,40 @@ We are going to move production to tux02 - tux01 will be the staging machine. Th * [X] add Genenetwork3 service env FLASK_APP="main.py" flask run --port=8087 * [X] add proxy -* [ ] setup https and letsencrypt +* [ ] set up databases +* [ ] set up https and letsencrypt * [X] set up firewalling * [ ] set up systemd * [ ] setup logrotate for production log files * [ ] run git automatically on /etc and backup without passwords * [ ] add borg backups +* [ ] create check list for manual testing * [ ] look at performance ## Info -Restoring a database from backup (under an hour) +We have a protocol for updating GN2 on Tux02. + +### Restore database from backup + +Databases no longer get copied. We only restore from backup. First because these are reproducible [installs]. Second because the backup should be in a sane state(!). + +Restoring a database from backup (about an hour) ``` root@tux02:/export3/backup/tux01/borg# borg extract borg-tux01::borg-backup-mariadb-20211024-03:09-Sun --progress ``` + +Next move the dir to fast storage. + +#### Symlink /var/lib/mysql + +The database is symlinked. You can point that to the recovered backup. Restart the DB and run mysql_upgrade followed by our tests. E.g. + +``` +systemctl stop mariadb +ln -s /export2/mysql/borg-backup-mariadb-20211024-03\:09-Sun /var/lib/mysql +systemctl start mariadb +/usr/local/guix-profiles/gn-latest-20211021/bin/mysql_upgrade -u webqtlout -pwebqtlout +/export/backup/scripts/tux02/system_check.sh +``` |