Help with time-slider's zfs-send plugin
898841Nov 8 2011 — edited Feb 22 2012I can't send snapshots by zfs-send plugin.
I have Solaris 11 Express text edition, without Gnome on computer A:
uname -a
SunOS devserv 5.11 snv_151a i86pc i386 i86pc
I started time-slider:
svcs -a | egrep "time-slider|snapshot"
disabled Sep_14 svc:/application/time-slider/plugin:rsync
disabled Sep_14 svc:/system/filesystem/zfs/auto-snapshot:frequent
online 13:35:18 svc:/application/time-slider:default
online 13:35:18 svc:/system/filesystem/zfs/auto-snapshot:daily
online 13:35:18 svc:/system/filesystem/zfs/auto-snapshot:weekly
online 13:35:18 svc:/system/filesystem/zfs/auto-snapshot:monthly
online 13:35:18 svc:/system/filesystem/zfs/auto-snapshot:hourly
online 13:35:18 svc:/application/time-slider/plugin:zfs-send
Marked volumes to make snapshots:
zfs get all export/home/apomozov | grep com.sun:auto-snapshot
export/home/apomozov com.sun:auto-snapshot true local
export/home/apomozov com.sun:auto-snapshot:monthly true inherited from export/home
export/home/apomozov com.sun:auto-snapshot:daily true inherited from export/home
export/home/apomozov com.sun:auto-snapshot:weekly true inherited from export/home
And they are made:
zfs list -r -t snapshot export/home/apomozov
NAME USED AVAIL REFER MOUNTPOINT
export/home/apomozov@zfs-auto-snap_weekly-2011-10-22-15h48 307K - 8.32M -
export/home/apomozov@zfs-auto-snap_weekly-2011-10-29-15h48 306K - 8.32M -
export/home/apomozov@zfs-auto-snap_weekly-2011-11-05-15h49 300K - 8.32M -
Daily snapshots were removed after exceeding 80% free space.
I set up Solaris 11 on the next computer B and I can send snapshot from A to B manually from zfssnap account:
su zfssnap
Oracle Corporation SunOS 5.11 snv_151a November 2010
zfssnap@devserv:~$ zfs send -R export/home/apomozov@zfs-auto-snap_weekly-2011-11-05-15h49 | /usr/bin/ssh backup@devbackup /usr/sbin/zfs recv -Fudnv export/backups
would receive incremental stream of export/home/apomozov@zfs-auto-snap_weekly-2011-10-22-15h48 into export/backups/home/apomozov@zfs-auto-snap_weekly-2011-10-22-15h48
would receive incremental stream of export/home/apomozov@zfs-auto-snap_weekly-2011-10-29-15h48 into export/backups/home/apomozov@zfs-auto-snap_weekly-2011-10-29-15h48
would receive incremental stream of export/home/apomozov@zfs-auto-snap_weekly-2011-11-05-15h49 into export/backups/home/apomozov@zfs-auto-snap_weekly-2011-11-05-15h49
But time-slider service won't send them automatically.
Here is its properties:
svcprop plugin:zfs-send
receive/command astring /usr/bin/ssh\ backup@devbackup\ /usr/sbin/zfs\ recv\ -Fud\ export/backups
plugin/command astring /usr/lib/time-slider/plugins/zfssend/zfssend
plugin/trigger_command astring /usr/lib/time-slider/plugins/zfssend/zfssend
plugin/trigger_on astring hourly,daily,weekly,monthly
plugin/verbose boolean true
general/action_authorization astring solaris.smf.manage.zfs-auto-snapshot
general/value_authorization astring solaris.smf.manage.zfs-auto-snapshot
general/enabled boolean true
general/entity_stability astring Unstable
time-slider/entities fmri svc:/application/time-slider
time-slider/grouping astring require_all
time-slider/restart_on astring refresh
time-slider/type astring service
startd/duration astring transient
manifestfiles/root_time-slider-plugin-my_xml astring /root/time-slider-plugin-my.xml
manifestfiles/root_time-slider-plugin_xml astring /root/time-slider-plugin.xml
manifestfiles/var_svc_manifest_application_time-slider-plugin_xml astring /var/svc/manifest/application/time-slider-plugin.xml
start/exec astring /lib/svc/method/time-slider-plugin\ start
start/timeout_seconds count 10
start/type astring method
stop/exec astring :true
stop/timeout_seconds count 10
stop/type astring method
tm_common_name/C ustring Time\ Slider\ Plugin\ Framework
tm_description/C ustring This\ service\ provides\ a\ mechanism\ for\ defining\ plugin\ actions\ for\ Time\ Slider\
+\+
In\ order\ to\ use\ this\ service,\ you\ must\ enable\ the\ time-slider\ service\ plus\ at\ least\ one\ auto-snapshot\
instance\ per\ set\ of\ automatic\ snapshots\ you\ want\ to\ take\ in\ addition\ to\ one\ or\ more\ Time\ Slider\ plugin\
instnace.\
When\ enabled,\ the\ time-slider\ service\ will\ execute\ the\ command\ defined\ by\ the\ plugin\'s\ SMF\ property\
+\"plugin/command\"\ after\ it\ creates\ snapshot\(s\)\ according\ to\ an\ enabled\ auto-snapshot\ instance.\+
+\+
Time\ Slider\ provides\ the\ following\ environment\ variables\ for\ consumption\ by\ the\ plugin\'s\ defined\ command:\
AUTOSNAP_LABEL:\ The\ last\ component\ of\ the\ snapshot\(s\)\ name\(s\)\ \(the\ part\ after\ the\ @\)\
AUTOSNAP_FMRI:\ The\ full\ SMF\ FMRI\ of\ the\ auto-snapshot\ instance\ corresponding\ to\ AUTOSNAP_LABEL\
PLUGIN_FMRI:\ The\ full\ SMF\ FMRI\ of\ the\ plugin\ instance\ associated\ with\ the\ invocation\ of\ the\ plugin\ command
restarter/logfile astring /var/svc/log/application-time-slider-plugin:zfs-send.log
restarter/start_pid count 27472
restarter/start_method_timestamp time 1320744918.675284000
restarter/start_method_waitstatus integer 0
restarter/transient_contract count
restarter/auxiliary_state astring dependencies_satisfied
restarter/next_state astring none
restarter/state astring online
restarter/state_timestamp time 1320744918.682502000
restarter_actions/refresh integer
I can't figure out what does the property plugin/command mean and what difference between it and trigger_command is?
Help me, please.
Anton.