日期:2014-05-16  浏览次数:20408 次

mongodb 简单的备份

#!/bin/sh
binpath="/usr/local/mongodb/bin"
backpath="/data1/mongodbgwy/back"
port=29017
$binpath/mongodump? --port $port -o? $backpath/mongodb_`date +%Y%m%d`
find $backpath/* -type d? -prune -mtime 30? -name mongodb*? -exec rm -rf {} \;