github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/COMPATIBILITY_TEST.md (about)

     1  # Compatibility test
     2  
     3  ## Background
     4  
     5  We had some incompatibility issues in the past, which made BR cannot restore backed up data in some situations.
     6  So we need a test workflow to check the compatiblity.
     7  
     8  ## Goal
     9  
    10  - Ensure backward compatibility for restoring data from the previous 3 minor versions
    11  
    12  ## Workflow
    13  
    14  ### Data Preparation
    15  
    16  This workflow needs previous backup data. To get this data. we perform the following steps
    17  
    18  - Run a TiDB cluster with previous version.
    19  - Run backup jobs with corresponding BR version, with different storages (s3, gcs).
    20  
    21  Given we test for the previous 3 versions, and there are 2 different storage systems, we will produce 6 backup archives for 6 separate compatibility tests.
    22  
    23  ### Test Content
    24  
    25  - Start TiDB cluster with nightly version.
    26  - Build BR binary with current directory.
    27  - Use BR to restore different version backup data one by one.
    28  - Make sure restore data is expected.
    29  
    30  ### Running tests
    31  
    32  Start a cluster with docker-compose and Build br with latest version.
    33  
    34  ```sh
    35  docker-compose -f docker-compose.yaml rm -s -v && \
    36  docker-compose -f docker-compose.yaml build && \
    37  docker-compose -f docker-compose.yaml up --remove-orphans
    38  ```
    39  
    40  ```sh
    41  docker-compose -f docker-compose.yaml control make compatibility_test
    42  ```