Add a recipe that sets up backups for ejabberd

This commit is contained in:
Greg Karékinian 2019-02-25 18:13:06 +01:00
parent 9346188ca7
commit 80449ccbeb

View File

@ -0,0 +1,16 @@
#
# Cookbook:: kosmos-ejabberd
# Recipe:: backup
#
# Copyright:: 2019, Kosmos, All Rights Reserved.
#
unless node.chef_environment == "development"
# backup the data dir and the config files
node.override["backup"]["archives"]["ejabberd"] = ["/opt/ejabberd", "/var/www/xmpp.kosmos.org"]
unless node["backup"]["postgresql"]["databases"].include? "ejabberd"
node.override["backup"]["postgresql"]["databases"] =
node["backup"]["postgresql"]["databases"].to_a << "ejabberd"
end
include_recipe "backup"
end