简体   繁体   中英

Mongorestore to AWS EC2

I just made a migration from a linode server to amazon EC2. For my linode, I was able to restore my database image using the following syntax:

./mongorestore -h [IP of server] -d [databaseName] -u [username] -p [password] [local directory of backup image]

However, following this syntax using AWS EC2 doesn't seem to work. Any suggestions as to what to do?

Thanks!

Not sure what error you're getting, but it might be the syntax that's causing the issue. The example in the docs doesn't have the ./ in front of mongorestore . So your command should look like this:

mongorestore -h [IP of server] -d [databaseName] -u [username] -p [password] [local directory of backup image]

Docs for v4.4: https://docs.mongodb.com/database-tools/mongorestore/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM