]> git.datanom.net - omvzfs.git/blobdiff - src/Snapshot.php
Removed some unused code.
[omvzfs.git] / src / Snapshot.php
index b30def21c05864a622e5ddb6aa6031c1ee3e68c6..fa51be0a63f35ba5ae1f60385e689f6507f6d91b 100644 (file)
@@ -159,6 +159,29 @@ class OMVModuleZFSSnapshot {
                $this->exec($cmd,$out,$res);
        }
 
+       /**
+        * Rollback a Snapshot on commandline.
+        *
+        * @return void
+        * @access public
+        */
+       public function rollback() {
+               $cmd = "zfs rollback " . $this->name . " 2>&1";
+               $this->exec($cmd,$out,$res);
+       }
+
+       /**
+        * Clones a Snapshot on commandline.
+        *
+        * @param string $newname
+        * @return void
+        * @access public
+        */
+       public function clonesnap($newname) {
+               $cmd = "zfs clone -p " . $this->name . " " . $newname . " 2>&1";
+               $this->exec($cmd,$out,$res);
+       }
+
        /**
         * Helper function to execute a command and throw an exception on error
         * (requires stderr redirected to stdout for proper exception message).
This page took 0.044003 seconds and 5 git commands to generate.