Skip to content

Import production DB

Note: Use this only when the database tables is not a part of db dump.

For more info, take a look at EXCLUDED_TABLES_FOR_DEV

Note: Use this with caution (this is production data!)

  1. SSH into production-web
  2. Dump the table using the following command:
bash
mysqldump --single-transaction \
          --default-character-set=utf8mb4 \
          -u forge \
          forge \
          {table-names-separated-by-comma} \
          > \
          {file-path}
  1. Download the dump file
bash
scp forge@interaction-design.org:{file-path} {local-file-path}
  1. Copy the file to your db docker container
bash
docker cp {local-file-path} {container-hash}:{container-file-path}
  1. Import the dump
bash
docker compose exec db mysql -u {root-username} -p{root-password} {db-name} < {container-file-path}