Skip to content

Historical Artifacts

Song Zheng edited this page Dec 27, 2021 · 2 revisions

8/23/2020 - Localhost to Digital Ocean

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.

c0d3.com

  • Acquire a new DO server.
  • Install Postgres on new machine
    • Create 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 vercel
  • Testing - 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

chat.c0d3.com

  • Upgrade Mattermost (old server)
  • DB Dump of mattermost chat server
  • Install Mattermost (new server)
  • DB Populate mattermost chat postgres to new db
  • Setup loadbalancer myProxy (old computer) to point to new server
  • Make sure old and new configurations matches
  • Plugin Setup
  • Make sure access tokens (for chatroom updates) work

Other apps

  • Install myProxy into new server.
  • DNS mapping to new server
  • Migrate existing apps to new server

Helpful commands

Postgres

  • Change user password ALTER USER user_name WITH PASSWORD 'new_password';
  • Create database CREATE DATABASE dbname OWNER rolename;
Clone this wiki locally