-# Mount the local backup pool if needed and the option is given to do so, else error out
-zpool list -H "$backup_pool" >/dev/null 2>&1
+# Replicate every zfs filesystem specified in the config file
+echo "$date ZFS replicate started" >> $logfile
+echo "$date ZFS replicate started" | tee -a $mylogfile
+
+# Loop over each backup pool
+backup_pools=$backup_pool
+for backup_pool in $backup_pools; do
+
+# Import the local backup pool if needed and the option is given to do so, else error out
+zpool list -H $backup_pool > $tmpfile 2>&1