Answer the question
In order to leave comments, you need to log in
Is it possible to backup mongodb directly to a remote host?
For example, if you need to backup the database in mysql and upload it to a remote host, there will be such a command
mysqldump <DATABASE_NAME> | gzip -c | ssh [email protected] "cat > /path/to/some-file.sql.gz"
Answer the question
In order to leave comments, you need to log in
instead of --out, specify --archive, then all collections will be added to one file.
If you do not specify the name of the archive, it will just go to stdout, where you catch it through | ssh
mongodump --archive | gzip -c | ssh [email protected] "cat > /path/to/dump.gz"
ps You can also just connect a remote computer via nfs or sshfs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question