Skip to content

Commit

Permalink
Update bak.sh
Browse files Browse the repository at this point in the history
the triggers and fuctions are not need to be backuped
and will generate error on restore.sh
  • Loading branch information
zhblue authored Sep 30, 2023
1 parent 1abc77a commit d221a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trunk/install/bak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo "optimize table compileinfo,contest,contest_problem,loginlog,news,privilege
echo "这里有警告是正常现象,请勿担心,下面的打包压缩耗时较长,请耐心等待备份结束,重新回到命令行提示符。"
echo "The warning here is normal, don't worry, the following packaging and compression takes a long time, please wait patiently for the backup to end and return to the command line prompt."

mysqldump -h $SERVER -P $PORT -R $DATABASE -u$USER -p$PASSWORD | bzip2 >/var/backups/db_${DATE}.sql.bz2
mysqldump -h $SERVER -P $PORT $DATABASE -u$USER -p$PASSWORD | bzip2 >/var/backups/db_${DATE}.sql.bz2
if tar cjf /var/backups/hustoj_${DATE}.tar.bz2 /home/judge/data /home/judge/src /home/judge/etc /var/backups/db_${DATE}.sql.bz2; then
rm /var/backups/hustoj_${OLD3}.tar.bz2 2> /dev/null
rm /var/backups/db_${OLD}.sql.bz2 2> /dev/null
Expand Down

0 comments on commit d221a86

Please sign in to comment.