File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.121 2008/11/09 17:51:15 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.122 2009/01/13 00:54:11 momjian Exp $ -->
2
2
3
3
<chapter id="backup">
4
4
<title>Backup and Restore</title>
@@ -1337,6 +1337,23 @@ tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
1337
1337
WAL files are part of the same <application>tar</> file.
1338
1338
Please remember to add error handling to your backup scripts.
1339
1339
</para>
1340
+
1341
+ <para>
1342
+ If archive storage size is a concern, use <application>pg_compresslog</>,
1343
+ <ulink url="http://pglesslog.projects.postgresql.org"></ulink>, to
1344
+ remove unnecessary <xref linkend="guc-full-page-writes"> and trailing
1345
+ space from the WAL files. You can then use
1346
+ <application>gzip</application> to further compress the output of
1347
+ <application>pg_compresslog</>:
1348
+ <programlisting>
1349
+ archive_command = 'pg_compresslog %p - | gzip > /var/lib/pgsql/archive/%f'
1350
+ </programlisting>
1351
+ You will then need to use <application>gunzip</> and
1352
+ <application>pg_decompresslog</> during recovery:
1353
+ <programlisting>
1354
+ restore_command = 'gunzip < /mnt/server/archivedir/%f | pg_decompresslog - %p'
1355
+ </programlisting>
1356
+ </para>
1340
1357
</sect3>
1341
1358
1342
1359
<sect3 id="backup-scripts">
You can’t perform that action at this time.
0 commit comments