remote_fs=$2
remote_pool=${2%%/*}
+# get the backup pool from the command line or the config file if not specified
+if [[ -n $3 ]]; then
+ backup_pool=$3
+else
+ backup_pool=${backup_pool%% *} # use the first backup pool if none specified
+fi
+
# Setup our cleanup and exit trap
cleanup() {
if [[ -e "$local_list" ]]; then