Editing Auto snapshots

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 15: Line 15:
 
  gem build zfstools.gemspec
 
  gem build zfstools.gemspec
  
Install the gem as root (note that the revision string may have been updated to a later version number, check the output of the previous command):
+
Install the gem as root:
  
 
  sudo gem install --local zfstools-0.3.6.gem
 
  sudo gem install --local zfstools-0.3.6.gem
Line 31: Line 31:
 
The basic idea of the script is that you give it two command line parameters, a label and a count.  The label may be anything you like, just as long as it is consistent from one invocation of the script to the next.  So by convention you might use the label ''hourly'' for a script invocation that occurs on an hourly basis, and ''daily'' for a script that runs once a day.  The script will incorporate the label hourly or daily into the snapshot name, along with the time the snapshot was taken.  The count tells the script how many snapshots to keep with the label hourly or daily in its name; if the count that you specify is 24,  it will only keep the 24 most recent snapshots.
 
The basic idea of the script is that you give it two command line parameters, a label and a count.  The label may be anything you like, just as long as it is consistent from one invocation of the script to the next.  So by convention you might use the label ''hourly'' for a script invocation that occurs on an hourly basis, and ''daily'' for a script that runs once a day.  The script will incorporate the label hourly or daily into the snapshot name, along with the time the snapshot was taken.  The count tells the script how many snapshots to keep with the label hourly or daily in its name; if the count that you specify is 24,  it will only keep the 24 most recent snapshots.
  
At this point you can run the script from the command line, and you probably should run it that way at least once to test it out.  Make sure that your pool is mounted, and then issue the Terminal command
+
At this point you can run the script from the command line, and you probably should run it that way at least once to test it out.  Issue the command
  
  sudo zfs-auto-snapshot hourly 24
+
  zfs-auto-snapshot hourly 24
  
 
Then check to see if it created a snapshot:
 
Then check to see if it created a snapshot:

Please note that all contributions to OpenZFS on OS X may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenZFS on OS X:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)