-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backups: Fail restore process on YSQL Dump apply error
Summary: 1. Stop backup-restore process if YSQL Dump Apply (via `ysqlsh` tool) returns a error. 2. If an YSQLDump apply error happens - do clean-up on exit: `DROP DATABASE <target-db-name>`. Added new `yb_backup.py` arguments: `--ysql_ignore_restore_errors` - Do NOT use ON_ERROR_STOP mode when applying YSQL dumps. `--ysql_disable_db_drop_on_restore_error` - Do NOT drop just created (or existing) YSQL DB if YSQL dump apply failed. Global python variable in `yb_backup.py` `ENABLE_STOP_ON_YSQL_DUMP_RESTORE_ERROR` controls the feature by default (now `= False`). Test Plan: Jenkins: all tests ybd --cxx-test yb-backup-test --gtest_filter YBBackupTest.TestYSQLKeyspaceBackup ybd --cxx-test yb-backup-test --gtest_filter YBBackupTest.TestYSQLKeyspaceBackupWithDropTable ybd --cxx-test yb-backup-test --gtest_filter YBBackupTest.TestYSQLBackupWithDropYugabyteDB Other backup tests Reviewers: mihnea, tverona, yguan Reviewed By: yguan Subscribers: yql, yugaware Differential Revision: https://phorge.dev.yugabyte.com/D30253
- Loading branch information
1 parent
b758786
commit b969e29
Showing
1 changed file
with
79 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters