mirror of
https://github.com/zfsonlinux/zfs-auto-snapshot.git
synced 2025-08-18 16:38:50 +02:00
6761081 spurious zfs/auto-snapshot:default instance, other problems with auto-snapshot manifests
Make the dist target tag the method script Fix README
This commit is contained in:
13
Makefile
13
Makefile
@@ -6,6 +6,9 @@ ZFS_AUTO_SNAPSHOT_CHANGESET = \
|
|||||||
pkg: clean
|
pkg: clean
|
||||||
mkdir -p proto
|
mkdir -p proto
|
||||||
find src | cpio -pvdum proto
|
find src | cpio -pvdum proto
|
||||||
|
# we tag the method script during the build, which will
|
||||||
|
# only happen if we're building from the original hg source,
|
||||||
|
# not from the dist tarball - see the dist: target.
|
||||||
cat src/lib/svc/method/zfs-auto-snapshot | sed -e "s/~ZFS_AUTO_SNAPSHOT_CHANGESET~/${ZFS_AUTO_SNAPSHOT_CHANGESET}/g" > proto/src/lib/svc/method/zfs-auto-snapshot
|
cat src/lib/svc/method/zfs-auto-snapshot | sed -e "s/~ZFS_AUTO_SNAPSHOT_CHANGESET~/${ZFS_AUTO_SNAPSHOT_CHANGESET}/g" > proto/src/lib/svc/method/zfs-auto-snapshot
|
||||||
pkgmk -f proto/src/prototype -p `uname -n``date +%Y%m%d%H%M%S` -d proto -r proto/src
|
pkgmk -f proto/src/prototype -p `uname -n``date +%Y%m%d%H%M%S` -d proto -r proto/src
|
||||||
|
|
||||||
@@ -16,7 +19,15 @@ clean:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
hg revert --all
|
# save off a copy of the method script before tagging it
|
||||||
|
cp src/lib/svc/method/zfs-auto-snapshot zfs-auto-snapshot.src
|
||||||
|
|
||||||
|
cat src/lib/svc/method/zfs-auto-snapshot | sed -e "s/~ZFS_AUTO_SNAPSHOT_CHANGESET~/${ZFS_AUTO_SNAPSHOT_CHANGESET}/g" > src/lib/svc/method/tagged-method-script
|
||||||
|
mv src/lib/svc/method/tagged-method-script src/lib/svc/method/zfs-auto-snapshot
|
||||||
|
grep "zfs-auto-snapshot changeset" src/lib/svc/method/zfs-auto-snapshot
|
||||||
tar cf ${DIR}.tar -C .. ${DIR}/Changelog -C .. ${DIR}/Makefile \
|
tar cf ${DIR}.tar -C .. ${DIR}/Changelog -C .. ${DIR}/Makefile \
|
||||||
-C .. ${DIR}/README.zfs-auto-snapshot.txt -C .. ${DIR}/src
|
-C .. ${DIR}/README.zfs-auto-snapshot.txt -C .. ${DIR}/src
|
||||||
gzip ${DIR}.tar
|
gzip ${DIR}.tar
|
||||||
|
|
||||||
|
# drop our saved method script back where we left it
|
||||||
|
cp zfs-auto-snapshot.src src/lib/svc/method/zfs-auto-snapshot
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
NAME
|
NAME
|
||||||
|
|
||||||
ZFS Automatic Snapshot SMF Service, version 0.11
|
ZFS Automatic Snapshot SMF Service, version 0.11.2
|
||||||
|
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
@@ -20,7 +20,7 @@ application.
|
|||||||
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
|
|
||||||
To install, as root, pkgadd TIMFauto-snapshot. This package now contains
|
To install, as root, pkgadd SUNWzfs-auto-snapshot. This package now contains
|
||||||
several canned SMF instances. These are:
|
several canned SMF instances. These are:
|
||||||
|
|
||||||
online 1:17:43 svc:/system/filesystem/zfs/auto-snapshot:hourly
|
online 1:17:43 svc:/system/filesystem/zfs/auto-snapshot:hourly
|
||||||
|
9
src/lib/svc/method/zfs-auto-snapshot
Executable file → Normal file
9
src/lib/svc/method/zfs-auto-snapshot
Executable file → Normal file
@@ -911,11 +911,6 @@ fi
|
|||||||
# $1 start | stop | refresh | an FMRI that we want to take snapshots of.
|
# $1 start | stop | refresh | an FMRI that we want to take snapshots of.
|
||||||
case "$1" in
|
case "$1" in
|
||||||
'start')
|
'start')
|
||||||
if [ "$SMF_FMRI" = "svc:/system/filesystem/zfs/auto-snapshot:default" ] ; then
|
|
||||||
print_log "The default service should not be enabled - use instances instead."
|
|
||||||
exit $SMF_EXIT_OK
|
|
||||||
fi
|
|
||||||
|
|
||||||
auto_include $SMF_FMRI
|
auto_include $SMF_FMRI
|
||||||
schedule_snapshots $SMF_FMRI
|
schedule_snapshots $SMF_FMRI
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
@@ -927,10 +922,6 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
'stop')
|
'stop')
|
||||||
if [ "$SMF_FMRI" = "svc:/system/filesystem/zfs/auto-snapshot:default" ] ; then
|
|
||||||
print_log "The default service should not be used - use instances instead."
|
|
||||||
exit $SMF_EXIT_OK
|
|
||||||
fi
|
|
||||||
unschedule_snapshots $SMF_FMRI
|
unschedule_snapshots $SMF_FMRI
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
result=$SMF_EXIT_OK
|
result=$SMF_EXIT_OK
|
||||||
|
@@ -8,7 +8,7 @@ PKG=SUNWzfs-auto-snapshot
|
|||||||
NAME=ZFS Automatic Snapshot Service
|
NAME=ZFS Automatic Snapshot Service
|
||||||
ARCH=all
|
ARCH=all
|
||||||
BASEDIR=/
|
BASEDIR=/
|
||||||
VERSION=0.11
|
VERSION=0.11.2
|
||||||
MAXINST=1
|
MAXINST=1
|
||||||
CATEGORY=application
|
CATEGORY=application
|
||||||
DESC=Takes automatic snapshots of ZFS filesystems on a periodic basis.
|
DESC=Takes automatic snapshots of ZFS filesystems on a periodic basis.
|
||||||
|
@@ -12,13 +12,4 @@ d none var/svc 0755 root sys
|
|||||||
d none var/svc/manifest 0755 root sys
|
d none var/svc/manifest 0755 root sys
|
||||||
d none var/svc/manifest/system 0755 root sys
|
d none var/svc/manifest/system 0755 root sys
|
||||||
d none var/svc/manifest/system/filesystem 0755 root sys
|
d none var/svc/manifest/system/filesystem 0755 root sys
|
||||||
# The order here is important: the auto-snapshot.xml manifest
|
|
||||||
# must be imported before the instance manifests, otherwise
|
|
||||||
# dependency information isn't set in the instances until
|
|
||||||
# they get refreshed.
|
|
||||||
f manifest var/svc/manifest/system/filesystem/auto-snapshot.xml 0644 root sys
|
f manifest var/svc/manifest/system/filesystem/auto-snapshot.xml 0644 root sys
|
||||||
f manifest var/svc/manifest/system/filesystem/zfs-auto-snapshot-monthly.xml 0644 root sys
|
|
||||||
f manifest var/svc/manifest/system/filesystem/zfs-auto-snapshot-frequent.xml 0644 root sys
|
|
||||||
f manifest var/svc/manifest/system/filesystem/zfs-auto-snapshot-daily.xml 0644 root sys
|
|
||||||
f manifest var/svc/manifest/system/filesystem/zfs-auto-snapshot-hourly.xml 0644 root sys
|
|
||||||
f manifest var/svc/manifest/system/filesystem/zfs-auto-snapshot-weekly.xml 0644 root sys
|
|
||||||
|
@@ -84,33 +84,33 @@
|
|||||||
</property_group>
|
</property_group>
|
||||||
|
|
||||||
|
|
||||||
<!-- the properties we expect that any instance will define
|
<!-- The properties we expect that any instance will define:
|
||||||
they being :
|
|
||||||
fs-name : The name of the filesystem we want to snapshot.
|
fs-name : The name of the filesystem we want to snapshot.
|
||||||
|
|
||||||
The special filesystem name "//" indicates we should
|
The special filesystem name "//" indicates we should
|
||||||
look at the com.sun:auto-snapshot ZFS user
|
look at the com.sun:auto-snapshot ZFS user
|
||||||
properties on datasets, set to "true" if the dataset
|
properties on datasets, set to "true" if the dataset
|
||||||
should have snapshots taken by this instance.
|
should have snapshots taken by this instance.
|
||||||
|
|
||||||
If unset, snapshots will not be taken by this instance.
|
If unset, snapshots will not be taken by this instance.
|
||||||
|
|
||||||
The snapshot-children property is ignored when using
|
The snapshot-children property is ignored when using
|
||||||
this setting, instead the system will automatically
|
this setting, instead the system will automatically
|
||||||
determine how to take snapshots, based on which datasets
|
determine how to take snapshots, based on which datasets
|
||||||
have true, false or unset property values.
|
have true, false or unset property values.
|
||||||
|
|
||||||
Setting com.sun:auto-snapshot:<label> will override
|
Setting com.sun:auto-snapshot:<label> will override
|
||||||
the general setting for com.sun:auto-snapshot.
|
the general setting for com.sun:auto-snapshot.
|
||||||
|
|
||||||
|
|
||||||
interval : minutes | hours | days | months | none
|
interval : minutes | hours | days | months | none
|
||||||
|
|
||||||
For the interval "none" a cron job is not created for that
|
For the interval "none" a cron job is not created for that
|
||||||
instance - instead the user can manually fire the method
|
instance - instead the user can manually fire the method
|
||||||
script to take snapshots defined by the rest of the properties
|
script to take snapshots defined by the rest of the properties
|
||||||
in the instance. The period and offset values are ignored in
|
in the instance. The period and offset values are ignored in
|
||||||
this case.
|
this case.
|
||||||
|
|
||||||
period : How many (m,h,d,m) do we wait between snapshots
|
period : How many (m,h,d,m) do we wait between snapshots
|
||||||
|
|
||||||
@@ -161,72 +161,282 @@ they being :
|
|||||||
<propval name="fs-name" type="astring" value="Not set" override="true"/>
|
<propval name="fs-name" type="astring" value="Not set" override="true"/>
|
||||||
<propval name="interval" type="astring" value="Not set" override="true"/>
|
<propval name="interval" type="astring" value="Not set" override="true"/>
|
||||||
<propval name="offset" type="astring" value="Not set" override="true"/>
|
<propval name="offset" type="astring" value="Not set" override="true"/>
|
||||||
<propval name="snapshot-children" type="boolean" value="false" override="true"/>
|
<propval name="snapshot-children" type="boolean" value="false"
|
||||||
|
override="true"/>
|
||||||
<propval name="keep" type="astring" value="all" override="true"/>
|
<propval name="keep" type="astring" value="all" override="true"/>
|
||||||
|
|
||||||
<propval name="backup" type="astring" value="none" override="true"/>
|
<propval name="backup" type="astring" value="none" override="true"/>
|
||||||
<propval name="backup-save-cmd" type="astring" value="" override="true"/>
|
<propval name="backup-save-cmd" type="astring" value="" override="true"/>
|
||||||
<propval name="backup-lock" type="astring" value="unlocked" override="true"/>
|
<propval name="backup-lock" type="astring" value="unlocked"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
<propval name="label" type="astring" value="" override="true"/>
|
<propval name="label" type="astring" value="" override="true"/>
|
||||||
<propval name="verbose" type="boolean" value="false" override="true"/>
|
<propval name="verbose" type="boolean" value="false" override="true"/>
|
||||||
<propval name="avoidscrub" type="boolean" value="false" override="true"/>
|
<propval name="avoidscrub" type="boolean" value="false" override="true"/>
|
||||||
<propval name='value_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
</property_group>
|
</property_group>
|
||||||
|
|
||||||
<!-- we're *not* defining an instance here : the idea is that instances
|
|
||||||
of this service will be created, one per set of auto-snapshots we want
|
|
||||||
to take. For reference purposes, here's what such an instance should
|
|
||||||
look like :
|
|
||||||
|
|
||||||
<instance name='tank-timf' enabled='false' >
|
<!-- We now define a set of default instances to take frequent,
|
||||||
|
hourly, daily, weekly and monthly snapshots -->
|
||||||
|
|
||||||
note: recommend an infinite timeout here - or at least a long one,
|
|
||||||
SMF tries to start all instances in parallel, however, since
|
<!-- This instance recursively snapshots all
|
||||||
we need to add entries to cron, we need to put locks around
|
filesystems marked with the ZFS User Property
|
||||||
start and stop, running these serially - if there are
|
com.sun:auto-snapshot:frequent=true every
|
||||||
sufficiently high numbers of instances, we can trip, say a 10
|
15 minutes, and keeps 4 of these snapshots into the past.
|
||||||
sec. timeout.
|
-->
|
||||||
|
|
||||||
|
<instance name='frequent' enabled='false' >
|
||||||
|
|
||||||
|
<property_group name='general' type='framework'>
|
||||||
|
<propval name='action_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
<propval name='value_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
</property_group>
|
||||||
|
|
||||||
<property_group name="zfs" type="application">
|
<property_group name="zfs" type="application">
|
||||||
|
|
||||||
<propval name="fs-name" type="astring" value="tank/timf"/>
|
<propval name="fs-name" type="astring" value="//"
|
||||||
<propval name="interval" type="astring" value="days"/>
|
override="true"/>
|
||||||
<propval name="period" type="astring" value="7"/>
|
<propval name="interval" type="astring" value="minutes"
|
||||||
<propval name="offset" type="astring" value="0"/>
|
override="true"/>
|
||||||
<propval name="snapshot-children" type="boolean" value="false"/>
|
<propval name="period" type="astring" value="15"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="offset" type="astring" value="0"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="keep" type="astring" value="4"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="snapshot-children" type="boolean" value="true"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
<propval name="backup" type="astring" value="full" override="true"/>
|
<propval name="backup" type="astring" value="none"
|
||||||
<propval name="backup-save-cmd" type="astring" override="true"
|
override="true"/>
|
||||||
value="ssh haiiro.ireland zfs receive -d tank/data "/>
|
<propval name="backup-save-cmd" type="astring" value="not set"
|
||||||
<propval name="backup-lock" type="astring" value="unlocked"
|
override="true"/>
|
||||||
override="true"/>
|
<propval name="backup-lock" type="astring" value="unlocked"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
<propval name="label" type="astring" value="all" override="true"/>
|
<propval name="label" type="astring" value="frequent"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
<propval name="verbose" type="boolean" value="false" override="true"/>
|
<propval name="verbose" type="boolean" value="false"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
<propval name="avoidscrub" type="boolean" value="false" override="true"/>
|
<propval name="avoidscrub" type="boolean" value="false"
|
||||||
|
override="false"/>
|
||||||
|
|
||||||
</property_group>
|
</property_group>
|
||||||
|
|
||||||
</instance>
|
</instance>
|
||||||
|
|
||||||
A set of instances are provided that snapshot periodically hourly,
|
<!-- This instance recursively snapshots all
|
||||||
daily, weekly, monthly, and at 15 minute intervals, and have their
|
filesystems marked with the ZFS User Property
|
||||||
fs-name set to "//", consulting the com.sun:auto-snapshot:hourly,etc.
|
com.sun:auto-snapshot:hourly=true every
|
||||||
ZFS user properties to determine which datasets to snapshot.
|
hour, and keeps 24 of these snapshots into the past.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<instance name='hourly' enabled='false' >
|
||||||
|
|
||||||
|
<property_group name='general' type='framework'>
|
||||||
|
<propval name='action_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
<propval name='value_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
</property_group>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- This instance recursively snapshots all
|
||||||
|
filesystems marked with the ZFS User Property
|
||||||
|
com.sun:auto-snapshot:daily=true every
|
||||||
|
day, and keeps 31 of these snapshots into the past.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<instance name='daily' enabled='false' >
|
||||||
|
|
||||||
|
<property_group name='general' type='framework'>
|
||||||
|
<propval name='action_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
<propval name='value_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
</property_group>
|
||||||
|
|
||||||
|
<property_group name="zfs" type="application">
|
||||||
|
|
||||||
|
<propval name="fs-name" type="astring" value="//"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="interval" type="astring" value="days"
|
||||||
|
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="31"
|
||||||
|
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="daily"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
|
<propval name="verbose" type="boolean" value="false"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
|
<propval name="avoidscrub" type="boolean" value="false"
|
||||||
|
override="false"/>
|
||||||
|
|
||||||
|
</property_group>
|
||||||
|
|
||||||
|
</instance>
|
||||||
|
|
||||||
|
<!-- This instance recursively snapshots all
|
||||||
|
filesystems marked with the ZFS User Property
|
||||||
|
com.sun:auto-snapshot:weekly=true every
|
||||||
|
7 days, and keeps 4 of these snapshots into the past.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<instance name='weekly' enabled='false' >
|
||||||
|
|
||||||
|
<property_group name='general' type='framework'>
|
||||||
|
<propval name='action_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
<propval name='value_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
</property_group>
|
||||||
|
|
||||||
|
<property_group name="zfs" type="application">
|
||||||
|
|
||||||
|
<propval name="fs-name" type="astring" value="//"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="interval" type="astring" value="days"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="period" type="astring" value="7"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="offset" type="astring" value="0"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="keep" type="astring" value="4"
|
||||||
|
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="weekly"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
|
<propval name="verbose" type="boolean" value="false"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
|
<propval name="avoidscrub" type="boolean" value="false"
|
||||||
|
override="false"/>
|
||||||
|
|
||||||
|
</property_group>
|
||||||
|
|
||||||
|
</instance>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- This instance recursively snapshots all
|
||||||
|
filesystems marked with the ZFS User Property
|
||||||
|
com.sun:auto-snapshot:monthly=true every
|
||||||
|
month, and keeps 12 of these snapshots into the past.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<instance name='monthly' enabled='false' >
|
||||||
|
|
||||||
|
<property_group name='general' type='framework'>
|
||||||
|
<propval name='action_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
<propval name='value_authorization' type='astring'
|
||||||
|
value='solaris.smf.manage.zfs-auto-snapshot' />
|
||||||
|
</property_group>
|
||||||
|
|
||||||
|
<property_group name="zfs" type="application">
|
||||||
|
|
||||||
|
<propval name="fs-name" type="astring" value="//"
|
||||||
|
override="true"/>
|
||||||
|
<propval name="interval" type="astring" value="months"
|
||||||
|
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="12"
|
||||||
|
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="monthly"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
|
<propval name="verbose" type="boolean" value="false"
|
||||||
|
override="true"/>
|
||||||
|
|
||||||
|
<propval name="avoidscrub" type="boolean" value="true"
|
||||||
|
override="false"/>
|
||||||
|
|
||||||
|
</property_group>
|
||||||
|
|
||||||
|
</instance>
|
||||||
|
|
||||||
<stability value='Unstable' />
|
<stability value='Unstable' />
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<common_name>
|
<common_name>
|
||||||
<loctext xml:lang='C'>
|
<loctext xml:lang='C'>ZFS automatic snapshots</loctext>
|
||||||
ZFS automatic snapshots
|
|
||||||
</loctext>
|
|
||||||
</common_name>
|
</common_name>
|
||||||
<description>
|
<description>
|
||||||
<loctext xml:lang='C'>
|
<loctext xml:lang='C'>
|
||||||
@@ -248,5 +458,4 @@ Care should be taken when configuring backups to ensure that the time granularit
|
|||||||
</description>
|
</description>
|
||||||
</template>
|
</template>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
</service_bundle>
|
</service_bundle>
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
|
||||||
<service_bundle type='manifest' name='daily'>
|
|
||||||
<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 snapshots all
|
|
||||||
filesystems marked with the ZFS User Property
|
|
||||||
com.sun:auto-snapshot:daily=true daily, and keeps 31 of these
|
|
||||||
snapshots into the past.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<create_default_instance enabled='false' />
|
|
||||||
|
|
||||||
<instance name='daily' enabled='false' >
|
|
||||||
|
|
||||||
<property_group name='general' type='framework'>
|
|
||||||
<propval name='action_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
<propval name='value_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
</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="days"
|
|
||||||
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="31"
|
|
||||||
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="daily"
|
|
||||||
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>
|
|
@@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
|
||||||
<service_bundle type='manifest' name='frequent'>
|
|
||||||
<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 snapshots all
|
|
||||||
filesystems marked with the ZFS User Property
|
|
||||||
com.sun:auto-snapshot:frequent=true every
|
|
||||||
15 minutes, and keeps 4 of these snapshots into the past.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<create_default_instance enabled='false' />
|
|
||||||
|
|
||||||
<instance name='frequent' enabled='false' >
|
|
||||||
|
|
||||||
<property_group name='general' type='framework'>
|
|
||||||
<propval name='action_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
<propval name='value_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
</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="minutes"
|
|
||||||
override="true"/>
|
|
||||||
<propval name="period" type="astring" value="15"
|
|
||||||
override="true"/>
|
|
||||||
<propval name="offset" type="astring" value="0"
|
|
||||||
override="true"/>
|
|
||||||
<propval name="keep" type="astring" value="4"
|
|
||||||
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="frequent"
|
|
||||||
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>
|
|
@@ -1,65 +0,0 @@
|
|||||||
<?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' >
|
|
||||||
|
|
||||||
<property_group name='general' type='framework'>
|
|
||||||
<propval name='action_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
<propval name='value_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
</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>
|
|
@@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
|
||||||
<service_bundle type='manifest' name='monthly'>
|
|
||||||
<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 snapshots
|
|
||||||
all filesystems marked with the ZFS User Property
|
|
||||||
com.sun:auto-snapshot:monthly=true monthly,
|
|
||||||
and keeps 12 of these snapshots into the past.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<create_default_instance enabled='false' />
|
|
||||||
|
|
||||||
<instance name='monthly' enabled='false' >
|
|
||||||
|
|
||||||
<property_group name='general' type='framework'>
|
|
||||||
<propval name='action_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
<propval name='value_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
</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="months"
|
|
||||||
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="12"
|
|
||||||
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="monthly"
|
|
||||||
override="true"/>
|
|
||||||
|
|
||||||
<propval name="verbose" type="boolean" value="false"
|
|
||||||
override="true"/>
|
|
||||||
|
|
||||||
<propval name="avoidscrub" type="boolean" value="true"
|
|
||||||
override="false"/>
|
|
||||||
|
|
||||||
</property_group>
|
|
||||||
|
|
||||||
</instance>
|
|
||||||
|
|
||||||
<stability value='Unstable' />
|
|
||||||
</service>
|
|
||||||
</service_bundle>
|
|
@@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
|
||||||
<service_bundle type='manifest' name='weekly'>
|
|
||||||
<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 snapshots all
|
|
||||||
filesystems marked with the ZFS User Property
|
|
||||||
com.sun:auto-snapshot:weekly=true weekly,
|
|
||||||
and keeps 4 of these snapshots into the past.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<create_default_instance enabled='false' />
|
|
||||||
|
|
||||||
<instance name='weekly' enabled='false' >
|
|
||||||
|
|
||||||
<property_group name='general' type='framework'>
|
|
||||||
<propval name='action_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
<propval name='value_authorization' type='astring'
|
|
||||||
value='solaris.smf.manage.zfs-auto-snapshot' />
|
|
||||||
</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="days"
|
|
||||||
override="true"/>
|
|
||||||
<propval name="period" type="astring" value="7"
|
|
||||||
override="true"/>
|
|
||||||
<propval name="offset" type="astring" value="0"
|
|
||||||
override="true"/>
|
|
||||||
<propval name="keep" type="astring" value="4"
|
|
||||||
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="weekly"
|
|
||||||
override="true"/>
|
|
||||||
|
|
||||||
<propval name="verbose" type="boolean" value="false"
|
|
||||||
override="true"/>
|
|
||||||
|
|
||||||
<propval name="avoidscrub" type="boolean" value="true"
|
|
||||||
override="false"/>
|
|
||||||
|
|
||||||
</property_group>
|
|
||||||
|
|
||||||
</instance>
|
|
||||||
|
|
||||||
<stability value='Unstable' />
|
|
||||||
</service>
|
|
||||||
</service_bundle>
|
|
Reference in New Issue
Block a user