mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 20:26:13 +01:00
Merge branch 'master' of https://github.com/saga92/harbor
This commit is contained in:
commit
9ea0d51984
@ -16,6 +16,10 @@ Migration is a module for migrating database schema between different version of
|
|||||||
- show instruction of harbor-migration
|
- show instruction of harbor-migration
|
||||||
|
|
||||||
```docker run your-image-name help```
|
```docker run your-image-name help```
|
||||||
|
|
||||||
|
- test mysql connection in harbor-migration
|
||||||
|
|
||||||
|
```docker run -v /data/database:/var/lib/mysql your-image-name test```
|
||||||
|
|
||||||
- create backup file in `/path/to/backup`
|
- create backup file in `/path/to/backup`
|
||||||
|
|
||||||
@ -33,15 +37,14 @@ Migration is a module for migrating database schema between different version of
|
|||||||
|
|
||||||
```docker run -ti -v /data/database:/var/lib/mysql your-image-name up head```
|
```docker run -ti -v /data/database:/var/lib/mysql your-image-name up head```
|
||||||
|
|
||||||
- perform database schema downgrade(downgrade has been disabled)
|
you can use `-v /etc/localtime:/etc/localtime` to sync container timezone with host timezone.
|
||||||
|
|
||||||
```docker run -v /data/database:/var/lib/mysql your-image-name down base```
|
|
||||||
|
|
||||||
|
you may change `/data/database` to the mysql volumes path you set in docker-compose.yml.
|
||||||
###migration step
|
###migration step
|
||||||
- step 1: stop and remove harbor service
|
- step 1: stop and remove harbor service
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose stop && docker-compose rm -f
|
docker-compose down
|
||||||
```
|
```
|
||||||
- step 2: perform migration operation
|
- step 2: perform migration operation
|
||||||
- step 3: rebuild newest harbor images and restart service
|
- step 3: rebuild newest harbor images and restart service
|
||||||
|
Loading…
Reference in New Issue
Block a user