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

parser,backupccl: add BACKUP INTO 'subdir' IN x #53139

Merged
merged 1 commit into from Aug 21, 2020

Conversation

adityamaru
Copy link
Contributor

Fixes: #52929

@adityamaru adityamaru requested review from dt, pbardea and a team August 20, 2020 17:29
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@adityamaru
Copy link
Contributor Author

adityamaru commented Aug 20, 2020

Will rebase once #53060 is merged in.

@adityamaru
Copy link
Contributor Author

rebased and RFAL @dt @pbardea

pkg/sql/sem/tree/backup.go Show resolved Hide resolved
@dt
Copy link
Member

dt commented Aug 21, 2020

Oh, and I missed on first pass, but any addition to sql.y should be covered by cases in parse_test.go (they're very easy to add though)

pkg/sql/parser/parse_test.go Show resolved Hide resolved
This change allows a user to specify a particular subdirectory of x to
write their BACKUPs too. The semantics of determining whether it will be
a full or incremental BACKUP are untouched.

Example query: `BACKUP INTO 'foo' IN 'nodelocal://0/bar'`
would write the BACKUP data and manifest
files to `extern/bar/foo/`. The LATEST file would be written to
`extern/bar/` and would point to `/foo/`.

This change also modifies how we display the BACKUP statements in the
job description.
- `BACKUP TO x` (remains unchanged) -> `BACKUP TO x`
- `BACKUP INTO x` -> `BACKUP INTO 'resolved-subdir' IN x`
- `BACKUP INTO LATEST IN x` -> `BACKUP INTO 'value-in-LATEST' IN x`
- `BACKUP INTO 'foo' IN x` -> `BACKUP INTO 'foo' IN x`

Release note (sql change): Users can now specify which subdirectory they
wish to write a BACKUP to, via `BACKUP INTO 'subdir' IN x`.  This will
write BACKUP data to `x/subdir/`.
@adityamaru
Copy link
Contributor Author

TFTR!

bors=dt

@adityamaru
Copy link
Contributor Author

bors r=dt

@craig
Copy link
Contributor

craig bot commented Aug 21, 2020

Build succeeded:

@craig craig bot merged commit 5d84576 into cockroachdb:master Aug 21, 2020
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.

backup: BACKUP INTO shows up as BACKUP TO in jobs
3 participants