# backupdir = < path/to/destination > (default = /var/backups/mysql)
# where to dump the backups. hotcopy backups will be in a subdirectory
# 'hotcopy' and sqldump backups will be in a subdirectory 'sqldump'
+# This variable is interpolated, see backup.d (5) for which variables are
+# available.
#
# hotcopy = < yes | no > (default = no)
# make a backup of the actual database binary files using mysqlhotcopy.
else
vroot=""
vexec=""
+ vsname=""
fi
+interpolated=`interpolate "$backupdir" "$vsname"`
+
# create backup dirs, $vroot will be empty if no vsname was specified
# and we will instead proceed to operate on the host
-[ -d $vroot$backupdir ] || mkdir -p $vroot$backupdir
-[ -d $vroot$backupdir ] || fatal "Backup directory '$vroot$backupdir'"
-hotdir="$backupdir/hotcopy"
-dumpdir="$backupdir/sqldump"
+[ -d $vroot$interpolated ] || mkdir -p $vroot$interpolated
+[ -d $vroot$interpolated ] || fatal "Backup directory '$vroot$backupdir'"
+
+hotdir="$interpolated/hotcopy"
+dumpdir="$interpolated/sqldump"
[ "$sqldump" == "no" -o -d $vroot$dumpdir ] || mkdir -p $vroot$dumpdir
[ "$hotcopy" == "no" -o -d $vroot$hotdir ] || mkdir -p $vroot$hotdir