[OpenIndiana-discuss] zfs snapshot script

Matt Connolly matt.connolly.au at gmail.com
Sun May 1 14:21:36 UTC 2011


On 01/05/2011, at 11:48 PM, Dan Swartzendruber wrote:

> Hmmm, well, what I've seen a couple of places (and have been using myself)
> is rsyncd.conf on the OS box having a post-exec cmd that takes the
> snapshot...

So that means having some daemon running as root (or with required privileges) that could listen to a trigger message sent from the client?

In my case the server is operating simply as a file server and it has no knowledge of the state of a backup. I could change the windows backups to be using an rsync daemon on the server, but the mac backups using Time Machine require an afp file server, so something else needs to be added.

Are there any permission tricks that would allow a script executed via ssh to execute "zfs snapshot"??

> 
> -----Original Message-----
> From: Matt Connolly [mailto:matt.connolly.au at gmail.com] 
> Sent: Sunday, May 01, 2011 9:46 AM
> To: Discussion list for OpenIndiana
> Subject: [OpenIndiana-discuss] zfs snapshot script
> 
> Hi all,
> 
> I'm putting together a script to create zfs snapshots after a backup has
> been completed (via Apple TimeMachine or rsync for example). When I'm logged
> into the machine, I can only access the "zfs snapshot" command as root via
> "sudo" or "pfexec". Neither of these are available directly from a ssh
> command. For example:
> 
> client$ ssh user at server
> server$ sudo zfs snapshot blah at blah -> works
> ..or..
> server$ pfexec zfs snapshot blah at blah -> works
> 
> ..but..
> 
> client$ ssh user at host zfs snapshot blah -> fails = permission denied
> client$ ssh user at host pfexec zfs snapshot blah -> fails = permission denied
> client$ ssh user at host sudo zfs snapshot blah -> fails = sudo: no tty present
> and no askpass program specified
> 
> What would be the best practice for creating a zfs snapshot based on an
> external trigger (eg: message from client after a successful backup).
> 
> 
> Regards,
> Matt
> 
> 
> 
> 
> 
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
> 
> 
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss




More information about the OpenIndiana-discuss mailing list