3 # run a bunch of full postgresql backups
7 # Copyright 2014 Peter Palfrader
9 # Permission is hereby granted, free of charge, to any person obtaining
10 # a copy of this software and associated documentation files (the
11 # "Software"), to deal in the Software without restriction, including
12 # without limitation the rights to use, copy, modify, merge, publish,
13 # distribute, sublicense, and/or sell copies of the Software, and to
14 # permit persons to whom the Software is furnished to do so, subject to
15 # the following conditions:
17 # The above copyright notice and this permission notice shall be
18 # included in all copies or substantial portions of the Software.
20 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 if [ "${1:-}" = "-h" ] || [ "${1:-}" = "--help" ]; then
39 echo "Usage: $0 [<host>:<port>]"
43 if [ "$#" -gt 0 ]; then
50 while read host port username cluster version; do
51 [ "${host#\#}" = "$host" ] || continue
52 [ -z "$host" ] && continue
54 if [ -n "$forcehostport" ] && [ "$forcehostport" != "$host:$port" ]; then
55 [ "$verbose" -gt 0 ] && echo "Skipping $host:$port $version/$cluster."
59 /usr/local/bin/postgres-make-one-base-backup "$host" "$port" "$username" "$cluster" "$version"
61 seger.debian.org 5432 debian-backup dak 9.6
62 bmdb1.debian.org 5435 debian-backup main 9.6
63 bmdb1.debian.org 5436 debian-backup wannabuild 9.6
64 bmdb1.debian.org 5440 debian-backup debsources 9.6
65 fasolo.debian.org 5433 debian-backup dak 9.6
66 sibelius.debian.org 5433 debian-backup snapshot 9.4
67 <%- if @hostname != "backuphost" -%>
68 moszumanska.debian.org 5432 debian-backup main 9.1
71 # puppet notice: this is just a partial file. The tail EOF comes
72 # from a different concat fragment