Maniphest T93515

Migrate to PostgreSQL
Closed, ResolvedTO DO

Assigned To
Anna Sirota (railla)
Authored By
Anna Sirota (railla)
Nov 30 2021, 3:34 PM
Tags
  • Blender Development Fund
Subscribers
Anna Sirota (railla)
Paul Larson (GeorgiaPacific)

Description

Same as T93212: [Chore] Migrate to PostgreSQL, but pgloader must be run from inside DevFund's container.

Recap of the migration

copy latest pgloader files to make them available in the container
rsync -r /opt/pgloader /var/www/blender-fund/settings
switch to maintenance
#! make sure that latest production is deployed and SUPPORTS PSQL
#! add maintenance mode to Apache config

# show a maintenance page
docker exec -it blender-fund bash
apachectl configtest   # apachectl -t
apachectl -k graceful
touch /var/www/html/maintenance_on

# stop cron
sudo systemctl stop cron
backup everything
sudo /bin/bash /var/www/blender-fund/backup.sh
sudo -Hu dbbackup /var/www/sintel-blender-org-management/postgresql_backup.sh
copy and switch
#! copy the data
docker exec -it blender-fund bash
cd /var/www/settings/pgloader/
bash copy_mysql_fund_to_psql.sh 2>&1 | tee /var/log/pgloader001_fund.log

#! change default database
vim /var/www/blender-fund/settings/blender_fund_settings.py
bring everything back
#! hide a maintenance page
docker exec -it blender-fund bash
apachectl configtest
rm /var/www/html/maintenance_on

#! start cron
sudo systemctl start cron

Related Objects

Mentioned In
rBDF3631ce1b1dbb: [T93515] Remove MySQL support and dependencies
rBDFe8512bc7af88: [T93515] Remove MySQL support and dependencies
rBDFb67aa8cad6ae: [T93515] Add support for PostgreSQL and a toggleable maintenance mode
rBDF83309e406066: [T93515] Notes about DB setup with PostgreSQL
rBDF2a0d85ed572e: [T93515] Default DATABASES settings to use PostgreSQL
Mentioned Here
T93212: [Chore] Migrate to PostgreSQL

Event Timeline

Anna Sirota (railla) changed the task status from Needs Triage to Confirmed.Nov 30 2021, 3:34 PM
Anna Sirota (railla) created this task.
Anna Sirota (railla) mentioned this in rBDF2a0d85ed572e: [T93515] Default DATABASES settings to use PostgreSQL.Nov 30 2021, 4:20 PM
Anna Sirota (railla) mentioned this in rBDF83309e406066: [T93515] Notes about DB setup with PostgreSQL.
Anna Sirota (railla) updated the task description.Nov 30 2021, 4:25 PM
Paul Larson (GeorgiaPacific) added a subscriber: Paul Larson (GeorgiaPacific).Nov 30 2021, 7:01 PM
Anna Sirota (railla) mentioned this in rBDFb67aa8cad6ae: [T93515] Add support for PostgreSQL and a toggleable maintenance mode.Dec 7 2021, 10:03 AM
Anna Sirota (railla) updated the task description.Dec 7 2021, 10:53 AM
Anna Sirota (railla) mentioned this in rBDFe8512bc7af88: [T93515] Remove MySQL support and dependencies.Dec 7 2021, 11:02 AM
Anna Sirota (railla) mentioned this in rBDF3631ce1b1dbb: [T93515] Remove MySQL support and dependencies.Dec 7 2021, 11:12 AM
Anna Sirota (railla) closed this task as Resolved.Dec 7 2021, 11:35 AM