2020-01-13 16:05:58 +01:00
|
|
|
[Back to table of contents](../../index.md)
|
|
|
|
|
|
|
|
----------
|
|
|
|
|
2019-12-17 12:42:52 +01:00
|
|
|
# Roll Back from an Upgrade
|
2019-10-17 16:59:01 +02:00
|
|
|
|
2020-01-13 16:05:58 +01:00
|
|
|
If, for any reason, you need to roll back to the previous version of Harbor, perform the following steps.
|
2019-10-17 16:59:01 +02:00
|
|
|
|
|
|
|
1. Stop and remove the current Harbor service if it is still running.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
cd harbor
|
|
|
|
docker-compose down
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Remove current Harbor instance.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
rm -rf harbor
|
|
|
|
```
|
|
|
|
|
2020-01-13 16:05:58 +01:00
|
|
|
3. Restore the older version of Harbor.
|
2019-10-17 16:59:01 +02:00
|
|
|
|
|
|
|
```sh
|
|
|
|
mv /my_backup_dir/harbor harbor
|
|
|
|
```
|
|
|
|
|
2020-01-13 16:05:58 +01:00
|
|
|
4. To restore the database, copy the data files from the backup directory to your data volume, which by default is `/data/database`.
|
2019-10-17 16:59:01 +02:00
|
|
|
|
2020-01-13 16:05:58 +01:00
|
|
|
5. Restart the Harbor service using the previous configuration.
|
|
|
|
|
|
|
|
If the previous version of Harbor was installed by a release build:
|
2019-10-17 16:59:01 +02:00
|
|
|
|
|
|
|
```sh
|
|
|
|
cd harbor
|
|
|
|
./install.sh
|
|
|
|
```
|
|
|
|
|
2020-01-13 16:05:58 +01:00
|
|
|
**NOTE**: While you can roll back an upgrade to the state before you started the upgrade, Harbor does not support downgrades.
|
|
|
|
|
|
|
|
----------
|
|
|
|
|
|
|
|
[Back to table of contents](../../index.md)
|