// mount a new file system to a temporary location
out.println("Opening "+target);
ZFSFileSystem hudson = zfs.open(target, ZFSFileSystem.class);
hudson.setMountPoint(tmpDir);
hudson.setProperty("hudson:managed-by","hudson"); // mark this file system as "managed by Hudson"
hudson.mount();
// copy all the files
out.println("Copying all existing data files");
if(system(home,listener, "/usr/bin/cp","-pR",".", tmpDir.getAbsolutePath())!=0) {
out.println("Failed to copy "+home+" to "+tmpDir);