output
This commit is contained in:
parent
70109420c9
commit
8456f40fd2
@ -4,8 +4,8 @@
|
||||
backup(){
|
||||
echo_backup+=("\nNumber of backups was set to $number_of_backups")
|
||||
date=$(date '+%Y_%m_%d_%H_%M_%S')
|
||||
[[ "$verbose" == "true" ]] && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"'
|
||||
[[ -z "$verbose" ]] && echo_backup+=("\nNew Backup Name:") && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"' | tail -n 1
|
||||
[[ "$verbose" == "true" ]] && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"' &> /dev/null && echo_backup+=(HeavyScript_"$date")
|
||||
[[ -z "$verbose" ]] && echo_backup+=("\nNew Backup Name:") && cli -c 'app kubernetes backup_chart_releases backup_name=''"'HeavyScript_"$date"'"' | tail -n 1 &> /dev/null && echo_backup+=(HeavyScript_"$date")
|
||||
mapfile -t list_backups < <(cli -c 'app kubernetes list_backups' | grep "HeavyScript_" | sort -t '_' -Vr -k2,7 | awk -F '|' '{print $2}'| tr -d " \t\r")
|
||||
if [[ ${#list_backups[@]} -gt "number_of_backups" ]]; then
|
||||
echo_backup+=("\nDeleting the oldest backup(s) for exceeding limit:")
|
||||
|
@ -137,7 +137,7 @@ done
|
||||
[[ "$restore" == "true" ]] && restore && exit
|
||||
[[ "$mount" == "true" ]] && mount && exit
|
||||
if [[ "$number_of_backups" -ge 1 && "$sync" == "true" ]]; then # Run backup and sync at the same time
|
||||
echo "Backing up and syncing catalogs at the same time, please wait for output.."
|
||||
echo -e "Backing up and syncing catalogs at the same time, please wait for output..\n"
|
||||
backup &
|
||||
sync &
|
||||
wait
|
||||
|
Loading…
Reference in New Issue
Block a user