简体   繁体   中英

Restore from backup | MySQL

I have restored from a backup on a specific date to a test server database and I want to check if it restored all the data. How can I check or compare the data between the test database and the production database.

Welcome .

This would have become a good post (for several others) if you had added little more details.

Assumptions .

  1. Original database at first server is bigger and the restored database in second server is a subset (backup on a specific date).

  2. So many databases, so many tables, so many columns and so many rows.

Solutions .

  1. Your backup (bet it through your own script or through a tool) should have an accompanying log file. Refer the same for any errors / warnings.
  2. Refer the outcome of your restore too. And if both does not have any thing unusual, you can be sure of (may be 95%).
  3. Prepare a script to have output from both servers having group ed sum values based on important criteria / categories / group heads / etc.
  4. Also run this. https://dev.mysql.com/doc/refman/5.7/en/checksum-table.html on both servers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM