Domanda

How to perform mongo DB dump and restore in a single command, by providing source and sink DB and collection name separately?

I understand we can do mongodump and then mongorestore but if I need to this on an intermediate machine, this will mean I will need to wait for mongodump to complete before I can start mongorestore manually again. Is there a way to do it in a single command?

È stato utile?

Soluzione

You mean like this: mongodump --archive --db=test --port=27017 | mongorestore --archive --port=27018

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a dba.stackexchange
scroll top