This repository was archived by the owner on Oct 29, 2023. It is now read-only.
  
  
  - 
                Notifications
    You must be signed in to change notification settings 
- Fork 153
sandbox upgrade
        Giuseppe Maxia edited this page Nov 6, 2020 
        ·
        2 revisions
      
    [HOME]
dbdeployer 1.10.0 introduces upgrades:
$ dbdeployer admin upgrade -h
Upgrades a sandbox to a newer version.
The sandbox with the new version must exist already.
The data directory of the old sandbox will be moved to the new one.
Usage:
  dbdeployer admin upgrade sandbox_name newer_sandbox [flags]
Examples:
dbdeployer admin upgrade msb_8_0_11 msb_8_0_12
Flags:
      --dry-run   Shows upgrade operations, but don't execute them
  -h, --help      help for upgrade
      --verbose   Shows upgrade operations
To perform an upgrade, the following conditions must be met:
- Both sandboxes must be single deployments.
- The older version must be one major version behind (5.6.x to 5.7.x, or 5.7.x to 8.0.x, but not 5.6.x to 8.0.x) or same major version but different revision (e.g. 5.7.22 to 5.7.23)
- The newer version must have been already deployed.
- The newer version must have mysql_upgradein its base directory (e.g$SANDBOX_BINARY/5.7.23/bin), but see below about this requirement being lifted for 8.0.16+.
dbdeployer checks all the conditions, then
- stops both databases;
- renames the data directory of the newer version;
- moves the data directory of the older version under the newer sandbox;
- restarts the newer version;
- runs mysql_upgrade(except with MySQL 8.0.16+, where the server does the upgrade on its own).
The older version is, at this point, not operational anymore, and can be deleted.