💾 Archived View for thebird.nl › gn-gemtext-threads › issues › systems › tux02-production.gmi captured on 2023-03-20 at 17:56:26. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Tux02 Production

We are going to move production to tux02 - tux01 will be the staging machine. This machine is aimed to be rock solid. The idea is to have 4-6 times a year upgrades. Also we should be able to roll back on an upgrade and be able to create time machines.

Tags

Tasks

env FLASK_APP="main.py" flask run --port=8087

Info

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