update aurora
This commit is contained in:
@@ -32,19 +32,19 @@ run_sql() {
|
||||
}
|
||||
|
||||
show_info() {
|
||||
echo "Source Schema: ${SCHEMA}"
|
||||
echo "Target Schema: ${AURORA}"
|
||||
echo "Target Schema User: ${AURORA_SCHEMA_USER}"
|
||||
echo "Company Name: ${COMPNYNAME}"
|
||||
echo "Export Directory: ${AURORA_TEMP_DIR}"
|
||||
echo "Log File: ${LOGFILE}"
|
||||
echo "Source Schema: ${SCHEMA}"
|
||||
echo "Target Schema: ${AURORA}"
|
||||
echo "Target Schema User: ${AURORA_SCHEMA_USER}"
|
||||
echo "Company Name: ${COMPNYNAME}"
|
||||
echo "Export Directory: ${AURORA_TEMP_DIR}"
|
||||
echo "Log File: ${LOGFILE}"
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-n | -c | -i]"
|
||||
echo " -n (new) : Export, import, and rename. (No privileges or post-scripts)"
|
||||
echo " -c (complete) : Drop, export, import, grant privileges, and run post-scripts."
|
||||
echo " -i (info) : Show configuration information."
|
||||
echo "Usage: $0 [new | complete | info]"
|
||||
echo " new : Export, import, and rename. (No privileges or post-scripts)"
|
||||
echo " complete : Drop, export, import, grant privileges, and run post-scripts."
|
||||
echo " info : Show configuration information."
|
||||
}
|
||||
|
||||
export_schema() {
|
||||
@@ -96,15 +96,14 @@ if [ $# -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while getopts "nci" option; do
|
||||
case "$option" in
|
||||
n)
|
||||
case "$1" in
|
||||
new)
|
||||
log "=== Starting 'new' operation ==="
|
||||
export_schema
|
||||
import_and_rename
|
||||
log "=== 'New' operation finished successfully ==="
|
||||
;;
|
||||
c)
|
||||
complete)
|
||||
log "=== Starting 'complete' operation ==="
|
||||
drop_aurora_schema
|
||||
export_schema
|
||||
@@ -113,13 +112,12 @@ while getopts "nci" option; do
|
||||
run_post_scripts
|
||||
log "=== 'Complete' operation finished successfully ==="
|
||||
;;
|
||||
i)
|
||||
info)
|
||||
show_info
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid option."
|
||||
echo "Error: Invalid argument '$1'."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user