我从mongodb文件中读到:
important:
db.fsyncLock() may block reads, including those necessary to verify authentication
warning:
When calling db.fsyncLock(), ensure that the connection is kept open to allow a subsequent call to db.fsyncUnlock(). Closing the connection may make it difficult to release the lock
我们当前的Python管道从web中抓取数据并将这些数据存储到MongoDB中。然后,将数据加载到一个分析算法中。这在本地计算机上很好,因为mongod定位了数据库,但是我想在像Google这样的共享平台上上传数据库,这样其他用户就可以不用再运行刮板就可以使用这些数据了。
我知道MongoDB默认将数据存储在/ data /db,所以我可以将整个/data/db上传到Google吗?
另一个选项似乎是将MongoDB导出到JSON或CSV,但是我们当前用于分析算法的实现已经直接从MongoDB加载。
我正在使用PythonAnywhere托管我的web应用程序。使用Mongodb作为我的数据库。现在,我的任务是定期进行备份,并随时恢复特定版本的mongodb。
在本地(windows机器)上做这件事很容易。安装Mongodb实用程序并执行命令
mongodump --mongodbConnectionString //From location where this executable is stored
mongorestore --mongodbConnectionString
现在,我面临的挑战是如何从PythonAnywhere中做到这一点。在这里,我应该如何使用这些实用程序
对于在生产中运行的TokuMX服务器的远程数据库备份(没有切分和复制),我有几个问题。单个子句是“不要停止运行Tokumx实例”。
运行TokuMX服务器的热备份的最佳方法是什么(企业版的TokuMX热备份除外)。
关于建议的MongoDB备份方法的问题:
备份-主机# mongodump -主机mongodb-主机-端口27017 -db mongodevdb -用户名mongouser -密码单
- Is this command prefer way to make hot backups?
- What port should I use when issue this
在下面执行mongoexport command.Connection字符串时出现以下错误。
MongoDB外壳版本v4.2.0
OS - Mac OS Catalina
mongoexport --uri="mongodb+srv://m001-student:m001-****@sandbox.*****.mongodb.net/sample_supplies" --collection=sales --out=sales.json
错误:
2021-01-14T20:27:59.584+0000 error parsing command line options: