#!/bin/sh
set -x
dt=$(date %Y%m%d)
data_path="/data02/mongodb_bak/"
find $data_path/ -type d -ctime 6 -exec rm -rf {} ;
mkdir $data_path/$dt
/home/kaifa/mongodb/bin/mongodump --directoryperdb -o $data_path/${dt}/
#!/bin/sh
set -x
dt=$(date %Y%m%d)
data_path="/data02/mongodb_bak/"
find $data_path/ -type d -ctime 6 -exec rm -rf {} ;
mkdir $data_path/$dt
/home/kaifa/mongodb/bin/mongodump --directoryperdb -o $data_path/${dt}/