Migrate from bakudankun/crowi
Overview
- Assuming to migrate from [Crowi docker image + bakudankun/crowi (opens new window)] to weseek/growi-docker-compose (opens new window).
- Migrate the following data.
- MongoDB container's data volume
- Uploaded file data from the App container
Preparation
- Have Crowi and GROWI contaienr running.
Hypothetically, each app container and data volume is called as below (change the name according to your environment).
Crowi GROWI App Container crowi_crowi_1 growi_app_1 App Container Data Volume crowi_crowi_data growi_growi_data MongoDB Container crowi_mongo_1 growi_mongo_1
Extract PASSWORD_SEED
If PASSWORD_SEED was set in bakudankun/crowi (opens new window) environment variables, extract and reuse the seed in GROWI.
If not, extract and reuse the auto-generated seed in the data volume.
(TBD)
Migrate DB
Backup DB data from Crowi with mongodump.
docker run -it --rm --link crowi_mongo_1 --network crowi_default --volume $(pwd):/backup mongo bash mongodump --host crowi_mongo_1 --db crowi --out /backup
Restore the backup to GROWI.
docker run -it --rm --link growi_mongo_1 --network growi_default --volume $(pwd):/backup mongo bash mongorestore -v --host growi_mongo_1 --db growi backup/crowi
[TBC] Unique Constraint might fail.
Set
PASSWORD_SEED
- In
docker-compose.yml
, setPASSWORD_SEED
to the extractedPASSWORD_SEED
.
- In
Restart GROWI.
Migrate Uploaded File Data
If files are to be uploaded to AWS S3, skipped the following steps.
- By default, bakudankun/crowi (opens new window) saves uploaded files to local file system(
FILE_UPLOAD=local
). - In order to save uploaded files to local file system set
FILE_UPLOAD=local
(indocker-compose.yml
).
Backup uploaded files from Crowi.
docker run --rm -v crowi_crowi_data:/data -v $(pwd):/backup bakudankun/crowi cp -rp /data /backup
Restore the backup to GROWI.
docker run --rm -v crowiplus_crowi_data:/data -v $(pwd):/backup growi_app_1 cp -rp /backup/uploads /data/