Added support to replicate and restore from multiple backup pools
[zfs-ubuntu/.git] / zfs-replicate
index b3f7cffd16d31dc3bbfa44df3ce5b7cdd2840b5f..9dfd9f8cbef7997e28bb6bd9ce72d164ce812250 100755 (executable)
@@ -18,6 +18,13 @@ remote=$1
 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