|The PostgreSQL 9.0 Reference Manual - Volume 3 - Server Administration Guide
by The PostgreSQL Global Development Group
Paperback (6"x9"), 274 pages
RRP £9.95 ($14.95)
Sales of this book support the PostgreSQL project! Get a printed copy>>>
10.3.5.2 archive_command scripts
Many people choose to use scripts to define their
archive_command, so that their
‘postgresql.conf’ entry looks very simple:
archive_command = 'local_backup_script.sh'
Using a separate script file is advisable any time you want to use
more than a single command in the archiving process.
This allows all complexity to be managed within the script, which
can be written in a popular scripting language such as
bash or perl.
Any messages written to
stderr from the script will appear
in the database server log, allowing complex configurations to be
diagnosed easily if they fail.
Examples of requirements that might be solved within a script include:
- Copying data to secure off-site data storage
- Batching WAL files so that they are transferred every three hours, rather than one at a time
- Interfacing with other backup and recovery software
- Interfacing with monitoring software to report errors
|ISBN 9781906966072||The PostgreSQL 9.0 Reference Manual - Volume 3 - Server Administration Guide||See the print edition|