File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 33mysql.sql
44kratos.sql
55temp.sql
6- dump- * .zip
6+ dump- *
77
88# Local enmeshed connector
99/enmeshed /logs
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ Set up the Gsutil. You need to authenticate and may use a key of the appropriate
5050### DB Migration Cronjob
5151
5252Add a crontab in host with the following command (replace the missing values) for 3 am.
53+
5354```
5455docker run --rm --name db-migration --env-file PATH/TO/.env -e SLACK_CHANNEL="PLACEHOLDER" -e SLACK_TOKEN="PLACEHOLDER" --network staging-network ghcr.io/serlo/api.serlo.org/db-migration:PLACEHOLDER
5556```
@@ -64,15 +65,25 @@ Set up the Gsutil. You need the credentials of a service account in order that t
6465
65661 . Go to GC Console -> IAM -> Service Accounts -> choose the dbreader account -> generate a new one
66672 . Put the key in a file ` production_service_account_key.json ` in the home directory
67- 3 . Set cron tab to run the dbsetup script every night at 1 am.
68+ 3 . Set cron tab to run the dbdump script every night at 1 am.
6869
6970### Rocket Chat DB Dump
7071
71- You need to set up a cronjob for doing the db dump of rocket chat every night
72+ In your first deployment, you will need to import the existing data into mongodb container.
73+
74+ 1 . Download the dump from the corresponding bucket in the GC project 'production'
75+ 2 . Run
76+ ```
77+ $ docker compose cp dump-????.gz mongodb:/dump.gz
78+ $ docker compose exec mongodb mongorestore --archive=dump.gz --gzip
79+ ```
80+
81+ Now, set up a crontab to upload a backup of the data to the bucket at midnight, using the script ` mongodbdump.sh ` .
7282
7383### DB Migration
7484
7585In case of db migration, run the following command in host (replace the missing values).
86+
7687```
7788docker run --rm --name db-migration --env-file PATH/TO/.env -e SLACK_CHANNEL="PLACEHOLDER" -e SLACK_TOKEN="PLACEHOLDER" --network production-network ghcr.io/serlo/api.serlo.org/db-migration:PLACEHOLDER
78- ```
89+ ```
You can’t perform that action at this time.
0 commit comments