Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incremental logical backup and point in time recovery (#11097)
* Unexplode Backup() function, pass BackupRequest as argument Signed-off-by: Shlomi Noach <[email protected]> * use tabletmanagerdata.BackupRequest Signed-off-by: Shlomi Noach <[email protected]> * make proto Signed-off-by: Shlomi Noach <[email protected]> * removed duplicate tabletmanagerdata imports Signed-off-by: Shlomi Noach <[email protected]> * tabletmanagerdatapb Signed-off-by: Shlomi Noach <[email protected]> * vschemapb Signed-off-by: Shlomi Noach <[email protected]> * require.NoError Signed-off-by: Shlomi Noach <[email protected]> * proto: BackupRequest.incremental_from_pos Signed-off-by: Shlomi Noach <[email protected]> * pass IncrementalFromPos Signed-off-by: Shlomi Noach <[email protected]> * populate incremental_from_pos Signed-off-by: Shlomi Noach <[email protected]> * Storing ServerUUID and TabletAlias as part of backup MANIFESTO Signed-off-by: Shlomi Noach <[email protected]> * use IncrementalFromPos in BackupParams, populate Signed-off-by: Shlomi Noach <[email protected]> * executeIncrementalBackup Signed-off-by: Shlomi Noach <[email protected]> * add unit tests for GTID 'Contains' Signed-off-by: Shlomi Noach <[email protected]> * Add binlog related functions in MySQLDaemon Signed-off-by: Shlomi Noach <[email protected]> * More functionality in incremental backup Signed-off-by: Shlomi Noach <[email protected]> * add backupBinlogDir as a valid backup directory Signed-off-by: Shlomi Noach <[email protected]> * include FromPosition in the backup manifest. Find binlog files to backup Signed-off-by: Shlomi Noach <[email protected]> * complete incremental backup Signed-off-by: Shlomi Noach <[email protected]> * clarify the difference between user's requested position, and the FromPosition in the manifest. Add 'Incremental' (bool) to the manifest Signed-off-by: Shlomi Noach <[email protected]> * make vtadmin_web_proto_types Signed-off-by: Shlomi Noach <[email protected]> * Add Keyspace, Shard to backup manifest Signed-off-by: Shlomi Noach <[email protected]> * for good order, keyspace comes first Signed-off-by: Shlomi Noach <[email protected]> * take into account purged GTIDs. Fix value of 'incrementalBackupToGTID' Signed-off-by: Shlomi Noach <[email protected]> * endtoend tests for incremental backup. No restore validation as yet. Tests do not have a GitHub workflow yet. Signed-off-by: Shlomi Noach <[email protected]> * Adding CI shard: 'backup_pitr' Signed-off-by: Shlomi Noach <[email protected]> * cleanup Signed-off-by: Shlomi Noach <[email protected]> * backup_pitr tested via mysql80 Signed-off-by: Shlomi Noach <[email protected]> * insert data with hint Signed-off-by: Shlomi Noach <[email protected]> * refactor Signed-off-by: Shlomi Noach <[email protected]> * FindPITRPath: find a shortest path to recover a GTID position, base on one full backup and zero or more inremental backups Signed-off-by: Shlomi Noach <[email protected]> * more validation Signed-off-by: Shlomi Noach <[email protected]> * more test cases Signed-off-by: Shlomi Noach <[email protected]> * RestoreFromBackupRequest: RestoreToPos Signed-off-by: Shlomi Noach <[email protected]> * vtctl Restore: '--restore_to_pos' Signed-off-by: Shlomi Noach <[email protected]> * make vtadmin_web_proto_types Signed-off-by: Shlomi Noach <[email protected]> * RestoreFromBackupRequest: RestoreToPos Signed-off-by: Shlomi Noach <[email protected]> * Unexplode: RestoreFromBackup() receives req *tabletmanagerdatapb.RestoreFromBackupRequest Signed-off-by: Shlomi Noach <[email protected]> * Unexplode: RestoreFromBackup() receives req *tabletmanagerdatapb.RestoreFromBackupRequest Signed-off-by: Shlomi Noach <[email protected]> * make vtadmin_web_proto_types Signed-off-by: Shlomi Noach <[email protected]> * populate restoreParams.RestoreToPos Signed-off-by: Shlomi Noach <[email protected]> * simplifying the logic of finding relevant backup Signed-off-by: Shlomi Noach <[email protected]> * fix switch/break logic Signed-off-by: Shlomi Noach <[email protected]> * towards a restore path Signed-off-by: Shlomi Noach <[email protected]> * golang version Signed-off-by: Shlomi Noach <[email protected]> * fix workflows ubuntu version Signed-off-by: Shlomi Noach <[email protected]> * skip nil manifests Signed-off-by: Shlomi Noach <[email protected]> * FindBackupToRestore() returns a RestorePath, which is an ordered sequence of backup manifests/handles Signed-off-by: Shlomi Noach <[email protected]> * linter suggestion Signed-off-by: Shlomi Noach <[email protected]> * fix backup time comparison logic Signed-off-by: Shlomi Noach <[email protected]> * vtctl Restore supports --dry_run flag Signed-off-by: Shlomi Noach <[email protected]> * flag --incremental-from-pos accepts the value 'auto', which takes the next incremental backup from last good backup Signed-off-by: Shlomi Noach <[email protected]> * make vtadmin_web_proto_types Signed-off-by: Shlomi Noach <[email protected]> * endtoend: validate --incremental_from_pos=auto Signed-off-by: Shlomi Noach <[email protected]> * towards applying binary logs: extracting onto temporary directory Signed-off-by: Shlomi Noach <[email protected]> * apply binary log file Signed-off-by: Shlomi Noach <[email protected]> * do not restore replication at end of PITR Signed-off-by: Shlomi Noach <[email protected]> * take dryrun into consideration Signed-off-by: Shlomi Noach <[email protected]> * testing restore to pos Signed-off-by: Shlomi Noach <[email protected]> * testing restore to pos: wait for replication, avoid bogus writes Signed-off-by: Shlomi Noach <[email protected]> * validating PITR path when binary logs are missing history Signed-off-by: Shlomi Noach <[email protected]> * full backup manifest now includes 'PurgedPosition', which is necessary to build a restore path. Now evaluated in IsValidIncrementalBakcup Signed-off-by: Shlomi Noach <[email protected]> * more recovery paths tests Signed-off-by: Shlomi Noach <[email protected]> * restrucutre tests Signed-off-by: Shlomi Noach <[email protected]> * log restore path Signed-off-by: Shlomi Noach <[email protected]> * generate CI workflows Signed-off-by: Shlomi Noach <[email protected]> * code comments Signed-off-by: Shlomi Noach <[email protected]> * code comments Signed-off-by: Shlomi Noach <[email protected]> * code comments Signed-off-by: Shlomi Noach <[email protected]> * CI 57 and 80 Signed-off-by: Shlomi Noach <[email protected]> * flags test Signed-off-by: Shlomi Noach <[email protected]> * copyright year Signed-off-by: Shlomi Noach <[email protected]> * go version Signed-off-by: Shlomi Noach <[email protected]> * removed legacy mysql80 test Signed-off-by: Shlomi Noach <[email protected]> * PITR: stop search for possible resotre path with the first valid path, even if it's not the optimal Signed-off-by: Shlomi Noach <[email protected]> * support incrementally union-izing of previous-GTIDs when iterating binary logs Signed-off-by: Shlomi Noach <[email protected]> * removed local metadata info Signed-off-by: Shlomi Noach <[email protected]> * merged main, regenerated workflows Signed-off-by: Shlomi Noach <[email protected]> * go mod tidy Signed-off-by: Shlomi Noach <[email protected]> * rename conflicting variable Signed-off-by: Shlomi Noach <[email protected]> * refactor: const value Signed-off-by: Shlomi Noach <[email protected]> * dry run restore now returns with 0 exit code, no error Signed-off-by: Shlomi Noach <[email protected]> * release notes Signed-off-by: Shlomi Noach <[email protected]> Signed-off-by: Shlomi Noach <[email protected]>
- Loading branch information