我正在使用PythonAnywhere托管我的web应用程序。使用Mongodb作为我的数据库。现在,我的任务是定期进行备份,并随时恢复特定版本的mongodb。
在本地(windows机器)上做这件事很容易。安装Mongodb实用程序并执行命令
mongodump --mongodbConnectionString //From location where this executable is stored
mongorestore --mongodbConnectionString
现在,我面临的挑战是如何从PythonAnywhere中做到这一点。在这里,我应该如何使用这些实用程序
在Red Hat Enterprise Linux Server release 6.5 (Santiago)上运行Postgres9.2。使用PGAdmin III与服务器通信。
我试图在COPY FROM上使用/home/foo_user/dir/bar.csv的CSV文件,但得到:
could not open file "/home/foo_user/dir/bar.csv" for reading: Permission denied
通过SSH返回
setenforce: SELinux is disabled
但解决不了问题。
,文件的权限是-rwxrwxrwx