Backup
# mysqldump -uroot-plam2linux discuz >/data/discuz.sql #备份discuz库, ending in *.sql
# Vim/data/discuz.sql #进入文件查看信息
If we delete the files in the Discuz library,
# RM-RF (filename)
Recovery
# MySQL -uroot-plam2linux discuz </data/discuz.sql #恢复discuz库内的信息
Not only can you back up the library but also back up the table (take the pre_forum_post table as an example)
Backup table
# mysqldump-uroot-plam2linux Discuz pre_forum_posT >/data/post.sql
Recovery table
# Mysql-uroot-plam2linux Discuz </data/post.sql
PS: Add a table name when backing up, and restore as long as the Discuz library name is enough
Special case:(Take pre_forum_post table for example)
the "character set" was not developed during backup, and the character set was inconsistent with the previous character set when recovering . the data that causes recovery is garbled,
Therefore, the backup should be Specify Character Set
Backup
# mysqldump-uroot--default-character-set=gbk-plam2linux discuz pre_forum_post >/data/post.sql
Recovery
# mysql -uroot--default-character-set=gbk-plam2linux Discuz </data/post.sql
Backup and Recovery for MySQL