Chatee ahora con Soporte
Chat con el soporte

NetVault Plug-in for MySQL 4.4 - User Guide

Introducing Dell™ NetVault™ Backup Plug‑in for MySQL Installing and removing the plug-in Configuring the plug-in Backing up data Restoring data Working with native MySQL replication Using the plug-inin a Failover Cluster environment Troubleshooting About Dell

Full and Incremental Backup restore scenarios

The DBA has established a backup policy in which Full Backups are performed every Sunday at 11:00 P.M. and Incremental Backups are performed Monday through Saturday, at 11:00 P.M. Because the DBA is performing Incremental Backups, the Binary Logs are deleted after each Incremental Backup. This makes the overall backup faster, but requires more time and steps when performing the restore.
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors for the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped the table sometime early Thursday, prior to the DBA’s arrival at work.
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
1
Select the Incremental Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Incremental Backup.
Method 1: Recovery Prior to Erroneous Statement Using Restored Binary Logs Only
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 8:00 P.M. on Wednesday.
The DBA needs to perform a recovery that restores the database up to the time right before the developer dropped the table at 8:00 P.M. on Wednesday. Therefore, the following phases would be performed:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
1
Select the Incremental Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to specify PIT Recovery and enable all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to specify the Binary Log included in the backup for use.
Time Based PIT – Selected as the type.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Date/Time to “19:59” and “10 Jan 2007” (that is, one minute prior to 8:00 P.M. on Wednesday).
Method 2: Recovery prior to and after erroneous statement using restored Binary Logs only
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 8:00 P.M. on Wednesday.
The DBA decides to recover up to the time right before the Drop Table command was issued at 8:00 P.M. The DBA also wants to recover the transactions that occurred to the remaining tables from the time after the Orders table was dropped, and up until the end of the backed-up Binary Logs. This will ensure that he has recovered as many of the transactions as feasible, in addition to recovering the dropped table. Therefore, the following phases would be performed:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
1
Select the Incremental Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to specify PIT Recovery and enable all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to specify the Binary Log included in the backup for use.
Time Based PIT – Selected as the type.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Date/Time to “19:59” and “10 Jan 2007” (that is, one minute prior to 8:00 P.M. on Wednesday).
Enable Recovery After Erroneous/Bad SQL Statements – Selected to recover transactions that occurred after the Order table was dropped, entered a later time and date in the Start Date/Time. Finally, because the recovery is to be performed to the end of the Binary Log included in the backup, the None option was selected for the Stop Date/Time.
Method 3: Recovery prior to erroneous statement using restored and current Binary Logs
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 6:00 A.M. on Thursday.
The DBA needs to perform a recovery that restores the database up to the time right before the developer dropped the table at 6:00 A.M. on Thursday.
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
1
Select the Incremental Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to specify PIT Recovery and enable all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to indicate that the Binary Log included in the backup is to be used.
Include Current Binary Logs – Selected to use the current Binary Logs to apply entries that occurred between the time the backup was completed on Wednesday, and the issuance of the Drop Table command.
Time Based PIT – Selected as the type.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Date/Time to “05:59” and “11 Jan 2007” (that is, one minute prior to 6:00 A.M. on Thursday).
Method 4: Recovery prior to and after erroneous statement using restored and current Binary Logs
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 6:00 A.M. on Thursday.
The DBA decides to recover up to the time right before the Drop Table command was issued. The DBA also wants to recover the transactions that occurred to the remaining tables from the time after the Orders table was dropped, and up until the end of the current Binary Logs. This will ensure that he has recovered as many of the transactions as feasible, in addition to recovering the dropped table. Therefore, the following phases would be performed:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
1
Select the Incremental Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to specify PIT Recovery and enable all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to indicate that the Binary Log included in the backup is to be used.
Include Current Binary Logs – Selected to use the current Binary Logs to apply entries that occurred between the time the backup was completed on Wednesday, and the issuance of the Drop Table command.
Time Based PIT – Selected as the type.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Date/Time to “05:59” and “11 Jan 2007” (that is, one minute prior to 6:00 A.M. on Thursday).
Enable Recovery After Erroneous/Bad SQL Statements – Selected to recover transactions that occurred after the Order table was dropped, entered a later time and date in the Start Date/Time. Finally, because the recovery is to be performed to the end of the current Binary Log, the None option was selected for the Stop Date/Time.
Method 1: Recovery prior to erroneous statement using restored Binary Logs only
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 8:00 P.M. on Wednesday.
The DBA decides to recover up to the time right before the Drop Table command was issued. Furthermore, the DBA wants a more precise recovery, so he decides to use a position-based recovery. To accomplish this, the DBA must restore Sunday’s Full Backup and the subsequent Incrementals performed on Monday and Tuesday, and then perform a position-based PIT Recovery using Wednesday’s Incremental Backup. The following phases illustrate this:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
1
Select the Incremental Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Restore Logs to Temporary Directory to Identify Time or Position – Selected to restore only the Binary Logs included in Wednesday night’s Incremental Backup.
Time Based PIT – Selected as the type, but left all options in the Time Based PIT Details section cleared.
Use the mysqlbinlog utility against the restored Binary Logs – This is performed outside of NetVault Backup to identify the position of the Drop Table command that the DBA does not want to restore. (For information on this utility and process, refer to the MySQL Reference Guide.) In this process, the DBA identified the Drop Table command as log position “805” in the “MYSQLSVR-bin.000009” Binary Log that was restored to the temporary location on the MySQL Server (and both values were noted).
1
Select the Incremental Backup performed Wednesday night – The DBA again selects the backup saveset on the Create Restore Job - Choose Saveset page that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Apply Binary Logs from Temporary Directory – Selected to target the Binary Logs that were restored to the temporary location in the last phase of this procedure. Because the restored Binary Log was used to identify the specific position that the Drop Table command occupied, this option is selected to tell the plug-in to use this same Binary Log.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Position to “804” (the position in the Binary Logs that exists before the Drop Table command position identified using mysqlbinlog). The Binary Log Containing Stop Position option was used to select the Binary Log (“MYSQLSVR-bin.000009”) that was restored to the temporary directory.
Method 2: Recovery prior to and after erroneous statement using restored Binary Logs only
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 8:00 P.M. on Wednesday.
The DBA decides to recover up to the time right before the Drop Table command was issued. The DBA also wants to recover the transactions that occurred to the remaining tables from the time after the Orders table was dropped, and up until the end of the backed-up Binary Logs. Furthermore, the DBA wants a more precise recovery, so he decides to use a position-based recovery. To accomplish this, the DBA must restore Sunday’s Full Backup and the subsequent Incrementals performed on Monday and Tuesday, and then perform a position-based PIT Recovery using Wednesday’s Incremental Backup. The following phases illustrate this:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
1
Select the Incremental Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Restore Logs to Temporary Directory to Identify Time or Position – Selected to restore only the Binary Logs included in Wednesday night’s Incremental Backup.
Time Based PIT – Selected as the type, but left all options in the Time Based PIT Details section cleared.
Use the mysqlbinlog utility against the restored Binary Logs – This is performed outside of NetVault Backup to identify the position of the Drop Table command that the DBA does not want to restore. (For information on this utility and process, refer to the MySQL Reference Guide.) In this process, the DBA identified the Drop Table command as log position “805” in the “MYSQLSVR-bin.000009” Binary Log that was restored to the temporary location on the MySQL Server (and both values were noted).
1
Select the Incremental Backup performed Wednesday night – The DBA again selects the backup saveset on the Create Restore Job - Choose Saveset page that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Apply Binary Logs from Temporary Directory – Selected to target the Binary Logs that were restored to the temporary location in the last phase of this procedure. Because the restored Binary Log was used to identify the specific position that the Drop Table command occupied, this option is selected to tell the plug-in to use this same Binary Log.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Position to “804” (the position in the Binary Logs that exists before the Drop Table command position identified using mysqlbinlog). The Binary Log Containing Stop Position option was used to select the Binary Log (“MYSQLSVR-bin.000009”) that was restored to the temporary directory.
Enable Recovery After to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Start Position to “806” (the position in the Binary Logs that exists after the Drop Table command position identified using mysqlbinlog). The Binary Log Containing Stop Position option was used to select the Binary Log (“MYSQLSVR-bin.000009”) that was restored to the temporary directory. Finally, because the recovery is to be performed to the end of the named Binary Log, the None option was selected for the Stop Date/Time.
*IMPORTANT: Stop and Start positions must be actual positions listed in a Binary Log, not arbitrary numbers that are greater than the position of the unwanted transaction.
Method 3: Recovery prior to erroneous statement using restored and Current Binary Logs
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors for the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 6:00 A.M. on Thursday.
The DBA needs to perform a recovery that restores the database up to the time right before the developer dropped the table at 6:00 A.M. on Thursday. Furthermore, the DBA wants a more precise recovery, so he decides to use a position-based recovery. To accomplish this, the DBA must restore Sunday’s Full Backup and the subsequent Incrementals performed on Monday and Tuesday, and then perform a position-based PIT Recovery using Wednesday’s Incremental Backup. The following phases illustrate this:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
Use the mysqlbinlog utility against the current Binary Logs – This is performed outside of NetVault Backup to identify the position of the Drop Table command that the DBA does not want to restore. (For information on this utility and process, refer to the MySQL Reference Guide.) In this process, the DBA identified the Drop Table command as log position “805” in the current Binary Log (“MYSQLSVR-bin.000009”).
1
Select the Incremental Backup performed Wednesday night – The DBA again selects the backup saveset on the Create Restore Job - Choose Saveset page that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to tell the plug-in to use the Binary Log included in the backup.
Include Current Binary Logs – Selected to tell NetVault Backup to use the current Binary Logs to apply all database transactions that occurred after Wednesday night’s Incremental Backup. This will recover all transactions that occurred between the completion of the Incremental Backup on Wednesday night, and the time the Drop Table command was issued.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Position to “804” (the position in the current Binary Log that exists before the Drop Table command position identified using mysqlbinlog). Set Binary Log Containing Stop Position to OTHER FILE, and entered the name of the current binary file in the text box (for example, “MYSQLSVR-bin.000009”).
Method 4: Recovery prior to and after erroneous statement using restored and current Binary Logs
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors for the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 6:00 A.M. on Thursday.
The DBA needs to perform a recovery that restores the database up to the time right before the developer dropped the table at 6:00 A.M. on Thursday. Furthermore, the DBA wants a more precise recovery, so he decides to use a position-based recovery. To accomplish this, the DBA must restore Sunday’s Full Backup and the subsequent Incrementals performed on Monday and Tuesday, and then perform a position-based PIT Recovery using Wednesday’s Incremental Backup. The following phases illustrate this:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Incremental Backup performed Monday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Monday’s Incremental Backup.
1
Select the Incremental Backup performed Tuesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Tuesday’s Incremental Backup.
Use the mysqlbinlog utility against the current Binary Logs – This is performed outside of NetVault Backup to identify the position of the Drop Table command that the DBA does not want to restore. (For information on this utility and process, refer to the MySQL Reference Guide.) In this process, the DBA identified the Drop Table command as log position “805” in the current Binary Log (“MYSQLSVR-bin.000009”).
1
Select the Incremental Backup performed Wednesday night – The DBA again selects the backup saveset on the Create Restore Job - Choose Saveset page that corresponds to Wednesday’s Incremental Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to tell the plug-in to use the Binary Log included in the backup.
Include Current Binary Logs – Selected to tell NetVault Backup to use the current Binary Logs to apply all database transactions that occurred after Wednesday night’s Incremental Backup. This will recover all transactions that occurred between the completion of the Incremental Backup on Wednesday night, and the time the Drop Table command was issued.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Position to “804” (the position in the current Binary Log that exists before the Drop Table command position identified using mysqlbinlog). Set Binary Log Containing Stop Position to OTHER FILE, and entered the name of the current binary file in the text box (for example, “MYSQLSVR-bin.000009”).
Enable Recovery After to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Start Position to “806” (the position in the current Binary Log that exists after the Drop Table command position that was identified using mysqlbinlog). Set Binary Log Containing Stop Position to OTHER FILE, and entered the name of the current binary file in the text box (for example, “MYSQLSVR-bin.000009”). Finally, because the recovery is to be performed to the end of the current Binary Log, the None option was selected for the Stop Position.
*IMPORTANT: Stop and Start positions must be actual positions listed in a Binary Log, not arbitrary numbers that are greater than the position of the unwanted transaction.

Full and Differential Backup restore scenarios

The DBA has established a backup policy in which Full Backups are performed every Sunday at 11:00 P.M. and Differential Backups are performed Monday through Saturday, at 11:00 P.M. Because the DBA is performing Differential Backups, the Binary Logs are kept after each form of this backup — which creates a longer backup, but allows for a faster overall restore.
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it sometime early Thursday prior to the DBA’s arrival at work.
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Differential Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Differential Backup.
2
Leave all restore-related Options at their defaultNone of the options available on the Options tab are used.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by selecting to perform Differential Backups, each night’s backup is cumulative, back to Sunday night’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 8:00 P.M. on Wednesday.
The DBA needs to perform a recovery that restores the database up to the time right before the developer dropped the table at 8:00 P.M. on Wednesday. Therefore, the following phases would be performed:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Differential Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Differential Backup.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by selecting to perform Differential Backups, each night’s backup is cumulative, back to Sunday night’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to specify PIT Recovery and enable all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to specify the Binary Log included in the backup for use.
Time Based PIT – Selected as the type.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Date/Time to “19:59” and “10 Jan 2007” (that is, one minute prior to 8:00 P.M. on Wednesday).
Method 2: Recovery prior to and after erroneous statement using restored Binary Logs only
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 8:00 P.M. on Wednesday.
The DBA decides to recover up to the time right before the Drop Table command was issued at 8:00 P.M. The DBA also wants to recover the transactions that occurred to the remaining tables from the time after the Orders table was dropped, and up until the end of the backed-up Binary Logs. This will ensure that he has recovered as many of the transactions as feasible, in addition to recovering the dropped table. Therefore, the following phases would be performed:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Differential Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Differential Backup.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by selecting to perform Differential Backups, each night’s backup is cumulative, back to Sunday night’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to specify PIT Recovery and enable all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to specify the Binary Log included in the backup for use.
Time Based PIT – Selected as the type.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Date/Time to “19:59” and “10 Jan 2007” (that is, one minute prior to 8:00 P.M. on Wednesday).
Enable Recovery After Erroneous/Bad SQL Statements – Selected to recover transactions that occurred after the Order table was dropped, entered a later time and date in the Start Date/Time. Finally, because the recovery is to be performed to the end of the restored Binary Log, the None option was selected for the Stop Date/Time.
Method 3: Recovery prior to erroneous statement using restored and current Binary Logs
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 6:00 A.M. on Thursday.
The DBA needs to perform a recovery that restores the database up to the time right before the developer dropped the table at 6:00 A.M. on Thursday.
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Differential Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Differential Backup.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by selecting to perform Differential Backups, each night’s backup is cumulative, back to Sunday night’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to specify PIT Recovery and enable all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to indicate that the Binary Log included in the backup is to be used.
Include Current Binary Logs – Selected to use the current Binary Logs to apply entries that occurred between the time the backup was completed on Wednesday, and the issuance of the Drop Table command.
Time Based PIT – Selected as the type.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Date/Time to “05:59” and “11 Jan 2007” (that is, one minute prior to 6:00 A.M. on Thursday).
Method 4: Recovery prior to and after erroneous statement using restored and current Binary Logs
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 6:00 A.M. on Thursday.
The DBA decides to recover up to the time right before the Drop Table command was issued. The DBA also wants to recover the transactions that occurred to the remaining tables from the time after the Orders table was dropped, and up until the end of the current Binary Logs. This will ensure that he has recovered as many of the transactions as feasible, in addition to recovering the dropped table. Therefore, the following phases would be performed:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Differential Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Differential Backup.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by selecting to perform Differential Backups, each night’s backup is cumulative, back to Sunday night’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to specify PIT Recovery and enable all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to indicate that the Binary Log included in the backup is to be used.
Include Current Binary Logs – Selected to use the current Binary Logs to apply entries that occurred between the time the backup was completed on Wednesday, and the issuance of the Drop Table command.
Time Based PIT – Selected as the type.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Date/Time to “05:59” and “11 Jan 2007” (that is, one minute prior to 6:00 A.M. on Thursday).
Enable Recovery After Erroneous/Bad SQL Statements – Selected to recover transactions that occurred after the Order table was dropped, entered a later time and date in the Start Date/Time. Finally, because the recovery is to be performed to the end of the current Binary Log, the None option was selected for the Stop Date/Time.
Method 1: Recovery prior to erroneous statement using restored Binary Logs only
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 8:00 P.M. on Wednesday.
The DBA decides to recover up to the time right before the Drop Table command was issued. Furthermore, the DBA wants a more precise recovery, so he decides to use a position-based recovery. The following phases illustrate this:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Differential Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Differential Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Restore Logs to Temporary Directory to Identify Time or Position – Selected to restore only the Binary Logs included in Wednesday night’s Differential Backup.
Time Based PIT – Selected as the type, but left all options in the Time Based PIT Details section cleared.
Use the mysqlbinlog utility against the restored Binary Logs – This is performed outside of NetVault Backup to identify the position of the Drop Table command that the DBA does not want to restore. (For information on this utility and process, refer to the MySQL Reference Guide.) In this process, the DBA identified the Drop Table command as log position “805” in the “MYSQLSVR-bin.000009” Binary Log that was restored to the temporary location on the MySQL Server (and both values were noted).
1
Select the Differential Backup performed Wednesday night – The DBA again selects the backup saveset on the Create Restore Job - Choose Saveset page that corresponds to Wednesday’s Differential Backup.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by selecting to perform Differential Backups, each night’s backup is cumulative, back to Sunday night’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Apply Binary Logs from Temporary Directory – Selected to target the Binary Logs that were restored to the temporary location in the last phase of this procedure. Because the restored Binary Log was used to identify the specific position that the Drop Table command occupied, this option is selected to tell the plug-in to use this same Binary Log.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Position to “804” (the position in the Binary Logs that exists before the Drop Table command position identified using mysqlbinlog). The Binary Log Containing Stop Position option was used to select the Binary Log (“MYSQLSVR-bin.000009”) that was restored to the temporary directory.
Method 2: Recovery prior to and after erroneous statement using restored Binary Logs only
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors on the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 8:00 P.M. on Wednesday.
The DBA decides to recover up to the time right before the Drop Table command was issued. The DBA also wants to recover the transactions that occurred to the remaining tables from the time after the Orders table was dropped, and up until the end of the backed-up Binary Logs. Furthermore, the DBA wants a more precise recovery, so he decides to use a position-based recovery. The following phases illustrate this:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
1
Select the Differential Backup performed Wednesday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Wednesday’s Differential Backup.
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Restore Logs to Temporary Directory to Identify Time or Position – Selected to restore only the Binary Logs included in Wednesday night’s Differential Backup.
Time Based PIT – Selected as the type, but left all options in the Time Based PIT Details section cleared.
Use the mysqlbinlog utility against the restored Binary Logs – This is performed outside of NetVault Backup to identify the position of the Drop Table command that the DBA does not want to restore. (For information on this utility and process, refer to the MySQL Reference Guide.) In this process, the DBA identified the Drop Table command as log position “805” in the “MYSQLSVR-bin.000009” Binary Log that was restored to the temporary location on the MySQL Server (and both values were noted).
1
Select the Differential Backup performed Wednesday night – The DBA again selects the backup saveset on the Create Restore Job - Choose Saveset page that corresponds to Wednesday’s Differential Backup.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by selecting to perform Differential Backups, each night’s backup is cumulative, back to Sunday night’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Apply Binary Logs from Temporary Directory – Selected to target the Binary Logs that were restored to the temporary location in the last phase of this procedure. Because the restored Binary Log was used to identify the specific position that the Drop Table command occupied, this option is selected to tell the plug-in to use this same Binary Log.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Position to “804” (the position in the Binary Logs that exists before the Drop Table command position identified using mysqlbinlog). The Binary Log Containing Stop Position option was used to select the Binary Log (“MYSQLSVR-bin.000009”) that was restored to the temporary directory.
Enable Recovery After to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Start Position to “806” (the position in the Binary Logs that exists after the Drop Table command position identified using mysqlbinlog). The Binary Log Containing Stop Position option was used to select the Binary Log (“MYSQLSVR-bin.000009”) that was restored to the temporary directory. Finally, because the recovery is to be performed to the end of the named Binary Log, the None option was selected for the Stop Position.
*IMPORTANT: Stop and Start positions must be actual positions listed in a Binary Log, not arbitrary numbers that are greater than the position of the unwanted transaction.
Method 3: Recovery prior to erroneous statement using restored and current Binary Logs
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors for the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 6:00 A.M. on Thursday.
The DBA needs to perform a recovery that restores the database up to the time right before the developer dropped the table at 6:00 A.M. on Thursday. Furthermore, the DBA wants a more precise recovery, so he decides to use a position-based recovery. The following phases illustrate this:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
Use the mysqlbinlog utility against the current Binary Logs – This is performed outside of NetVault Backup to identify the position of the Drop Table command that the DBA does not want to restore. (For information on this utility and process, refer to the MySQL Reference Guide.) In this process, the DBA identified the Drop Table command as log position “805” in the current Binary Log (“MYSQLSVR-bin.000009”).
1
Select the Differential Backup performed Wednesday night – The DBA again selects the backup saveset on the Create Restore Job - Choose Saveset page that corresponds to Wednesday’s Differential Backup.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by selecting to perform Differential Backups, each night’s backup is cumulative, back to Sunday night’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to tell the plug-in to use the Binary Log that was included in the backup.
Include Current Binary Logs – Selected to tell NetVault Backup to use the current Binary Logs to apply all database transactions that occurred after Wednesday night’s Differential Backup. This will recover all transactions that occurred between the completion of the Differential Backup on Wednesday night, and the time the Drop Table command was issued.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Position to “804” (the position in the current Binary Log that exists before the Drop Table command position identified using mysqlbinlog). Set Binary Log Containing Stop Position to OTHER FILE, and entered the name of the current binary file in the text box (for example, “MYSQLSVR-bin.000009”).
Method 4: Recovery prior to and after erroneous statement using restored and current Binary Logs
On Thursday at 9:00 A.M., the DBA learns that users are encountering “table not found” errors for the Orders table. The DBA subsequently learns that the table no longer exists because a developer unknowingly dropped it at 6:00 A.M. on Thursday.
The DBA decides to recover up to the time right before the Drop Table command was issued. The DBA also wants to recover the transactions that occurred to the remaining tables from the time after the Orders table was dropped, and up until the end of the current Binary Log, as well. Furthermore, the DBA wants a more precise recovery, so he decides to use a position-based recovery. The following phases illustrate this:
1
Select the Full Backup performed Sunday night – On the Create Restore Job - Choose Saveset page, the DBA selects the backup saveset that corresponds to Sunday’s Full Backup.
Use the mysqlbinlog utility against the current Binary Logs – This is performed outside of NetVault Backup to identify the position of the Drop Table command that the DBA does not want to restore. (For information on this utility and process, refer to the MySQL Reference Guide.) In this process, the DBA identified the Drop Table command as log position “805” in the current Binary Log (“MYSQLSVR-bin.000009”).
1
Select the Differential Backup performed Wednesday night – The DBA again selects the backup saveset on the Create Restore Job - Choose Saveset page that corresponds to Wednesday’s Differential Backup.
*IMPORTANT: The DBA does not need to restore Monday and Tuesday night’s Differential Backups because, by choosing to perform Differential Backups, each night’s backup is cumulative, back to Sunday’s Full Backup (that is, Wednesday night’s backup includes all the Binary Logs that were generated on Monday, Tuesday, and Wednesday — back to Sunday’s Full Backup).
2
Set specific options on the restore-related Options tab – The DBA sets the following options:
Perform PIT Recovery – Selected to enable this form of restore and all associated options.
Restore and Apply Binary Logs (Used when Time or Position is already known) – Selected to tell the plug-in to use the Binary Log that was included in the backup.
Include Current Binary Logs – Selected to tell NetVault Backup to use the current Binary Logs to apply all database transactions that occurred after Wednesday night’s Differential Backup. This will recover all transactions that occurred between the completion of the Differential Backup on Wednesday night, and the time the Drop Table command was issued.
Enable Recovery Prior to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Stop Position to “804” (the position in the current Binary Logs that exists before the Drop Table command position identified using mysqlbinlog). Set Binary Log Containing Stop Position to OTHER FILE, and entered the name of the current binary file in the text box (for example, “MYSQLSVR-bin.000009”).
Enable Recovery After to Erroneous/Bad SQL Statement(s) – Selected this option, and set the Start Position to “806” (the position in the current Binary Log that exists after the Drop Table command position that was identified using mysqlbinlog). Set Binary Log Containing Stop Position to OTHER FILE, and entered the name of the current binary file in the text box (for example, “MYSQLSVR-bin.000009”). Finally, because the recovery is to be performed to the end of the current Binary Log, the None option was selected for the Stop Position.
*IMPORTANT: Stop and Start positions must be actual positions listed in a Binary Log, not arbitrary numbers that are greater than the position of the unwanted transaction.

Examples of restore scenarios for MySQL Enterprise Backup

1
1

Using advanced restore procedures for MySQL Standard/Community

1
In the Navigation pane, click Create Restore Job, select Plug‑in for MySQL from the Plugin Type list, select the applicable saveset, and click Next.
2
On the Create Selection Set page, select the database that you want to rename.
3
From the Actions list, select Rename.
4
In the Rename/Relocate dialog, enter the new name in the Rename to box, and click Ok.
Documentos relacionados

The document was helpful.

Seleccionar calificación

I easily found the information I needed.

Seleccionar calificación