Skip to content

Commit

Permalink
Added rollback logic
Browse files Browse the repository at this point in the history
Signed-off-by: sougata-progress <[email protected]>
  • Loading branch information
sougata-progress committed Nov 7, 2024
1 parent f1d0b03 commit 1463705
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/minio-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ function upload_bucket_objects () {
aws ${opts[*]} s3 sync $waypoint $s3_url
}

function minio_migration_rollback () {
sudo cp -a /hab/svc/builder-minio/data-bkp/. /hab/svc/builder-minio/data/
sudo hab svc load "${BLDR_ORIGIN}/builder-minio" --channel "stable" --force
}

function preflight_checks () {
_prerequisites_check
_minio_check
Expand Down Expand Up @@ -268,6 +273,7 @@ case "${1}" in
upgrade ) upgrade_minio ;;
downgrade ) downgrade_minio ;;
upload ) upload_bucket_objects ;;
minio_rollback ) minio_migration_rollback ;;
* ) usage ;;
esac

0 comments on commit 1463705

Please sign in to comment.