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
107
107
skip confirmation request or 'print' to get the info about the selected range of volumes. 'print' will not perform
108
108
changes in volume status, just output info. Specifying ` <pool_path_for_dumb> ` will affect only for 'dumb' action.
109
109
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.
113
112
114
113
## Other Bareos troubleshooting examples
115
114
Original file line number Diff line number Diff line change 83
83
[[ -z $VOL_OPT || $VOL_OPT =~ ^(force| print)$ ]] || { error " Error: option should be empty, 'force' or 'print'." ; }
84
84
[[ $VOL_START =~ ^[0-9]+$ ]] || { error " Error: start volume is not a number." ; }
85
85
[[ $VOL_END =~ ^[0-9]+$ ]] || { error " Error: end volume is not a number." ; }
86
-
87
86
if $USAGE_ERR ; then
88
87
usage
89
88
fi
90
89
91
90
echo " WARNING! This will process selected range of volumes in Bareos pool:"
92
91
echo " ${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..."
94
93
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
103
99
echo " ${VOL_ACTION} volume: ${VOL_MASK}${RANGE_ITEM} $VOL_OPT "
104
100
if [[ $VOL_OPT != ' print' ]]; then
105
101
echo " ${VOL_ACTION} volume=${VOL_MASK}${RANGE_ITEM} $( [[ $VOL_OPT == ' force' ]] && echo ' yes' ) " | bconsole
106
102
fi
107
- done
108
- fi
103
+ fi
104
+ done
You can’t perform that action at this time.
0 commit comments