This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
fix(bug): partial backup didn't backup the right partition for data_bin and logs #7242
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix partial Backup
Description
When we enabled the partial backup from lvm snapshot, we can restore the partial backup because : - the partial backup method backup ibdata but not the new partitions ; - When we restore the full and the partial, we have a ibdata that need the new partitions not backuped - The tables logs and data_bin doesn't exist anymore in the innodb engineSo now I fix the issue following the smooth-db-backup.sh
Fixes # (issue)
Type of change
Please delete options that are not relevant.
Target serie
Please delete series that are not relevant.
How this pull request can be tested ?
1. Enable the backup LVM partial and full. 2. Wait to have one full and one partial 3. Try to restore following theses commands : - mysqladmin shutdown - rm -rf /var/lib/mysql/* - tar -xzf 2018-02-28-mysql-full.tar.gz --strip-components=3 -C /var/lib/mysql/ - tar -xzf 2019-03-01-mysql-partial.tar.gz --strip-components=3 -C /var/lib/mysql/ - restart mysqlTry do it without this fix, you'll have the following error :
mysql > desc data_bin;
Table 'centreon_storage.data_bin' doesn't exist in engine