mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Updated Export Docker Mongo Data (markdown)
parent
bffa427164
commit
64eeccf299
1 changed files with 3 additions and 3 deletions
|
|
@ -112,13 +112,13 @@ docker cp wekan-db:/dump .
|
|||
docker cp dump wekan-db:/data/
|
||||
docker exec -it wekan-db bash
|
||||
cd /data
|
||||
mongorestore --drop --db wekan /data/dump/wekan/
|
||||
mongorestore --drop --noIndexRestore --db wekan /data/dump/wekan/
|
||||
exit
|
||||
```
|
||||
|
||||
That dbname can be for example wekan:
|
||||
```
|
||||
mongorestore --drop --db wekan /data/dump/wekan/
|
||||
mongorestore --drop --noIndexRestore --db wekan /data/dump/wekan/
|
||||
```
|
||||
|
||||
9b) Or restore to another mongo database, in different port:
|
||||
|
|
@ -187,7 +187,7 @@ if [ $? = 0 ]; then
|
|||
tar -zx -f $1 -C $SCRIPTPATH/backups/$DATE-restore
|
||||
docker exec -t wekan-db bash -c "rm -fr /restore ; mkdir /restore"
|
||||
docker cp $SCRIPTPATH/backups/$DATE-restore/wekan wekan-db:/restore
|
||||
docker exec -t wekan-db bash -c "mongorestore --drop --db wekan /restore/wekan/"
|
||||
docker exec -t wekan-db bash -c "mongorestore --drop --noIndexRestore --db wekan /restore/wekan/"
|
||||
fi
|
||||
else
|
||||
echo "wekan-db container is not running"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue