1.5.0-database-migration • Published 4 years ago

restructuration v1.5.0-database-migration

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Restructuration

This file contains all required information to execute the restructuration

Mongo commands

Dump dev.anipo.lu database: creates a dump folder within current working directory

mongodump --uri="mongodb://AreTl845devanipo:XrTAsZeDF5qhpoa21wiaq@35.195.67.241:27017"

Remove the local database to inject the new one just after

  • Connect to mongo
  • Use the anipo db
  • Drop the database

Replace local database "anipo" with the one from dev.anipo.lu, dumped just before

mongorestore  ./dump/

Use the mongoRestore command to create a dedicated database on which developments will be executed

  • Copy the dump folder to a new one, and rename the anipo folder to a new name
  • Use the mongorestore command, used previously

nb: the copyDatabase mongo command is deprecated

cp -r ./dump/ ./dumpRestructuration
mv ./dumpRestructuration/anipo ./dumpRestructuration/restructuration
mongorestore ./dumpRestructuration