> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/server-administration/backup.md).

# Chapter 25. Backup and Restore

**Table of Contents**

[25.1. SQL Dump](/server-administration/backup/backup-dump.md) : [25.1.1. Restoring the Dump](/server-administration/backup/backup-dump.md#BACKUP-DUMP-RESTORE)

```
[25.1.2. Using pg_dumpall](backup-dump.md#BACKUP-DUMP-ALL)

[25.1.3. Handling Large Databases](backup-dump.md#BACKUP-DUMP-LARGE)
```

[25.2. File System Level Backup](/server-administration/backup/backup-file.md)

[25.3. Continuous Archiving and Point-in-Time Recovery (PITR)](/server-administration/backup/continuous-archiving.md) : [25.3.1. Setting Up WAL Archiving](/server-administration/backup/continuous-archiving.md#BACKUP-ARCHIVING-WAL)

```
[25.3.2. Making a Base Backup](continuous-archiving.md#BACKUP-BASE-BACKUP)

[25.3.3. Making an Incremental Backup](continuous-archiving.md#BACKUP-INCREMENTAL-BACKUP)

[25.3.4. Making a Base Backup Using the Low Level API](continuous-archiving.md#BACKUP-LOWLEVEL-BASE-BACKUP)

[25.3.5. Recovering Using a Continuous Archive Backup](continuous-archiving.md#BACKUP-PITR-RECOVERY)

[25.3.6. Timelines](continuous-archiving.md#BACKUP-TIMELINES)

[25.3.7. Tips and Examples](continuous-archiving.md#BACKUP-TIPS)

[25.3.8. Caveats](continuous-archiving.md#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.

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/backup.html)（英文原文，待翻譯）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.postgresql.tw/server-administration/backup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
