Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the description of incremental backups with locality aware #19398

Merged
merged 4 commits into from
Mar 18, 2025

Conversation

katmayb
Copy link
Contributor

@katmayb katmayb commented Feb 24, 2025

Fixes DOC-12344

Adjust the sentence in v24.3 + v25.1 regarding locality-aware incremental backups to clarify that the the storage URI + the COCKROACH_LOCALITY region must match the related full backup.

Copy link

netlify bot commented Feb 24, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 1f7bb30
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/67d983c850d99400089d4dbb

Copy link

netlify bot commented Feb 24, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 1f7bb30
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/67d983c860a54f00082d8b0d

Copy link

netlify bot commented Feb 24, 2025

Netlify Preview

Name Link
🔨 Latest commit 1f7bb30
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/67d983c8559a4500084ba646
😎 Deploy Preview https://deploy-preview-19398--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@katmayb katmayb requested a review from kev-cao February 24, 2025 17:27
@katmayb
Copy link
Contributor Author

katmayb commented Feb 24, 2025

@kev-cao I applied the proposed changes to v24.3 + v25.1 with the removal of the old syntax — is that correct? Or, does the change need to apply to other versions?

@@ -130,7 +130,7 @@ To restore from a specific backup, use [`RESTORE FROM {subdirectory} IN ...`]({%

## Create an incremental locality-aware backup

If you backup to a destination already containing a [full backup]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#full-backups), an [incremental backup]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#incremental-backups) will be appended to the full backup in a subdirectory. When you're taking an incremental backup, you must ensure that the incremental backup localities match the full backup localities otherwise you will receive an error. Alternatively, take another full backup with the matching localities before running the incremental backup.
If you back up to a destination already containing a [full backup]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#full-backups), an [incremental backup]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#incremental-backups) will be appended to the full backup in a subdirectory. To take a locality-aware incremental backup and restore from it successfully, you must maintain the same storage URI and `COCKROACH_LOCALITY` mappings that were established by the corresponding full backup. Alternatively, take another full backup with the matching localities and URIs before running the incremental backup.
Copy link

Choose a reason for hiding this comment

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

I think there was some confusion/ambiguity with my answer in Slack. The incremental mappings don't have to match the full backup mappings, they just have to be consistent. So if with one BACKUP command you have incremental_location = ('foo?region=us-east', 'bar?region=us-west', 'baz?region=us-central'), then that mapping must be maintained for all incrementals in that chain. @dt if you could confirm this behavior that'd be helpful!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @kev-cao, are you only to referring to incremental_location in your comment here? Or, all incrementals? I haven't changed the text for the incremental_location option on this page. This update is only referring to regular incrementals — so I want to check whether I need to adjust the edits I've made or not.

Copy link

@kev-cao kev-cao left a comment

Choose a reason for hiding this comment

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

LGTM!

@katmayb katmayb requested a review from rmloveland March 17, 2025 12:35
Copy link
Contributor

@rmloveland rmloveland left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -130,7 +130,7 @@ To restore from a specific backup, use [`RESTORE FROM {subdirectory} IN ...`]({%

## Create an incremental locality-aware backup

If you backup to a destination already containing a [full backup]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#full-backups), an [incremental backup]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#incremental-backups) will be appended to the full backup in a subdirectory. When you're taking an incremental backup, you must ensure that the incremental backup localities match the full backup localities otherwise you will receive an error. Alternatively, take another full backup with the matching localities before running the incremental backup.
If you back up to a destination already containing a [full backup]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#full-backups), an [incremental backup]({% link {{ page.version.version }}/take-full-and-incremental-backups.md %}#incremental-backups) will be appended to the full backup in a subdirectory. To take a locality-aware incremental backup and restore from it successfully, you must maintain the same storage URI to `COCKROACH_LOCALITY` parameter mappings for all incrementals in the backup collection. Alternatively, take another full backup with the necessary storage URI to `COCKROACH_LOCALITY` mapping before running an incremental backup.
Copy link
Contributor

Choose a reason for hiding this comment

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

a tiny thing, but i had to look up that COCKROACH_LOCALITY is a query parameter to the backup URI. Suggest editing slightly to "... to COCKROACH_LOCALITY query parameter mappings ..."

@katmayb katmayb force-pushed the locality-aware-uri-map branch from f693140 to 1f7bb30 Compare March 18, 2025 14:31
@katmayb katmayb merged commit 33eec2f into main Mar 18, 2025
6 checks passed
@katmayb katmayb deleted the locality-aware-uri-map branch March 18, 2025 15:10
@katmayb
Copy link
Contributor Author

katmayb commented Mar 18, 2025

TFTRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants