kopia lustrzana https://github.com/loomchild/volume-backup
avoid backing-up empty volumes to avoid typos
rodzic
222b9b170e
commit
3b77acf1c1
|
@ -6,6 +6,11 @@ usage() {
|
|||
}
|
||||
|
||||
backup() {
|
||||
if [ -z "$(ls -A /volume)" ]; then
|
||||
>&2 echo "Volume is empty or missing, check if you specified a correct name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ "$ARCHIVE" == "-" ]; then
|
||||
mkdir -p `dirname /backup/$ARCHIVE`
|
||||
fi
|
||||
|
|
Ładowanie…
Reference in New Issue