munin_plugin_conf "nominatim" do
template "munin.erb"
+ variables :db => node[:nominatim][:database][:dbname],
+ :querylog => "#{node[:nominatim][:logdir]}/query.log"
end
munin_plugin "nominatim_importlag" do
owner "root"
group "root"
mode 0o755
+ variables :db => node[:nominatim][:database][:dbname]
end
end
D=`date +%Y-%m-%d`
F=/tmp/nominatim-${D}.dmp
-pg_dump --file=$F -F c -Z 9 -t file -t '*columns' -t 'import_polygon_*' -t import_status -t place_addressline -t placex -t search_name -t 'seq_*' -t word <%= node[:nominatim][:database][:dbname] %>
+pg_dump --file=$F -F c -Z 9 -t file -t '*columns' -t 'import_polygon_*' -t import_status -t place_addressline -t placex -t search_name -t 'seq_*' -t word <%= @db %>
export RSYNC_RSH="ssh -ax"
rsync $F backup.openstreetmap.org::backup
[nominatim_*]
user www-data
-env.PGDATABASE <%= node[:nominatim][:database][:dbname] %>
+env.PGDATABASE <%= @db %>
env.PGUSER www-data
-env.NOMINATIM_QUERYLOG <%= node[:nominatim][:logdir] %>/query.log
+env.NOMINATIM_QUERYLOG <%= @querylog %>
# Vaccum all tables with indices on integer arrays.
# Agressive vacuuming seems to help against index bloat.
-psql -q -d nominatim -c 'VACUUM ANALYSE search_name'
-psql -q -d nominatim -c 'VACUUM ANALYSE search_name_country'
+psql -q -d <%= @db %> -c 'VACUUM ANALYSE search_name'
+psql -q -d <%= @db %> -c 'VACUUM ANALYSE search_name_country'
for i in `seq 0 246`; do
- psql -q -d nominatim -c "VACUUM ANALYSE search_name_${i}"
+ psql -q -d <%= @db %> -c "VACUUM ANALYSE search_name_${i}"
done