Fix missing Mastodon/PosgreSQL backups
The backup cookbook was incomplete, and also there was no database configured to be backed up.
This commit is contained in:
@@ -180,10 +180,18 @@ application mastodon_path do
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Backup
|
||||
#
|
||||
|
||||
unless node.chef_environment == "development"
|
||||
# Backup the database to S3
|
||||
node.override["backup"]["postgresql"]["host"] = "localhost"
|
||||
node.override["backup"]["postgresql"]["username"] = "postgres"
|
||||
node.override["backup"]["postgresql"]["password"] = node['postgresql']['password']['postgres']
|
||||
unless node["backup"]["postgresql"]["databases"].include? 'mastodon'
|
||||
node.override["backup"]["postgresql"]["databases"] =
|
||||
node["backup"]["postgresql"]["databases"].to_a << "mastodon"
|
||||
end
|
||||
|
||||
include_recipe "backup"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user