3 .\" Author: Nikolas Coukouma <atrus@zmanda.com>
4 .\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
6 .\" Manual: System Administration Commands
7 .\" Source: Amanda 3.1.0
10 .TH "AMPGSQL" "8" "06/01/2010" "Amanda 3\&.1\&.0" "System Administration Commands"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
16 .\" disable justification (adjust text to left margin only)
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
22 ampgsql \- Amanda Application to interface with PostgreSQL
25 Ampgsql is an Amanda Application API script\&. It should not be run by users directly\&. It implements on\-line backups of PostgreSQL databases in conjunction with WAL archiving\&.
31 .nr an-no-space-flag 1
39 Tablespaces are not currently supported\&.
47 .nr an-no-space-flag 1
55 On versions of PostgreSQL earlier than 8\&.2, if the database is quiet during a full backup, then the backup may not complete until enough database activity takes place to trigger the archiving of the current WAL file\&. Consider adjusting the PG\-MAX\-WAL\-WAIT property from its default (60s) to compensate\&. Note that you will need to increase
57 on the server accordingly\&.
62 This application implements the backup strategy described in
63 http://www\&.postgresql\&.org/docs/current/static/continuous\-archiving\&.html\&. For a level zero (full) backup, ampgsql:
73 execute PG_START_BACKUP()
84 dump the data directory
95 execute PG_STOP_BACKUP()
106 wait for the final WAL file to be archived
117 back up the required WAL files
128 optionally delete WAL files that are no longer necessary
132 The two dumps are made with GNU Tar, to
135 archive_dir, respectively\&. They are then combined into a single tar file\&.
137 A level N backup creates a single tar file containing all WAL files since the previous level N\-1 backup\&.
140 This section lists the
142 properties that control ampsql\'s functionality\&. See
143 \fBamanda-applications\fR(7)
144 for information on application properties and how they are configured\&.
149 For restore command only, the data is recoved in that directory\&. Must be a unix path\&.
155 Path to the GNU tar executable\&. This option only has an effect during restore\&.
156 The default is set when Amanda is built by the \-\-with\-gnutar configure option\&.
162 Directory for saving state about backups already made\&. The default is set
163 when Amanda is built by the \-\-with\-gnutar\-listdir configure option\&.
169 Directory to use for temporary files during the backup process\&. It should
170 have enough space to store a complete copy of the database\&. The default is set
171 when Amanda is built by the \-\-with\-tmpdir configure option\&.
173 .SH "CLIENT PROPERTIES"
175 This section lists the
176 \fBamanda-client.conf\fR(5)
177 properties that control ampsql\'s functionality\&. If a property is prefixed with the diskname and an underscore, then it will be used when that diskname is being backed up\&. For example, if the properties PG\-DATADIR and foo\-PG\-DATADIR are set, the value of PG\-DATADIR will be used when bar and baz are being backed up, but foo\-PG\-DATADIR will be used when foo is being backed up\&. Disknames are specified in the
183 Directory that WAL segment files are archived to, as specified by the archive_command
184 in PosgreSQL\'s postgresql\&.conf\&. The amanda user on the client must have at least read
185 and execute permission on this directory, and preferably write\&. Without write permission,
186 Amanda cannot clean up expired WAL and backup files\&.
192 Whether or not to remove old WAL segment files during base backups\&.
199 Cluster data directory
205 Database to connect to\&. Defaults to "template1" (which exists by default)\&.
211 Host to connect to\&. If it starts with "/" it will be interepreted as a directory
212 that holds the socket file\&. PostgreSQL defaults to /tmp\&.
217 The maximum amount of time to wait for PG_STOP_BACKUP to archive a WAL file\&. In versions of PostgreSQL before 8\&.2, PG_STOP_BACKUP does not automatically archive the latest WAL file, so a quiet database may wait a very long time before archiving the WAL file\&. Default: 60 seconds\&. Set to 0 to wait forever\&.
223 Connect using the creditials in this file\&. Each line should have the format
224 "hostname:port:database:username:password"\&. The permissions must
225 permit it to be read only by the user, or the file will not be used\&.
226 Only usable with Postgres 8\&.1 and up\&.
232 Password to use when connecting\&. Deprecated in favor of passfiles\&.
238 The TCP port to connect to, or the suffix of the socket file\&. PostgreSQL
245 User to connect as\&. It must be a superuser\&.
251 Path to the psql binary\&. If not specified, the PATH environment variable
257 \fBamanda.conf\fR(5),
258 \fBamanda-client.conf\fR(5),
259 \fBamanda-applications\fR(7)
262 : http://wiki.zmanda.com/
265 \fBNikolas Coukouma\fR <\&atrus@zmanda\&.com\&>
267 Zmanda, Inc\&. (http://www\&.zmanda\&.com)