If, for any reason, you need to roll back to the previous version of Harbor, perform the following steps.

    To roll back from an upgrade, you must have backed up the previous version of Harbor. For information about backing up Harbor before an upgrade, see Upgrade Harbor and Migrate Data.

    Harbor 2.2 is compiled by Golang 1.15 which deprecated self signed certificate without SAN. If you enabled internal TLS and cert files are generated by Harbor prepare script, you must generate the internal certificates again, using command like this docker run -v /:/hostfs goharbor/prepare:v2.2.0 gencert -p /path/to/internal/tls/cert The certs generated by the old version prepare script didn’t include the SAN extension. If you manage the certs file, make the SAN is included, if not please check Configure Internal TLS communication between Harbor Component. For more information about Go’s break please refer release note of Go 1.5 and this issue.

    1. Stop and remove the current Harbor service if it is still running.

      1. cd harbor
      2. docker compose down
    2. Remove current Harbor instance.

      1. rm -rf harbor
    3. Restore the older version of Harbor.

      1. mv /my_backup_dir/harbor harbor
    4. To restore the database, copy the data files from the backup directory to your data volume, which by default is /data/database.

    5. Restart the Harbor service using the previous configuration.

      If the previous version of Harbor was installed by a release build:

      1. cd harbor
      2. ./install.sh

    While you can roll back an upgrade to the state before you started the upgrade, Harbor does not support downgrades.