Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

feat: add support for Point In Time Recovery (PITR) - #148

Merged
larkee merged 8 commits into
googleapis:masterfrom
larkee:pitr-support
Feb 22, 2021
Merged

feat: add support for Point In Time Recovery (PITR)#148
larkee merged 8 commits into
googleapis:masterfrom
larkee:pitr-support

Conversation

@larkee

@larkeelarkee commented Oct 7, 2020

Copy link
Copy Markdown
Contributor

Implements support for PITR.

With this functionality users will be able to:

  • set the retention period for their databases.
  • set version time of the database when creating a backup

Creating a backup with a specific version time is shown below:

backup = instance.backup(backup_id, expire_time=expire_time, version_time=version_time)
backup.create()

@larkeelarkee added the api: spanner Issues related to the googleapis/python-spanner API. label Oct 7, 2020
@google-clagoogle-claBot added the cla: yes This human has signed the Contributor License Agreement. label Oct 7, 2020
@larkeelarkee added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Oct 7, 2020
@larkee
larkee marked this pull request as ready for review October 7, 2020 23:37
@larkee
larkee requested a review from a teamOctober 7, 2020 23:37
@larkee
larkee requested a review from a team as a code ownerOctober 7, 2020 23:37
@larkee
larkee requested a review from dinagravesOctober 7, 2020 23:37
@larkeelarkee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 8, 2020
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 8, 2020
@larkee
larkee removed the request for review from dinagravesOctober 8, 2020 04:21

@thiagotnunesthiagotnunes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@larkee
larkeeforce-pushed the pitr-support branch 2 times, most recently from fade85a to b41da25CompareNovember 24, 2020 08:33
Comment threadtests/system/test_system.py Outdated
Comment threadtests/system/test_system.py Outdated
@thiagotnunes

Copy link
Copy Markdown
Contributor

LGTM

@thiagotnunesthiagotnunes changed the title feat: add support for PITR-litefeat: Point In Time Recovery (PITR)Feb 4, 2021
@thiagotnunesthiagotnunes mentioned this pull request Feb 4, 2021
@larkeelarkee changed the title feat: Point In Time Recovery (PITR)feat: add support for Point In Time Recovery (PITR)Feb 4, 2021
larkeeand others added 8 commits February 5, 2021 21:41
* Backup changes
* Basic tests
* Add system tests
* Fix system tests
* Add retention period to backup systests
* Remove unnecessary retention period setting
* Fix systests
* Remove unnecessary retention period setting
* Fix systests
* Review changes
@larkeelarkee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 5, 2021
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 5, 2021
@larkeelarkee removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 22, 2021
@larkee
larkee merged commit a082e5d into googleapis:masterFeb 22, 2021
gcf-merge-on-greenBot pushed a commit that referenced this pull request Feb 23, 2021
This PR fixes the assertion to use `metadata.backup_info.version_time` instead of `metadata.backup_info.create_time`. It looks it was passing before the backend correctly supported it and I forgot to re-run the tests before merging #148 (whoops!) and so it is currently failing and preventing #205 from being merged:
https://source.cloud.google.com/results/invocations/8f0f5dab-1b35-4ce3-bb72-0ce9e79ab89d/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fpython-spanner%2Fpresubmit%2Fpresubmit/log
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spannerIssues related to the googleapis/python-spanner API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@larkee@thiagotnunes@yoshi-kokoro@zoercai