recursive true
end
+%w[planet tile www].each do |service|
+ directory "/store/logs/#{service}.openstreetmap.org" do
+ owner "osmbackup"
+ group "osmbackup"
+ mode "2755"
+ recursive true
+ end
+end
+
cookbook_file "/usr/local/bin/expire-backups" do
owner "root"
group "root"
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
- rsync --preallocate /var/log/apache2/planet.openstreetmap.org-access.log.2.gz ironbelly::logs/planet.openstreetmap.org/`date -d "-7 days" +%Y-%m-%d`.gz
+ rsync --preallocate /var/log/apache2/planet.openstreetmap.org-access.log.2.gz backup.openstreetmap.org::logs/planet.openstreetmap.org/`date -d "-7 days" +%Y-%m-%d`.gz
endscript
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
- /usr/bin/rsync --preallocate /var/log/apache2/access.log.2.gz ironbelly::logs/www.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
+ /usr/bin/rsync --preallocate /var/log/apache2/access.log.2.gz backup.openstreetmap.org::logs/www.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
endscript
}
<% end -%>
<% if node[:recipes].include?("web::cgimap") -%>
/bin/systemctl reload cgimap
- /usr/bin/rsync --preallocate <%= node[:web][:log_directory] %>/cgimap.log.2.gz ironbelly::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
+ /usr/bin/rsync --preallocate <%= node[:web][:log_directory] %>/cgimap.log.2.gz backup.openstreetmap.org::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
<% end -%>
endscript
}
"127.0.0.0/8", # localhost
"::1" # localhost
]
+ },
+ :logs => {
+ :comment => "Log files",
+ :path => "/store/logs",
+ :read_only => false,
+ :write_only => true,
+ :list => false,
+ :uid => "osmbackup",
+ :gid => "osmbackup",
+ :transfer_logging => false,
+ :hosts_allow => [
+ "193.60.236.0/24", # ucl external
+ "10.0.48.0/20", # amsterdam internal
+ "184.104.179.128/27", # amsterdam external
+ "2001:470:1:fa1::/64", # amsterdam external
+ "10.0.64.0/20", # dublin internal
+ "184.104.226.96/27", # dublin external
+ "2001:470:1:b3b::/64", # dublin external
+ "10.0.32.0/20", # bytemark internal
+ "89.16.162.16/28", # bytemark external
+ "2001:41c9:2:d6::/64", # bytemark external
+ "127.0.0.0/8", # localhost
+ "::1" # localhost
+ ]
}
}
}
:max_size => "51200M"
}
}
- },
- :rsyncd => {
- :modules => {
- :logs => {
- :comment => "Log files",
- :path => "/store/logs",
- :read_only => false,
- :write_only => true,
- :list => false,
- :uid => "www-data",
- :gid => "www-data",
- :transfer_logging => false,
- :hosts_allow => [
- "193.60.236.0/24", # ucl external
- "10.0.48.0/20", # amsterdam internal
- "184.104.179.128/27", # amsterdam external
- "2001:470:1:fa1::/64", # amsterdam external
- "10.0.64.0/20", # dublin internal
- "184.104.226.96/27", # dublin external
- "2001:470:1:b3b::/64", # dublin external
- "10.0.32.0/20", # bytemark internal
- "89.16.162.16/28", # bytemark external
- "2001:41c9:2:d6::/64", # bytemark external
- "127.0.0.0/8", # localhost
- "::1" # localhost
- ]
- }
- }
}
)