Add a recipe that sets up backups for ejabberd
This commit is contained in:
		
							parent
							
								
									591c7462ec
								
							
						
					
					
						commit
						2a579f62d2
					
				
							
								
								
									
										16
									
								
								site-cookbooks/kosmos-ejabberd/recipes/backup.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								site-cookbooks/kosmos-ejabberd/recipes/backup.rb
									
									
									
									
									
										Normal 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 | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user