diff options
Diffstat (limited to 'topics')
-rw-r--r-- | topics/systems/tux02-production.gmi | 26 |
1 files changed, 24 insertions, 2 deletions
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 +``` |