This website requires JavaScript.

备份namenode的元数据

#!/bin/bash
export dirname=/mnt/tmphadoop/dfs/namesecondary/current/`date +%y%m%d%H`
if [ ! -d ${dirname} ]
then
mkdir  ${dirname}
cp /mnt/tmphadoop/dfs/namesecondary/current/*  ${dirname}
fi
scp -r ${dirname} slave1:/mnt/namenode_backup/
rm -r ${dirname}
0条评论
avatar