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

backupccl: disallow restore of backups older than the minimum supported binary version #93804

Closed
wants to merge 15 commits into from

Commits on Jan 10, 2023

  1. backupccl: disallow restore of backups older than the minimum support…

    …ed binary version
    
    As outlined in https://www.cockroachlabs.com/docs/v22.2/restoring-backups-across-versions.html,
    we do not support restoring backups older than one major version. This
    patch enforces this in restore code by ensuring that the manifest's version is greater
    than equal to the minimum supported binary version of the cluster.
    
    Release note (sql change): Backups older than one major version
    from the cluster's current active version are not restoreable as per
    the policy in https://www.cockroachlabs.com/docs/v22.2/restoring-backups-across-versions.html.
    
    Fixes: cockroachdb#94295
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    d67145d View commit details
    Browse the repository at this point in the history
  2. backupccl: remove interleaved tables test

    Interleaved tables were removed >1 major version in
    the past and so a backup restoreable in 23.1 cannot contain
    interleaved tables.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    0bf5b57 View commit details
    Browse the repository at this point in the history
  3. backupccl: remove exceptional backups

    The xDBRef and duplicate-db exceptional backups
    can no longer be restored since they were generated
    >1 major version in the past. This change does add
    a test inspired by the duplicate-db test to expand
    coverage.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    4a502c6 View commit details
    Browse the repository at this point in the history
  4. backupccl: remove fk revision history test

    This change removes the test that was added as part of
    were correctly upgraded on restore to 20.x+ versions.
    Backups taken one major release ago will no longer have
    these old style fks and so this test serves better as a
    regular test on this branch.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    1fc653b View commit details
    Browse the repository at this point in the history
  5. backupccl: update cluster fixture and remove 20.1 zcfg fixutre

    This change removes old cluster restore fixtures, and replaces them
    with a cluster backup from 22.2.0. It also removes a 20.1 fixture that
    tested restore of a zoneconfig privilege that was overwritten as the usage
    privilege in 20.2+ versions. This test has been migrated to a regular
    test instead.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    e6ef537 View commit details
    Browse the repository at this point in the history
  6. backupccl: removes old MR backup fixture

    This change removes an old MR backup that was being
    restored and tested against. There were no instructions
    on how to regenerate the fixture in cockroachdb#69725 so it is being
    deleted.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    ce983a7 View commit details
    Browse the repository at this point in the history
  7. backupccl: remove public schema remap fixtures

    Prior to 22.2 the public schema was not backed by
    a descriptor. These fixtures tested that a restore
    of a pre 22.2 backup would remap the synthetic public
    schema to a descriptor backed public schema. Since the
    only restoreable backups on this branch will be from
    22.2 onwards, we should never see a synthetic public schema
    in a restoreable backup.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    dc672f8 View commit details
    Browse the repository at this point in the history
  8. backupccl: delete TestRestoreOldBackupMissingOfflineIndexes

    The backup fixtures in this test were generated on 20.2 where
    cockroachdb#62564 existed.
    Given this was >1 major version in the past we do not expect to
    see a reoccurrence of the bug in 22.2+ backups that are restoreable
    in this release.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    f921f0b View commit details
    Browse the repository at this point in the history
  9. backupccl: remove dropped schema 20.2.7 fixture

    This fixture captured a bug in 20.2.7 that has since
    been fixed. This change removes the fixture and moves it
    to a regular regression test.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    58041aa View commit details
    Browse the repository at this point in the history
  10. backupccl: delete exports without interleaved

    These fixtures were generate on older version of
    Cockroach that are no longer restoreable. The test
    has been migrated to a regular datadriven test.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    5d62c34 View commit details
    Browse the repository at this point in the history
  11. backupccl: regenerate sequences fixture on 22.2.0

    This change regenerate the sequences backup fixture on 22.2.0.
    While there have been no changes to the representation of sequences
    between 22.2 and 23.1 it seemed useful to keep a cross version
    backup test of this nature.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    724d7b4 View commit details
    Browse the repository at this point in the history
  12. backupccl: delete fixtures for users with no ID

    All users in 22.2+ clusters will have IDs and so
    will the backups taken on these clusters. Thus, there
    is no need to keep around the cross version test
    that tests the custom restore func that injects a
    user ID.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    4d6e314 View commit details
    Browse the repository at this point in the history
  13. backupccl: regenerate fixtures for restoring mid schema change

    This change regenerates the fixtures for testing
    restores of backups that have been taken before or after
    the backfill portion of a schemachange. Note these tests
    rely on the old schemachanger and do not increase our test
    coverage with the new declarative schema changer.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    7933c3c View commit details
    Browse the repository at this point in the history
  14. backupccl: delete missing-import backup test

    This test was testing a bug that was discovered during
    backups in pre-22.2 versions cockroachdb#88042.
    Since this bug does not exist on 22.2+ versions
    this test will not encounter the expected corruption
    on backups that are restoreable in this cluster.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    92c196d View commit details
    Browse the repository at this point in the history
  15. backupccl: add env variable to disable version checking

    This change adds an env variable that will be set by the
    job running restore roachtests until we have updated all their
    fixtures to be 22.2.0+.
    
    Release note: None
    adityamaru committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    358c0bb View commit details
    Browse the repository at this point in the history