Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow skip backup on upgrade #3728

Merged
merged 1 commit into from
Jan 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions dockerfiles/base/scripts/base/commands/cmd_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ cmd_upgrade() {
debug $FUNCNAME

CHE_IMAGE_VERSION=$(get_image_version)
DO_BACKUP="true"

while [ $# -gt 0 ]; do
case $1 in
--skip-backup)
DO_BACKUP="false"
shift ;;
*) error "Unknown parameter: $1; did you mean --skip-backup?" ; return 2 ;;
esac
done

# If we got here, this means:
# image version > configured & installed version
Expand All @@ -39,8 +49,13 @@ cmd_upgrade() {
cmd_stop
fi
fi
info "upgrade" "Preparing backup..."
cmd_backup

if [[ "${DO_BACKUP}" == "true" ]]; then
info "upgrade" "Preparing backup..."
cmd_backup
else
info "upgrade" "Skipping backup."
fi

info "upgrade" "Reinitializing the system with your configuration..."
cmd_init --accept-license --reinit
Expand Down