-
Notifications
You must be signed in to change notification settings - Fork 69
Historical Artifacts
Song Zheng edited this page Dec 27, 2021
·
2 revisions
Due to house move, we need to migrate everything that is hosted locally to remote hosting. All of the big items will have to be moved.
Acquire a new DO server.-
Install Postgres on new machineCreate new user (CREATE USER john WITH PASSWORD '0aoAOUE';
)Create database (createdb c0d3_testing
)
Postgres should allow remote connections: Modify file in/etc/postgresql/12/main/postgresql.conf
.Restart Postgres:service postgresql restart
Postgres DB Dump c0d3 data (in old machine) -pg_dump c0d3_prod > ~/aug23-2020-c0d3_prod.sql
Xfer dump to new machine:scp aug23-2020-c0d3_prod.sql postgres@new-ip:~/
Postgres DB Import c0d3 db into new machine -psql c0d3_testing < aug23-2020-c0d3_prod.sql -U c0d3_admin --password
switch databases on vercelTesting - create new account on new c0d3.com and the old c0d3.com website did not reflect the new account, proving that the new c0d3.com is using the new database
Upgrade Mattermost (old server)DB Dump of mattermost chat serverInstall Mattermost (new server)DB Populate mattermost chat postgres to new dbSetup loadbalancer myProxy (old computer) to point to new serverMake sure old and new configurations matchesPlugin SetupMake sure access tokens (for chatroom updates) work
Install myProxy into new server.DNS mapping to new serverMigrate existing apps to new server
- Change user password
ALTER USER user_name WITH PASSWORD 'new_password';
- Create database
CREATE DATABASE dbname OWNER rolename;