File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed
backup/bareos_pool_operations Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,8 @@ Action for the range of volumes in the pool with 'name_mask' (something like 'In
107107skip confirmation request or 'print' to get the info about the selected range of volumes. 'print' will not perform
108108changes in volume status, just output info. Specifying ` <pool_path_for_dumb> ` will affect only for 'dumb' action.
109109
110- Action 'dumb' will create a range of an empty volume files (via ` touch `
111- command). Creating 'dumb' volumes required when you have removed existing volume by mistake, but it still exists in a
112- Bareos database.
110+ Action 'dumb' will create a range of an empty volume files (via ` touch ` command). Creating 'dumb' volumes required when
111+ you have removed existing volume by mistake, but it still exists in a Bareos database.
113112
114113## Other Bareos troubleshooting examples
115114
Original file line number Diff line number Diff line change 8383[[ -z $VOL_OPT || $VOL_OPT =~ ^(force| print)$ ]] || { error " Error: option should be empty, 'force' or 'print'." ; }
8484[[ $VOL_START =~ ^[0-9]+$ ]] || { error " Error: start volume is not a number." ; }
8585[[ $VOL_END =~ ^[0-9]+$ ]] || { error " Error: end volume is not a number." ; }
86-
8786if $USAGE_ERR ; then
8887 usage
8988fi
9089
9190echo " WARNING! This will process selected range of volumes in Bareos pool:"
9291echo " ${VOL_ACTION} from ${VOL_START} to ${VOL_END} by mask ${VOL_MASK} "
93- read -p " Press Enter to proceed or Ctrl+C to abort..."
92+ read -r - p " Press Enter to proceed or Ctrl+C to abort..."
9493
95- if [[ $VOL_ACTION == " dumb" ]]; then
96- for RANGE_ITEM in $( seq -w " $VOL_START " " $VOL_END " ) ; do
97- RANGE_FILE=" $VOL_MASK$RANGE_ITEM "
98- echo " Creating an empty '$RANGE_FILE '..."
99- touch " $VOL_PATH /$RANGE_FILE "
100- done
101- else
102- for RANGE_ITEM in $( eval " echo {$VOL_START ..$VOL_END }" ) ; do
94+ for RANGE_ITEM in $( seq -w " $VOL_START " " $VOL_END " ) ; do
95+ if [[ $VOL_ACTION == " dumb" ]]; then
96+ echo " Creating an empty '${VOL_MASK}${RANGE_ITEM} '..."
97+ touch " $VOL_PATH /${VOL_MASK}${RANGE_ITEM} "
98+ else
10399 echo " ${VOL_ACTION} volume: ${VOL_MASK}${RANGE_ITEM} $VOL_OPT "
104100 if [[ $VOL_OPT != ' print' ]]; then
105101 echo " ${VOL_ACTION} volume=${VOL_MASK}${RANGE_ITEM} $( [[ $VOL_OPT == ' force' ]] && echo ' yes' ) " | bconsole
106102 fi
107- done
108- fi
103+ fi
104+ done
You can’t perform that action at this time.
0 commit comments