how can i rollback a file managed by Saltstack?

907 views
Skip to first unread message

尹川

unread,
Jul 24, 2013, 9:41:04 PM7/24/13
to salt-...@googlegroups.com
hi, guys,

Thanks for your attention.

I use file.managed(with backup=True) to copy a file to the minions, this works very well. 
But when I want to rollback the file to previous version, I can't find how to do this.

So, whether Salt can handle this work?

Any advice is appreciated. Thanks.

--
一片树林里分出两条路——
        而我选择了人迹更少的一条,
        从此决定了我一生的道路。

Erik Johnson

unread,
Jul 25, 2013, 12:38:06 PM7/25/13
to salt-...@googlegroups.com
There's no automated rollback. The earlier version of the file will be located in the minion's cache in /var/cache/salt/minion/file_backup.


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

-Erik

"For me, it is far better to grasp the universe as it really is than to persist in delusion, however satisfying and reassuring."  -- Carl Sagan

尹川

unread,
Jul 26, 2013, 5:02:11 AM7/26/13
to salt-...@googlegroups.com
Thanks for your attention.
So, I have to copy the backuped file to the origin position manualy.

Colton Myers

unread,
Jul 26, 2013, 3:31:28 PM7/26/13
to salt-...@googlegroups.com
Well, you can use salt to do so on all your servers at once.

But no, there's no built-in module function to do it for you.

--
Colton Myers

尹川

unread,
Jul 28, 2013, 8:58:28 AM7/28/13
to salt-...@googlegroups.com
The guys add a feature to do this, https://github.com/saltstack/salt/pull/6376.
Reply all
Reply to author
Forward
0 new messages