update hanamgr
This commit is contained in:
+18
-6
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Version: 1.1.0
|
# Version: 1.2.0
|
||||||
# Author: Tomi Eckert
|
# Author: Tomi Eckert
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# HANA Database Manager Menu (hanamgr.sh)
|
# HANA Database Manager Menu (hanamgr.sh)
|
||||||
@@ -86,7 +86,7 @@ select_schema() {
|
|||||||
echo -e "\n\033[1mAvailable Schemas:\033[0m"
|
echo -e "\n\033[1mAvailable Schemas:\033[0m"
|
||||||
for i in "${!schemas[@]}"; do
|
for i in "${!schemas[@]}"; do
|
||||||
echo "$((i+1))) ${schemas[$i]}"
|
echo "$((i+1))) ${schemas[$i]}"
|
||||||
fi
|
done
|
||||||
echo "0) Enter manually"
|
echo "0) Enter manually"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -113,8 +113,14 @@ do_export() {
|
|||||||
select_schema "$user_key"
|
select_schema "$user_key"
|
||||||
local schema_name="$SELECTED_SCHEMA"
|
local schema_name="$SELECTED_SCHEMA"
|
||||||
read -p "Enter Target Directory Path: " target_path
|
read -p "Enter Target Directory Path: " target_path
|
||||||
read -p "Number of threads (default: 1): " threads
|
|
||||||
threads=${threads:-1}
|
local max_threads=$(nproc 2>/dev/null || echo 1)
|
||||||
|
local half_threads=$((max_threads / 2))
|
||||||
|
[[ $half_threads -lt 1 ]] && half_threads=1
|
||||||
|
|
||||||
|
read -p "Number of threads (default: $half_threads, max: $max_threads): " threads
|
||||||
|
threads=${threads:-$half_threads}
|
||||||
|
|
||||||
read -p "Compress output as tar.gz? (y/N): " compress
|
read -p "Compress output as tar.gz? (y/N): " compress
|
||||||
|
|
||||||
if [[ -z "$user_key" || -z "$schema_name" || -z "$target_path" ]]; then
|
if [[ -z "$user_key" || -z "$schema_name" || -z "$target_path" ]]; then
|
||||||
@@ -182,8 +188,14 @@ do_import() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Enter Source Path (Directory or .tar.gz): " source_path
|
read -p "Enter Source Path (Directory or .tar.gz): " source_path
|
||||||
read -p "Number of threads (default: 1): " threads
|
|
||||||
threads=${threads:-1}
|
local max_threads=$(nproc 2>/dev/null || echo 1)
|
||||||
|
local half_threads=$((max_threads / 2))
|
||||||
|
[[ $half_threads -lt 1 ]] && half_threads=1
|
||||||
|
|
||||||
|
read -p "Number of threads (default: $half_threads, max: $max_threads): " threads
|
||||||
|
threads=${threads:-$half_threads}
|
||||||
|
|
||||||
read -p "Replace existing objects? (y/N): " replace_opt
|
read -p "Replace existing objects? (y/N): " replace_opt
|
||||||
|
|
||||||
if [[ -z "$user_key" || -z "$schema_name" || -z "$source_path" ]]; then
|
if [[ -z "$user_key" || -z "$schema_name" || -z "$source_path" ]]; then
|
||||||
|
|||||||
+1
-1
@@ -16,4 +16,4 @@ SCRIPT_PACKAGES["monitor"]="Monitor Suite|1.3.1|Scripts for monitoring system he
|
|||||||
SCRIPT_PACKAGES["keymanager"]="Key Manager|1.2.3|A utility for managing HDB user keys for SAP HANA.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/keymanager.sh"
|
SCRIPT_PACKAGES["keymanager"]="Key Manager|1.2.3|A utility for managing HDB user keys for SAP HANA.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/keymanager.sh"
|
||||||
SCRIPT_PACKAGES["cleaner"]="File Cleaner|1.1.0|A simple script to clean up temporary files and logs.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/cleaner.sh"
|
SCRIPT_PACKAGES["cleaner"]="File Cleaner|1.1.0|A simple script to clean up temporary files and logs.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/cleaner.sh"
|
||||||
SCRIPT_PACKAGES["hanatool"]="HANA Tool|1.6.0|A command-line tool for various SAP HANA administration tasks.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hanatool.sh"
|
SCRIPT_PACKAGES["hanatool"]="HANA Tool|1.6.0|A command-line tool for various SAP HANA administration tasks.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hanatool.sh"
|
||||||
SCRIPT_PACKAGES["hanamgr"]="HANA Manager UI|1.1.0|An interactive command-line menu for managing SAP HANA schemas and databases.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hanamgr.sh"
|
SCRIPT_PACKAGES["hanamgr"]="HANA Manager UI|1.2.0|An interactive command-line menu for managing SAP HANA schemas and databases.|https://git.technopunk.space/tomi/Scripts/raw/branch/main/hanamgr.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user