2 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
7 The contents of this file are subject to the terms of the
8 Common Development and Distribution License, Version 1.0 only
9 (the "License"). You may not use this file except in compliance
12 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 or http://www.opensolaris.org/os/licensing.
14 See the License for the specific language governing permissions
15 and limitations under the License.
17 When distributing Covered Code, include this CDDL HEADER in each
18 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 If applicable, add the following below this CDDL HEADER, with the
20 fields enclosed by brackets "[]" replaced with your own identifying
21 information: Portions Copyright [yyyy] [name of copyright owner]
25 Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 Use is subject to license terms.
30 <service_bundle type='manifest' name='SUNWtime-slider'>
33 name='system/filesystem/zfs/auto-snapshot'
37 <!-- we need time-slider -->
40 grouping='require_all'
43 <service_fmri value='svc:/application/time-slider' />
67 <property_group name='startd' type='framework'>
68 <propval name='duration' type='astring' value='transient' />
71 <property_group name='general' type='framework'>
72 <propval name='action_authorization' type='astring'
73 value='solaris.smf.manage.zfs-auto-snapshot' />
74 <propval name='value_authorization' type='astring'
75 value='solaris.smf.manage.zfs-auto-snapshot' />
79 <!-- The properties we expect that any instance will define:
81 interval : minutes | hours | days | months
83 period : How many (m,h,d,m) to wait between snapshots
85 keep : How many snapshots we should keep, otherwise, we
86 delete the oldest when we hit this threshold
89 <property_group name="zfs" type="application">
90 <propval name="interval" type="astring" value="Not set" override="true"/>
91 <propval name="keep" type="astring" value="all" override="true"/>
95 <!-- We now define a set of default instances to take frequent,
96 hourly, daily, weekly and monthly snapshots -->
99 <!-- This instance recursively snapshots all
100 filesystems marked with the ZFS User Property
101 com.sun:auto-snapshot:frequent=true every
102 15 minutes, and keeps 3 of these snapshots into the past.
105 <instance name='frequent' enabled='false' >
107 <property_group name='general' type='framework'>
108 <propval name='action_authorization' type='astring'
109 value='solaris.smf.manage.zfs-auto-snapshot' />
110 <propval name='value_authorization' type='astring'
111 value='solaris.smf.manage.zfs-auto-snapshot' />
114 <property_group name="zfs" type="application">
116 <propval name="interval" type="astring" value="minutes"
118 <propval name="period" type="astring" value="15"
120 <propval name="keep" type="astring" value="3"
127 <!-- This instance recursively snapshots all
128 filesystems marked with the ZFS User Property
129 com.sun:auto-snapshot:hourly=true every
130 hour, and keeps 23 of these snapshots into the past.
133 <instance name='hourly' enabled='false' >
135 <property_group name='general' type='framework'>
136 <propval name='action_authorization' type='astring'
137 value='solaris.smf.manage.zfs-auto-snapshot' />
138 <propval name='value_authorization' type='astring'
139 value='solaris.smf.manage.zfs-auto-snapshot' />
142 <property_group name="zfs" type="application">
144 <propval name="interval" type="astring" value="hours"
146 <propval name="period" type="astring" value="1"
148 <propval name="keep" type="astring" value="23"
156 <!-- This instance recursively snapshots all
157 filesystems marked with the ZFS User Property
158 com.sun:auto-snapshot:daily=true every
159 day, and keeps 6 of these snapshots into the past.
162 <instance name='daily' enabled='false' >
164 <property_group name='general' type='framework'>
165 <propval name='action_authorization' type='astring'
166 value='solaris.smf.manage.zfs-auto-snapshot' />
167 <propval name='value_authorization' type='astring'
168 value='solaris.smf.manage.zfs-auto-snapshot' />
171 <property_group name="zfs" type="application">
173 <propval name="interval" type="astring" value="days"
175 <propval name="period" type="astring" value="1"
177 <propval name="keep" type="astring" value="6"
184 <!-- This instance recursively snapshots all
185 filesystems marked with the ZFS User Property
186 com.sun:auto-snapshot:weekly=true every
187 7 days, and keeps 4 of these snapshots into the past.
190 <instance name='weekly' enabled='false' >
192 <property_group name='general' type='framework'>
193 <propval name='action_authorization' type='astring'
194 value='solaris.smf.manage.zfs-auto-snapshot' />
195 <propval name='value_authorization' type='astring'
196 value='solaris.smf.manage.zfs-auto-snapshot' />
199 <property_group name="zfs" type="application">
201 <propval name="interval" type="astring" value="days"
203 <propval name="period" type="astring" value="7"
205 <propval name="keep" type="astring" value="4"
213 <!-- This instance recursively snapshots all
214 filesystems marked with the ZFS User Property
215 com.sun:auto-snapshot:monthly=true every
216 month, and keeps 12 of these snapshots into the past.
219 <instance name='monthly' enabled='false' >
221 <property_group name='general' type='framework'>
222 <propval name='action_authorization' type='astring'
223 value='solaris.smf.manage.zfs-auto-snapshot' />
224 <propval name='value_authorization' type='astring'
225 value='solaris.smf.manage.zfs-auto-snapshot' />
228 <property_group name="zfs" type="application">
230 <propval name="interval" type="astring" value="months"
232 <propval name="period" type="astring" value="1"
234 <propval name="keep" type="astring" value="12"
241 <stability value='Unstable' />
245 <loctext xml:lang='C'>ZFS automatic snapshots</loctext>
248 <loctext xml:lang='C'>
249 This service provides system configuration for taking automatic snapshots of ZFS
252 In order to use this service, you must enable the time-slider service plus at least one auto-snapshot
253 instance per set of automatic snapshots you want to take.
254 The time-slider service will manage the creation and destruction of snapshots according to the definitions
255 of each auto-snapshot service instance.
257 On stopping the service, time-slider will cease to take snapshots for the specific instance.