]> git.openstreetmap.org Git - chef.git/blob - cookbooks/nominatim/templates/default/backup-nominatim.erb
353e802e489642e52a0fd2640699a1f05876e36e
[chef.git] / cookbooks / nominatim / templates / default / backup-nominatim.erb
1 #!/bin/bash -e
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 # Partial read-only backup only, to restore:
6 #
7 #   ./utils/setup.php --create-db --setup-db --create-functions --create-partition-functions
8 #   pg_restore --no-tablespaces -O -d nominatim $F
9 #   ./utils/setup.php --create-functions --create-partition-functions
10
11
12 D=`date +%Y-%m-%d`
13 F=/tmp/nominatim-${D}.dmp
14
15 pg_dump --file=$F -F c -Z 9 -t 'country' -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] %>
16
17 rsync $F backup.openstreetmap.org::backup
18
19 rm -f $F