]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/planet/templates/default/planet-notes-dump.erb
Use configured read only database for note dumps
[chef.git] / cookbooks / planet / templates / default / planet-notes-dump.erb
index 6363c0bde9d97b7694e4a4d0b47d33470167c13c..92ca8b3758ec1313c4f366a515c14d77d5c8b105 100644 (file)
@@ -33,7 +33,7 @@ if [ \! -d ${planet_dir}/notes/ ]
 if [ \! -d ${planet_dir}/notes/${cur_year}/ ]; then mkdir ${planet_dir}/notes/${cur_year}/; fi
 cd ${planet_dir}/notes/${cur_year}/
 
-/usr/bin/python /opt/planet-notes-dump/dump.py --database openstreetmap --host db-slave --user planetdump --password '<%= @password %>' .${cur_planet_notes}
+/usr/bin/python /opt/planet-notes-dump/dump.py --quiet --database openstreetmap --host <%= node[:web][:readonly_database_host] %> --user planetdump --password '<%= @password %>' .${cur_planet_notes}
 pbzip2 -p6 -9 .${cur_planet_notes}
 
 planet_notes_size=$(du -sb .${cur_planet_notes}.bz2 | awk '{ print $1 }')
@@ -42,7 +42,7 @@ if ((planet_notes_size<12000000)); then
        exit 1
 fi
 
-mv .${cur_planet_notes}.bz2.new ${cur_planet_notes}.bz2
+mv .${cur_planet_notes}.bz2 ${cur_planet_notes}.bz2
 md5sum ${cur_planet_notes}.bz2 > ${cur_planet_notes}.bz2.md5
 
 #link planet latest to the new file