Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
Gethi edited this page Jan 7, 2021 · 12 revisions

GET SSL

https://gist.github.com/sbenfares/68c7cf348dcb114d06f890d780558388

Import a collection

scp -rC etablissements.json [email protected]:etablissements.json
sudo cp etablissements.json /opt/tables-correspondances/data/mongodb/backups/etablissements.json
sudo bash tools/backup-mongodb.sh 
sudo docker exec tables_correspondances_mongodb bash -c "mongoimport  --uri mongodb://localhost:27017/tables-correspondances --file=/data/backups/etablissements.json --collection=etablissements --jsonArray"

Restore

cp -R backup /opt/tables_correspondances/data/mongodb/backups/20200107-Backup sudo docker exec tables_correspondances_mongodb bash -c "mongorestore --gzip --drop --uri mongodb://localhost:27017/tables_correspondances /data/backups/opco-20201229/codeencodesidccs.bson.gz --collection=codeencodesidccs --db=tables-correspondances"

Clone this wiki locally