Wednesday, April 8, 2015

mysqldump

mkdir  -p  /root/.save;
mysql  -BNe 'SHOW DATABASES'  |  while read db;  do \
    echo "- $db -"; mysqldump $db > /root/.save/$db-$(date +%FT%T).sql; \
done

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.