Chapter 26. Backup and Restore

| Chapter 26. Backup and Restore |                |                               |                  |                         |
|:------------------------------:|----------------|-------------------------------|------------------|-------------------------|
|[Prev](logfile-maintenance.html)|[Up](admin.html)|Part III. Server Administration|[Home](index.html)| [Next](backup-dump.html)|

---

## Chapter 26. Backup and Restore

**Table of Contents**

[26.1. SQL Dump](backup-dump.html)[26.1.1. Restoring the Dump](backup-dump.html#BACKUP-DUMP-RESTORE)[26.1.2. Using pg\_dumpall](backup-dump.html#BACKUP-DUMP-ALL)[26.1.3. Handling Large Databases](backup-dump.html#BACKUP-DUMP-LARGE)[26.2. File System Level Backup](backup-file.html)[26.3. Continuous Archiving and Point-in-Time Recovery (PITR)](continuous-archiving.html)[26.3.1. Setting Up WAL Archiving](continuous-archiving.html#BACKUP-ARCHIVING-WAL)[26.3.2. Making a Base Backup](continuous-archiving.html#BACKUP-BASE-BACKUP)[26.3.3. Making a Base Backup Using the Low Level API](continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP)[26.3.4. Recovering Using a Continuous Archive Backup](continuous-archiving.html#BACKUP-PITR-RECOVERY)[26.3.5. Timelines](continuous-archiving.html#BACKUP-TIMELINES)[26.3.6. Tips and Examples](continuous-archiving.html#BACKUP-TIPS)[26.3.7. Caveats](continuous-archiving.html#CONTINUOUS-ARCHIVING-CAVEATS)

[]()

 As with everything that contains valuable data, PostgreSQL databases should be backed up regularly. While the procedure is essentially simple, it is important to have a clear understanding of the underlying techniques and assumptions.

 There are three fundamentally different approaches to backing up PostgreSQL data:

* SQL dump

* File system level backup

* Continuous archiving

 Each has its own strengths and weaknesses; each is discussed in turn in the following sections.

---

|[Prev](logfile-maintenance.html)| [Up](admin.html) | [Next](backup-dump.html)|
|:-------------------------------|:----------------:|------------------------:|
|   25.3. Log File Maintenance   |[Home](index.html)|      26.1. SQL Dump     |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>