<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='hourly'>
<service
	name='system/filesystem/zfs/auto-snapshot'
	type='service'
	version='0.11'>

<!-- This is one of the default instances that comes with the	
ZFS Automatic Snapshot SMF Service. It recursively s
snapshots all filesystems marked with the ZFS User Property
com.sun:auto-snapshot:hourly=true hourly,
and keeps 24 of these snapshots into the past.
	-->

	<create_default_instance enabled='false' />

	<instance name='hourly' enabled='false' >

        <exec_method
                type='method'
                name='start'
                exec='/lib/svc/method/zfs-auto-snapshot start'
                timeout_seconds='0'>
                        <method_context>
                                <method_credential user='zfssnap' group='staff' />
                        </method_context>
        </exec_method>

        <exec_method
                type='method'
                name='stop'
                exec='/lib/svc/method/zfs-auto-snapshot stop'
                timeout_seconds='0' >
                        <method_context>
                                <method_credential user='zfssnap' group='staff' />
                        </method_context>
        </exec_method>

        <property_group name='startd' type='framework'>
        	<propval name='duration' type='astring' value='transient' />
        </property_group>

        <!-- properties for zfs automatic snapshots -->
	<property_group name="zfs" type="application">

	  <propval name="fs-name" type="astring" value="//" 
		   override="true"/>
	  <propval name="interval" type="astring" value="hours"
		   override="true"/>
	  <propval name="period" type="astring" value="1"
		   override="true"/>
	  <propval name="offset" type="astring" value="0"
		   override="true"/>
	  <propval name="keep" type="astring" value="24"
		   override="true"/>
	  <propval name="snapshot-children" type="boolean" value="true"
		   override="true"/>

	  <propval name="backup" type="astring" value="none"
		   override="true"/>
	  <propval name="backup-save-cmd" type="astring" value="not set"
		   override="true"/>
	  <propval name="backup-lock" type="astring" value="unlocked"
		   override="true"/>

	  <propval name="label" type="astring" value="hourly"
		   override="true"/>

	  <propval name="verbose" type="boolean" value="false"
		   override="true"/>

	  <propval name="avoidscrub" type="boolean" value="false"
		   override="false"/>

	</property_group>

	</instance>

	<stability value='Unstable' />
</service>
</service_bundle>
