Alastair Neil
2016-Apr-08 16:31 UTC
[Gluster-users] non interactive use of glsuter snapshot delete
I am crafting a script (well actually I am modifying gcron.py) to retain a configurable number of Hourly, Daily,Weekly and Monthly snapshots. One issue is that gluster snapshot delete "snapname" does not seem to have a command line switch (like "-y" in yum) to attempt the operation non-interactively. Is there another way of performing this that is more friendly to non-interactive use? From the shell I can pipe "yes" to the command but my python fu is weak so I thought I'd ask if there was a simpler way. Thanks, Alastair -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20160408/8d5cc0e5/attachment.html>
Rajesh Joseph
2016-Apr-09 04:11 UTC
[Gluster-users] non interactive use of glsuter snapshot delete
Have you tried the "--mode=script" option in Gluster? e.g. # gluster --mode=script snapshot delete snap1 On Fri, Apr 8, 2016 at 10:01 PM, Alastair Neil <ajneil.tech at gmail.com> wrote:> I am crafting a script (well actually I am modifying gcron.py) to retain a > configurable number of Hourly, Daily,Weekly and Monthly snapshots. One > issue is that gluster snapshot delete "snapname" does not seem to have a > command line switch (like "-y" in yum) to attempt the operation > non-interactively. Is there another way of performing this that is more > friendly to non-interactive use? From the shell I can pipe "yes" to the > command but my python fu is weak so I thought I'd ask if there was a > simpler way. > > Thanks, Alastair > > > > > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://www.gluster.org/mailman/listinfo/gluster-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20160409/c80080ea/attachment.html>