1AMPGSQL(8) System Administration Commands AMPGSQL(8)
2
3
4
6 ampgsql - Amanda Application to interface with PostgreSQL
7
9 Ampgsql is an Amanda Application API script. It should not be run by
10 users directly. It implements on-line backups of PostgreSQL databases
11 in conjunction with WAL archiving.
12
13 Note
14 Tablespaces are not currently supported.
15
16 Note
17 On versions of PostgreSQL earlier than 8.2, if the database is
18 quiet during a full backup, then the backup may not complete until
19 enough database activity takes place to trigger the archiving of
20 the current WAL file. Consider adjusting the PG-MAX-WAL-WAIT
21 property from its default (60s) to compensate. Note that you will
22 need to increase dtimeout on the server accordingly.
23
25 This application implements the backup strategy described in
26 http://www.postgresql.org/docs/current/static/continuous-archiving.html.
27 For a level zero (full) backup, ampgsql:
28
29 · execute PG_START_BACKUP()
30
31 · dump the data directory
32
33 · execute PG_STOP_BACKUP()
34
35 · wait for the final WAL file to be archived
36
37 · back up the required WAL files
38
39 · optionally delete WAL files that are no longer necessary
40
41 The two dumps are made with GNU Tar, to data_dir.tar and archive_dir,
42 respectively. They are then combined into a single tar file.
43
44 A level N backup creates a single tar file containing all WAL files
45 since the previous level N-1 backup.
46
48 This section lists the amanda.conf(5) properties that control ampsql´s
49 functionality. See amanda-applications(7) for information on
50 application properties and how they are configured.
51
52 DIRECTORY
53
54 For restore command only, the data is recoved in that directory.
55 Must be a unix path.
56
57 GNUTAR-PATH
58
59 Path to the GNU tar executable. This option only has an effect
60 during restore. The default is set when Amanda is built by the
61 --with-gnutar configure option.
62
63 STATEDIR
64
65 Directory for saving state about backups already made. The default
66 is set when Amanda is built by the --with-gnutar-listdir configure
67 option.
68
69 TMPDIR
70
71 Directory to use for temporary files during the backup process. It
72 should have enough space to store a complete copy of the database.
73 The default is set when Amanda is built by the --with-tmpdir
74 configure option.
75
77 This section lists the amanda-client.conf(5) properties that control
78 ampsql´s functionality. If a property is prefixed with the diskname and
79 an underscore, then it will be used when that diskname is being backed
80 up. For example, if the properties PG-DATADIR and foo-PG-DATADIR are
81 set, the value of PG-DATADIR will be used when bar and baz are being
82 backed up, but foo-PG-DATADIR will be used when foo is being backed up.
83 Disknames are specified in the disklist(5).
84
85 PG-ARCHIVEDIR
86
87 Directory that WAL segment files are archived to, as specified by
88 the archive_command in PosgreSQL´s postgresql.conf. The amanda
89 user on the client must have at least read and execute permission
90 on this directory, and preferably write. Without write permission,
91 Amanda cannot clean up expired WAL and backup files.
92
93 PG-CLEANUPWAL
94
95 Whether or not to remove old WAL segment files during base backups.
96 Defaults to yes.
97
98 PG-DATADIR
99
100 Cluster data directory
101
102 PG-DB
103
104 Database to connect to. Defaults to "template1" (which exists by
105 default).
106
107 PG-HOST
108
109 Host to connect to. If it starts with "/" it will be interepreted
110 as a directory that holds the socket file. PostgreSQL defaults to
111 /tmp.
112
113 PG-MAX-WAL-WAIT
114 The maximum amount of time to wait for PG_STOP_BACKUP to archive a
115 WAL file. In versions of PostgreSQL before 8.2, PG_STOP_BACKUP does
116 not automatically archive the latest WAL file, so a quiet database
117 may wait a very long time before archiving the WAL file. Default:
118 60 seconds. Set to 0 to wait forever.
119
120 PG-PASSFILE
121
122 Connect using the creditials in this file. Each line should have
123 the format "hostname:port:database:username:password". The
124 permissions must permit it to be read only by the user, or the file
125 will not be used. Only usable with Postgres 8.1 and up.
126
127 PG-PASSWORD
128
129 Password to use when connecting. Deprecated in favor of passfiles.
130
131 PG-PORT
132
133 The TCP port to connect to, or the suffix of the socket file.
134 PostgreSQL defaults to 5432.
135
136 PG-USER
137
138 User to connect as. It must be a superuser.
139
140 PSQL-PATH
141
142 Path to the psql binary. If not specified, the PATH environment
143 variable will be searched.
144
146 amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-
147 applications(7)
148
149 The Amanda Wiki: : http://wiki.zmanda.com/
150
152 Nikolas Coukouma <atrus@zmanda.com>
153 Zmanda, Inc. (http://www.zmanda.com)
154
155
156
157Amanda 3.1.3 10/04/2010 AMPGSQL(8)