mongodb数据备份shell脚本

#!/bin/bash
#by fuqiang
#2018-09-06

mongoexport --host 122.xx.xx.13 --port 29019 --db wenshu --collection resultContent --username wenshu --password adf41 --out /home/mongo_wenshu/resultContent.tar  > /home/mongo_wenshu/1.log

【备注】:1、mongodump数据备份慢,而且试过2次,数据量大时,中途无故断,不推荐使用;

猜你喜欢

转载自blog.csdn.net/kevinsingapore/article/details/82458909