Linux backup files and database scripts
Back up the database:
#! / bin/bash
# bei fen mysql:moves
# time:2016/3/27
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
Export PATH
# backup database
# mysqldump-uroot-p password database name | gzip > path / moves`date +% Ymuri% mmi% dice% H% M% S`.sql.gz
# backup files
The path to which the tar-zcvf path / mymove`date +% Ymure% mmury% mmury% dink% H% M% S`.tar.gz is backed up