-
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.
[#20334] YSQL, Backups: Use ignore_existing_tablespaces in yb_backup.py
Summary: Changes: 1. The new flag `--ignore_existing_tablespaces` is added into `yb_backup.py` script. 2. `ysql_dumpall` tool is changed to dump Tablespaces with `if (ignore_existing_tablespaces)` statement. The changes allow ignoring errors like `tablespace "region1_ts1" already exists` when the backup-restore recreates the YSQL Tablespaces. NOTE: "STOP_ON_ERROR" should be enabled to see the effect. (set variable `ENABLE_STOP_ON_YSQL_DUMP_RESTORE_ERROR` into `True` in the `yb_backup.py`. Now it's `False`.) Jira: DB-9319 Test Plan: Set `ENABLE_STOP_ON_YSQL_DUMP_RESTORE_ERROR=True` in `yb_backup.py`. New tests: ybd --java-test org.yb.pgsql.TestYbBackup#testFailureOnExistingTablespaces ybd --java-test org.yb.pgsql.TestYbBackup#testIgnoreExistingTablespaces ybd --java-test org.yb.pgsql.TestYsqlDump#ysqlDumpAllWithoutYbMetadata Other related tests ybd --java-test org.yb.pgsql.TestYsqlDump#ysqlDumpAllWithYbMetadata ybd --java-test org.yb.pgsql.TestYbBackup#testGeoPartitioning ybd --java-test org.yb.pgsql.TestYbBackup#testGeoPartitioningNoRegions ybd --java-test org.yb.pgsql.TestYbBackup#testGeoPartitioningOneRegion ybd --java-test org.yb.pgsql.TestYbBackup#testGeoPartitioningRestoringIntoExisting ybd --java-test org.yb.pgsql.TestYbBackup#testGeoPartitioningWithTablespaces ybd --java-test org.yb.pgsql.TestYbBackup#testGeoPartitioningNoRegionsWithTablespaces ybd --java-test org.yb.pgsql.TestYbBackup#testGeoPartitioningOneRegionWithTablespaces ybd --java-test org.yb.pgsql.TestYbBackup#testGeoPartitioningRestoringIntoExistingWithTablespaces Reviewers: mihnea, tverona, yguan Reviewed By: yguan Subscribers: yugaware, yql Differential Revision: https://phorge.dev.yugabyte.com/D30956
- Loading branch information
1 parent
469f220
commit f6c3c86
Showing
6 changed files
with
405 additions
and
14 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
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
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
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
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
Oops, something went wrong.