forked from wekan/wekan
-
Notifications
You must be signed in to change notification settings - Fork 0
Export Docker Mongo Data
Lauri Ojansivu edited this page Feb 5, 2017
·
37 revisions
- You can run Wekan on Docker locally like this on http://localhost:8080/ (or other port it you change 8080 in script):
docker run -d --restart=always --name wekan-db mongo:3.2.11
docker run -d --restart=always --name wekan --link "wekan-db:db" -e "MONGO_URL=mongodb://db" -e "ROOT_URL=http://localhost:8080" -p 8080:80 mquandalle/wekan:latest
Mongo 3.2.11 used because of bug in 3.4.1:
https://github.com/wefork/wekan/issues/58
- List docker containers, your ID:s will be different:
docker ps
Result:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1234wekanid mquandalle/wekan "/bin/sh -c 'bash $ME" About an hour ago Up 46 minutes 0.0.0.0:8080->80/tcp wekan
4321mongoid mongo "/entrypoint.sh mongo" About an hour ago Up 46 minutes 27017/tcp wekan-db
- Enter inside mongo container:
docker exec -it wekan-db bash
- OPTIONAL: If you want to browse data inside container, you can use CLI commands like listed at
https://docs.mongodb.com/manual/reference/mongo-shell/
like this:
> mongo <==== START MONGO CLI
MongoDB shell version: 3.2.7
connecting to: test
Server has startup warnings:
2016-06-25T11:39:55.913+0000 I CONTROL [initandlisten]
2016-06-25T11:39:55.913+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-06-25T11:39:55.913+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-06-25T11:39:55.913+0000 I CONTROL [initandlisten]
2016-06-25T11:39:55.913+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-06-25T11:39:55.913+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-06-25T11:39:55.913+0000 I CONTROL [initandlisten]
> show dbs <=== SHOW DATABASES
admin 0.034GB
local 0.000GB
> use admin <=== CHANGE TO USE ADMIN DATABASE
switched to db admin
> show collections <=== SHOWS TABLES
activities
boards
card_comments
cards
cfs._tempstore.chunks
cfs.attachments.filerecord
cfs_gridfs._tempstore.chunks
cfs_gridfs._tempstore.files
cfs_gridfs.attachments.chunks
cfs_gridfs.attachments.files
esCounts
lists
meteor-migrations
meteor_accounts_loginServiceConfiguration
presences
users
> db.users.find() <=== LISTS ALL USERS
(list of all users here)
> exit <=== EXIT MONGO CLI
- Go to /data directory:
cd /data
- Backup database to files inside container to directory /data/dump, only Wekan database with name "admin" is included, not local:
mongodump
- Exit from inside of container:
exit
- Copy backup directory /data/dump from inside of container to current directory:
docker cp wekan-db:/data/dump .
9a) Restore backup later:
docker cp dump wekan-db:/data/
docker exec -it wekan-db bash
cd /data
mongorestore --drop
exit
9b) Or restore to another mongo database, in different port:
mongorestore --port 11235
- If you would like to browse mongo database that is outside of docker in GUI, you could try some admin interface:
https://docs.mongodb.com/ecosystem/tools/administration-interfaces/
- If you sometime after backups want to remove wekan containers to reinstall them, do:
docker stop wekan wekan-db
docker rm wekan wekan-db
Then you can reinstall from step 1.
- If latest version of Wekan Docker image is broken, here's how to run older version:
- About
- No UI major redesign
- Test Edge
- FAQ
- IRC FAQ - answers to questions asked at IRC
- Roadmap - board at Wekan demo
- Team
- Press
- Blog
- NOT related to Wekan
- Wekan vs Trello vs Restyaboard
- Features
- Custom Logo
- Gantt Chart
- Admin: Impersonate user
- Emoji etc syntax
- Numbered text syntax
- Time Tracking
- Subtasks <== Has fix
- Templates
- Archive and Delete
- Adding Users
- LDAP
- Keycloak
- Google login
- Azure
- OAuth2, Auth0, GitLab, RocketChat
- Oracle OIM on premise using OAuth2
- ADFS 4.0 using OAuth2 and OpenID
- Nextcloud
- CAS Please test
- SAML Please test
- IFTTT
- Custom Fields
- Due Date
- Forgot Password
- Requirements
- Translations
- Roadmap
- Fix Export board menu not visible on some boards
- Integrations
- RAM usage
- Demo
- Swimlane Documentation
- Wekan Markdown
- Download Wekan for various Platforms: Supported by xet7, Operating Systems, NAS, Cloud
- Example: New card with Python3 and REST API
- Python client to REST API
- Java
- Wekan Sandstorm cards to CSV using Python
- Excel and VBA
- Global Webhook
- Limiting Webhook data
- Receiving Webhooks
- Outgoing Webhook to Discord/Slack/RocketChat/Riot
- Outgoing Webhook to NodeRed
- Outgoing Webhook to PowerShell
- Security: Webhook and CA
- Outgoing Webhooks Data
- Outgoing Webhooks and Let's Encrypt
- Outgoing Webhooks Original Pull Request, multiple Webhooks, more parameters and response order