tailieunhanh - MySQL Enterprise Solutions phần 9

Bởi vì phần lớn nội dung là năng động, hiệu quả nội dung tĩnh không phải là quan trọng trong quyết định. Theo như nội dung động là có liên quan, PHP có một danh tiếng của hoạt động tốt hơn ASP. Mặc dù nó là khó khăn để đến với một chuẩn mực công bằng cho hai ngôn ngữ khác nhau, nhiều người | L316 Backup and Table Maintenance The backup taken with mysqldump can be restored on a fresh installation of MySQL by feeding the dump to the standard command line client for example mysql -u root -p secret Incremental Backup In addition to a regular . nightly physical and logical backup it is also advisable to perform frequent incremental backups. Incremental backups put very little demand on system resources. If performed frequently incremental backups greatly limit the amount of data you can lose in the case of a catastrophic failure. To perform incremental backups with MySQL you should enable the log-bin option on the server being backed up. Set up a cron job that will periodically connect to the server execute FLUSH LOGS and then archive the logs created since the previous run. Once the logs have been archived dispose of them with the PURGE MASTER LOGS TO command giving it the first log you are not going to purge as a string argument. If you have replication slaves make sure they are done processing the logs you are about to purge. For a more detailed discussion of PURGE MASTER LOGS TO see Chapter 16. To restore an incremental backup you must first restore the full physical or logical backup. You will then need mysqlbinlog a binary log dump utility included in the MySQL distribution. Use mysqlbinlog to process all of the backup logs in the correct sequence piping the output to the standard command line client. For example mysqlbinlog mysql -u root -p secret One disadvantage of the incremental backup is that if the amount of log data becomes large or the queries in it are slow restoring it will take a long time. Another problem is that temporary table operations are not fully supported and updates with user variables are not supported at all. If you plan to use incremental backup it is recommended that you disable binary logging for the creation of temporary tables with SET SQL_LOG_BIN 0. .

TỪ KHÓA LIÊN QUAN