17 lines
523 B
Ruby
17 lines
523 B
Ruby
#
|
|
# 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
|