{"kind": "tool", "major": "18", "item": {"slug": "pg-combinebackup", "name": "pg_combinebackup", "name_zh": "", "category": "Client applications", "summary": "pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups", "aliases": ["pg_combinebackup"], "content_hash": "258d84862b30064c6adfc374ea1e7fc829c0bc74e993ae5f31ae14e4d24a4531", "versions": {"17": {"facts": [{"label": "Documented executable", "value": "pg_combinebackup"}, {"label": "Executable version", "value": "17.11"}, {"label": "Reference inventory", "value": "Client applications"}, {"label": "Option definition groups", "value": "13"}], "tables": [{"key": "options", "rows": [{"summary": "Print lots of debug logging output on stderr .", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "-d --debug"}}, {"summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "-n --dry-run"}}, {"summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "-N --no-sync"}}, {"summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "-o outputdir --output= outputdir"}}, {"summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "-T olddir = newdir --tablespace-mapping= olddir = newdir"}}, {"summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "--clone"}}, {"summary": "Perform regular file copy. This is the default. (See also --copy-file-range and --clone .)", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "--copy"}}, {"summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "--copy-file-range"}}, {"summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "--manifest-checksums= algorithm"}}, {"summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "--no-manifest"}}, {"summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "--sync-method= method"}}, {"summary": "Prints the pg_combinebackup version and exits.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "-V --version"}}, {"summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": {"url": "/docs/17/app-pgcombinebackup.html", "text": "-? --help"}}], "title": "Documented options", "columns": [{"key": "signature", "label": "Option and arguments"}, {"key": "summary", "label": "Description"}]}], "options": [{"names": ["-d", "--debug"], "summary": "Print lots of debug logging output on stderr .", "signature": "-d --debug", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-n", "--dry-run"], "summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": "-n --dry-run", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": "-N --no-sync", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": "-o outputdir --output= outputdir", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": "--clone", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "summary": "Perform regular file copy. This is the default. (See also --copy-file-range and --clone .)", "signature": "--copy", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Perform regular file copy. This is the default. (See also --copy-file-range and --clone .)"}, {"names": ["--copy-file-range"], "summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": "--copy-file-range", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": "--manifest-checksums= algorithm", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": "--no-manifest", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "summary": "Prints the pg_combinebackup version and exits.", "signature": "-V --version", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": "-? --help", "source_url": "/docs/17/app-pgcombinebackup.html", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/17/postgresql-17-A4.pdf", "bytes": 15521293, "pages": 3099, "sha256": "1991354df0dc89e70ec39328c28988ef8b19c6a93671dab3893650b63e9f4e36", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/17/postgresql-17-US.pdf", "bytes": 15398150, "pages": 3270, "sha256": "07696c8f38abf31babf22d2db337093936e7c472d2af36d050b000c49bbcf52c", "built_at": "2026-09-26"}}, "tree": "17", "index": "index.html", "major": "17", "pages": 1143, "release": "17.11", "source_url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "revision": "58419c9b0dd42cb34c8d53695bb025a7e582edf55ccd4c5bcb1c2c7c71a37487", "evidence_kind": "English manual and source declarations", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "/docs/17/app-pgcombinebackup.html", "file": "app-pgcombinebackup.html", "label": "17.11 English manual \u00b7 app-pgcombinebackup.html", "anchor": "", "sha256": "7d3dc378adbf4ffedde01fda87dcfc82e7ea6ac0994045c6295b6dcc3b7ae650"}, {"url": "/docs/17/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "3194fc72ddad8e2fcba55f8e007f83413cb352146cb65aaa9457a18d0314ee1b"}], "sections": [], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "signature": "pg_combinebackup [ option ...] [ backup_directory ...]", "description": ["pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCOMBINEBACKUP\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_combinebackup</span></span></h2>\n<p>pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2>Synopsis</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.12.4.1\"><code class=\"command\">pg_combinebackup</code> [<em class=\"replaceable\"><code>option</code></em>...] [<em class=\"replaceable\"><code>backup_directory</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.5\">\n<h2>Description</h2>\n<p><span class=\"application\">pg_combinebackup</span> is used to reconstruct a synthetic full backup from an <a class=\"link\" href=\"/docs/17/continuous-archiving.html#BACKUP-INCREMENTAL-BACKUP\" title=\"25.3.3.\u00a0Making an Incremental Backup\">incremental backup</a> and the earlier backups upon which it depends.</p>\n<p>Specify all of the required backups on the command line from oldest to newest. That is, the first backup directory should be the path to the full backup, and the last should be the path to the final incremental backup that you wish to restore. The reconstructed backup will be written to the output directory specified by the <code class=\"option\">-o</code> option.</p>\n<p><span class=\"application\">pg_combinebackup</span> will attempt to verify that the backups you specify form a legal backup chain from which a correct full backup can be reconstructed. However, it is not designed to help you keep track of which backups depend on which other backups. If you remove one or more of the previous backups upon which your incremental backup relies, you will not be able to restore it. Moreover, <span class=\"application\">pg_combinebackup</span> only attempts to verify that the backups have the correct relationship to each other, not that each individual backup is intact; for that, use <a class=\"xref\" href=\"/docs/17/app-pgverifybackup.html\" title=\"pg_verifybackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_verifybackup</span></span></a>.</p>\n<p>Since the output of <span class=\"application\">pg_combinebackup</span> is a synthetic full backup, it can be used as an input to a future invocation of <span class=\"application\">pg_combinebackup</span>. The synthetic full backup would be specified on the command line in lieu of the chain of backups from which it was reconstructed.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.6\">\n<h2>Options</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d</code><br></span><span class=\"term\"><code class=\"option\">--debug</code></span></dt>\n<dd>\n<p>Print lots of debug logging output on <code class=\"filename\">stderr</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br></span><span class=\"term\"><code class=\"option\">--dry-run</code></span></dt>\n<dd>\n<p>The <code class=\"option\">-n</code>/<code class=\"option\">--dry-run</code> option instructs <code class=\"command\">pg_combinebackup</code> to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with <code class=\"option\">--debug</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p>By default, <code class=\"command\">pg_combinebackup</code> will wait for all files to be written safely to disk. This option causes <code class=\"command\">pg_combinebackup</code> to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>outputdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--output=<em class=\"replaceable\"><code>outputdir</code></em></code></span></dt>\n<dd>\n<p>Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-T <em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--tablespace-mapping=<em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code></span></dt>\n<dd>\n<p>Relocates the tablespace in directory <em class=\"replaceable\"><code>olddir</code></em> to <em class=\"replaceable\"><code>newdir</code></em> during the backup. <em class=\"replaceable\"><code>olddir</code></em> is the absolute path of the tablespace as it exists in the final backup specified on the command line, and <em class=\"replaceable\"><code>newdir</code></em> is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign (<code class=\"literal\">=</code>), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--clone</code></span></dt>\n<dd>\n<p>Use efficient file cloning (also known as <span class=\"quote\">\u201c<span class=\"quote\">reflinks</span>\u201d</span> on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n<p>File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the <span class=\"application\">pg_combinebackup</span> run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy</code></span></dt>\n<dd>\n<p>Perform regular file copy. This is the default. (See also <code class=\"option\">--copy-file-range</code> and <code class=\"option\">--clone</code>.)</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy-file-range</code></span></dt>\n<dd>\n<p>Use the <code class=\"function\">copy_file_range</code> system call for efficient copying. On some file systems this gives results similar to <code class=\"option\">--clone</code>, sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, <code class=\"function\">copy_file_range</code> will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--manifest-checksums=<em class=\"replaceable\"><code>algorithm</code></em></code></span></dt>\n<dd>\n<p>Like <a class=\"xref\" href=\"/docs/17/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a>, <span class=\"application\">pg_combinebackup</span> writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are <code class=\"literal\">NONE</code>, <code class=\"literal\">CRC32C</code>, <code class=\"literal\">SHA224</code>, <code class=\"literal\">SHA256</code>, <code class=\"literal\">SHA384</code>, and <code class=\"literal\">SHA512</code>. The default is <code class=\"literal\">CRC32C</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-manifest</code></span></dt>\n<dd>\n<p>Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p>When set to <code class=\"literal\">fsync</code>, which is the default, <code class=\"command\">pg_combinebackup</code> will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.</p>\n<p>On Linux, <code class=\"literal\">syncfs</code> may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, <code class=\"command\">pg_combinebackup</code> will also synchronize the file systems that contain the WAL files and each tablespace. See <a class=\"xref\" href=\"/docs/17/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a> for information about the caveats to be aware of when using <code class=\"literal\">syncfs</code>.</p>\n<p>This option has no effect when <code class=\"option\">--no-sync</code> is used.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p>Prints the <span class=\"application\">pg_combinebackup</span> version and exits.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p>Shows help about <span class=\"application\">pg_combinebackup</span> command line arguments, and exits.</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PGCOMBINEBACKUP-LIMITATIONS\">\n<h2>Limitations</h2>\n<p><code class=\"literal\">pg_combinebackup</code> does not recompute page checksums when writing the output directory. Therefore, if any of the backups used for reconstruction were taken with checksums disabled, but the final backup was taken with checksums enabled, the resulting directory may contain pages with invalid checksums.</p>\n<p>To avoid this problem, taking a new full backup after changing the checksum state of the cluster using <a class=\"xref\" href=\"/docs/17/app-pgchecksums.html\" title=\"pg_checksums\"><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></a> is recommended. Otherwise, you can disable and then optionally reenable checksums on the directory produced by <code class=\"literal\">pg_combinebackup</code> in order to correct the problem.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.8\">\n<h2>Environment</h2>\n<p>This utility, like most other <span class=\"productname\">PostgreSQL</span> utilities, uses the environment variables supported by <span class=\"application\">libpq</span> (see <a class=\"xref\" href=\"/docs/17/libpq-envars.html\" title=\"32.15.\u00a0Environment Variables\">Section\u00a032.15</a>).</p>\n<p>The environment variable <code class=\"envar\">PG_COLOR</code> specifies whether to use color in diagnostic messages. Possible values are <code class=\"literal\">always</code>, <code class=\"literal\">auto</code> and <code class=\"literal\">never</code>.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.9\">\n<h2>See Also</h2><span class=\"simplelist\"><a class=\"xref\" href=\"/docs/17/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgcombinebackup.html", "comparison_data": {"options": [{"names": ["-d", "--debug"], "signature": "-d --debug", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-n", "--dry-run"], "signature": "-n --dry-run", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "signature": "-o outputdir --output= outputdir", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "signature": "--clone", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "signature": "--copy", "description": "Perform regular file copy. This is the default. (See also --copy-file-range and --clone .)"}, {"names": ["--copy-file-range"], "signature": "--copy-file-range", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "signature": "--manifest-checksums= algorithm", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "signature": "--no-manifest", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "environment": []}, "comparison_hash": "7eb752e07531b38d0ef228bc60fc758f88cbc413a9711af1ee682342a26924fc"}, "18": {"facts": [{"label": "Documented executable", "value": "pg_combinebackup"}, {"label": "Executable version", "value": "18.6"}, {"label": "Reference inventory", "value": "Client applications"}, {"label": "Option definition groups", "value": "14"}], "tables": [{"key": "options", "rows": [{"summary": "Print lots of debug logging output on stderr .", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-d --debug"}}, {"summary": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-k --link"}}, {"summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-n --dry-run"}}, {"summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-N --no-sync"}}, {"summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-o outputdir --output= outputdir"}}, {"summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-T olddir = newdir --tablespace-mapping= olddir = newdir"}}, {"summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--clone"}}, {"summary": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--copy"}}, {"summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--copy-file-range"}}, {"summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--manifest-checksums= algorithm"}}, {"summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--no-manifest"}}, {"summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--sync-method= method"}}, {"summary": "Prints the pg_combinebackup version and exits.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-V --version"}}, {"summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-? --help"}}], "title": "Documented options", "columns": [{"key": "signature", "label": "Option and arguments"}, {"key": "summary", "label": "Description"}]}], "options": [{"names": ["-d", "--debug"], "summary": "Print lots of debug logging output on stderr .", "signature": "-d --debug", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-k", "--link"], "summary": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed.", "signature": "-k --link", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["-n", "--dry-run"], "summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": "-n --dry-run", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": "-N --no-sync", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": "-o outputdir --output= outputdir", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": "--clone", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "summary": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)", "signature": "--copy", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)"}, {"names": ["--copy-file-range"], "summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": "--copy-file-range", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": "--manifest-checksums= algorithm", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": "--no-manifest", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "summary": "Prints the pg_combinebackup version and exits.", "signature": "-V --version", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": "-? --help", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/18/postgresql-18-A4.pdf", "bytes": 15865106, "pages": 3154, "sha256": "19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/18/postgresql-18-US.pdf", "bytes": 15748059, "pages": 3328, "sha256": "facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319", "built_at": "2026-09-26"}}, "tree": "18", "index": "index.html", "major": "18", "pages": 1148, "release": "18.6", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "revision": "ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8", "evidence_kind": "English manual and source declarations", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "/docs/18/app-pgcombinebackup.html", "file": "app-pgcombinebackup.html", "label": "18.6 English manual \u00b7 app-pgcombinebackup.html", "anchor": "", "sha256": "919ea0092ca93f97635f32b55c31e519379c8f693b26f91826a9f9b8c4ba2717"}, {"url": "/docs/18/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "68f726af77272fe73a827be2b7b5958d0f2239a6f8ed44264e9d42496bfa4fd0"}], "sections": [], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "signature": "pg_combinebackup [ option ...] [ backup_directory ...]", "description": ["pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCOMBINEBACKUP\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_combinebackup</span></span></h2>\n<p>pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2>Synopsis</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.12.4.1\"><code class=\"command\">pg_combinebackup</code> [<em class=\"replaceable\"><code>option</code></em>...] [<em class=\"replaceable\"><code>backup_directory</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.5\">\n<h2>Description</h2>\n<p><span class=\"application\">pg_combinebackup</span> is used to reconstruct a synthetic full backup from an <a class=\"link\" href=\"/docs/18/continuous-archiving.html#BACKUP-INCREMENTAL-BACKUP\" title=\"25.3.3.\u00a0Making an Incremental Backup\">incremental backup</a> and the earlier backups upon which it depends.</p>\n<p>Specify all of the required backups on the command line from oldest to newest. That is, the first backup directory should be the path to the full backup, and the last should be the path to the final incremental backup that you wish to restore. The reconstructed backup will be written to the output directory specified by the <code class=\"option\">-o</code> option.</p>\n<p><span class=\"application\">pg_combinebackup</span> will attempt to verify that the backups you specify form a legal backup chain from which a correct full backup can be reconstructed. However, it is not designed to help you keep track of which backups depend on which other backups. If you remove one or more of the previous backups upon which your incremental backup relies, you will not be able to restore it. Moreover, <span class=\"application\">pg_combinebackup</span> only attempts to verify that the backups have the correct relationship to each other, not that each individual backup is intact; for that, use <a class=\"xref\" href=\"/docs/18/app-pgverifybackup.html\" title=\"pg_verifybackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_verifybackup</span></span></a>.</p>\n<p>Since the output of <span class=\"application\">pg_combinebackup</span> is a synthetic full backup, it can be used as an input to a future invocation of <span class=\"application\">pg_combinebackup</span>. The synthetic full backup would be specified on the command line in lieu of the chain of backups from which it was reconstructed.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.6\">\n<h2>Options</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d</code><br></span><span class=\"term\"><code class=\"option\">--debug</code></span></dt>\n<dd>\n<p>Print lots of debug logging output on <code class=\"filename\">stderr</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-k</code><br></span><span class=\"term\"><code class=\"option\">--link</code></span></dt>\n<dd>\n<p>Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after <span class=\"application\">pg_combinebackup</span> has completed.</p>\n<p>Requires that the input backups and the output directory are in the same file system.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br></span><span class=\"term\"><code class=\"option\">--dry-run</code></span></dt>\n<dd>\n<p>The <code class=\"option\">-n</code>/<code class=\"option\">--dry-run</code> option instructs <code class=\"command\">pg_combinebackup</code> to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with <code class=\"option\">--debug</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p>By default, <code class=\"command\">pg_combinebackup</code> will wait for all files to be written safely to disk. This option causes <code class=\"command\">pg_combinebackup</code> to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>outputdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--output=<em class=\"replaceable\"><code>outputdir</code></em></code></span></dt>\n<dd>\n<p>Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-T <em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--tablespace-mapping=<em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code></span></dt>\n<dd>\n<p>Relocates the tablespace in directory <em class=\"replaceable\"><code>olddir</code></em> to <em class=\"replaceable\"><code>newdir</code></em> during the backup. <em class=\"replaceable\"><code>olddir</code></em> is the absolute path of the tablespace as it exists in the final backup specified on the command line, and <em class=\"replaceable\"><code>newdir</code></em> is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign (<code class=\"literal\">=</code>), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--clone</code></span></dt>\n<dd>\n<p>Use efficient file cloning (also known as <span class=\"quote\">\u201c<span class=\"quote\">reflinks</span>\u201d</span> on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n<p>File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the <span class=\"application\">pg_combinebackup</span> run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy</code></span></dt>\n<dd>\n<p>Perform regular file copy. This is the default. (See also <code class=\"option\">--copy-file-range</code>, <code class=\"option\">--clone</code>, and <code class=\"option\">-k</code>/<code class=\"option\">--link</code>.)</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy-file-range</code></span></dt>\n<dd>\n<p>Use the <code class=\"function\">copy_file_range</code> system call for efficient copying. On some file systems this gives results similar to <code class=\"option\">--clone</code>, sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, <code class=\"function\">copy_file_range</code> will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--manifest-checksums=<em class=\"replaceable\"><code>algorithm</code></em></code></span></dt>\n<dd>\n<p>Like <a class=\"xref\" href=\"/docs/18/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a>, <span class=\"application\">pg_combinebackup</span> writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are <code class=\"literal\">NONE</code>, <code class=\"literal\">CRC32C</code>, <code class=\"literal\">SHA224</code>, <code class=\"literal\">SHA256</code>, <code class=\"literal\">SHA384</code>, and <code class=\"literal\">SHA512</code>. The default is <code class=\"literal\">CRC32C</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-manifest</code></span></dt>\n<dd>\n<p>Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p>When set to <code class=\"literal\">fsync</code>, which is the default, <code class=\"command\">pg_combinebackup</code> will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.</p>\n<p>On Linux, <code class=\"literal\">syncfs</code> may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, <code class=\"command\">pg_combinebackup</code> will also synchronize the file systems that contain the WAL files and each tablespace. See <a class=\"xref\" href=\"/docs/18/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a> for information about the caveats to be aware of when using <code class=\"literal\">syncfs</code>.</p>\n<p>This option has no effect when <code class=\"option\">--no-sync</code> is used.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p>Prints the <span class=\"application\">pg_combinebackup</span> version and exits.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p>Shows help about <span class=\"application\">pg_combinebackup</span> command line arguments, and exits.</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PGCOMBINEBACKUP-LIMITATIONS\">\n<h2>Limitations</h2>\n<p><code class=\"literal\">pg_combinebackup</code> does not recompute page checksums when writing the output directory. Therefore, if any of the backups used for reconstruction were taken with checksums disabled, but the final backup was taken with checksums enabled, the resulting directory may contain pages with invalid checksums.</p>\n<p>To avoid this problem, taking a new full backup after changing the checksum state of the cluster using <a class=\"xref\" href=\"/docs/18/app-pgchecksums.html\" title=\"pg_checksums\"><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></a> is recommended. Otherwise, you can disable and then optionally reenable checksums on the directory produced by <code class=\"literal\">pg_combinebackup</code> in order to correct the problem.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.8\">\n<h2>Environment</h2>\n<p>This utility, like most other <span class=\"productname\">PostgreSQL</span> utilities, uses the environment variables supported by <span class=\"application\">libpq</span> (see <a class=\"xref\" href=\"/docs/18/libpq-envars.html\" title=\"32.15.\u00a0Environment Variables\">Section\u00a032.15</a>).</p>\n<p>The environment variable <code class=\"envar\">PG_COLOR</code> specifies whether to use color in diagnostic messages. Possible values are <code class=\"literal\">always</code>, <code class=\"literal\">auto</code> and <code class=\"literal\">never</code>.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.9\">\n<h2>See Also</h2><span class=\"simplelist\"><a class=\"xref\" href=\"/docs/18/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgcombinebackup.html", "comparison_data": {"options": [{"names": ["-d", "--debug"], "signature": "-d --debug", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-k", "--link"], "signature": "-k --link", "description": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["-n", "--dry-run"], "signature": "-n --dry-run", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "signature": "-o outputdir --output= outputdir", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "signature": "--clone", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "signature": "--copy", "description": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)"}, {"names": ["--copy-file-range"], "signature": "--copy-file-range", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "signature": "--manifest-checksums= algorithm", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "signature": "--no-manifest", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "environment": []}, "comparison_hash": "59008256ecaf745d4645dde1d240c93697d28d59a42c9b28b8c7a30b44585384"}, "19": {"facts": [{"label": "Documented executable", "value": "pg_combinebackup"}, {"label": "Executable version", "value": "19beta4"}, {"label": "Reference inventory", "value": "Client applications"}, {"label": "Option definition groups", "value": "14"}], "tables": [{"key": "options", "rows": [{"summary": "Print lots of debug logging output on stderr .", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "-d --debug"}}, {"summary": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "-k --link"}}, {"summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "-n --dry-run"}}, {"summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "-N --no-sync"}}, {"summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "-o outputdir --output= outputdir"}}, {"summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "-T olddir = newdir --tablespace-mapping= olddir = newdir"}}, {"summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "--clone"}}, {"summary": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "--copy"}}, {"summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "--copy-file-range"}}, {"summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "--manifest-checksums= algorithm"}}, {"summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "--no-manifest"}}, {"summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "--sync-method= method"}}, {"summary": "Prints the pg_combinebackup version and exits.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "-V --version"}}, {"summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": {"url": "/docs/19/app-pgcombinebackup.html", "text": "-? --help"}}], "title": "Documented options", "columns": [{"key": "signature", "label": "Option and arguments"}, {"key": "summary", "label": "Description"}]}], "options": [{"names": ["-d", "--debug"], "summary": "Print lots of debug logging output on stderr .", "signature": "-d --debug", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-k", "--link"], "summary": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed.", "signature": "-k --link", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["-n", "--dry-run"], "summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": "-n --dry-run", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": "-N --no-sync", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": "-o outputdir --output= outputdir", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": "--clone", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "summary": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)", "signature": "--copy", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)"}, {"names": ["--copy-file-range"], "summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": "--copy-file-range", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": "--manifest-checksums= algorithm", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": "--no-manifest", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "summary": "Prints the pg_combinebackup version and exits.", "signature": "-V --version", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": "-? --help", "source_url": "/docs/19/app-pgcombinebackup.html", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/19/postgresql-19-A4.pdf", "bytes": 16064841, "pages": 3052, "sha256": "4dd099e4125c591128fc5f3ebd02178dc24781f9e5ae629f96d67c4c8547427b", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/19/postgresql-19-US.pdf", "bytes": 15974616, "pages": 3225, "sha256": "61971fa857f0956d47341a0388fa6af9ae10acf691d4b2fc009007d384b0342b", "built_at": "2026-09-26"}}, "tree": "19", "index": "index.html", "major": "19", "pages": 1155, "release": "19beta4", "source_url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "svg_assets": 5, "source_mode": "en SGML built with pinned official archive", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "revision": "1bbbbf4133d426f0e4304010688d2984c30fb67df0cc3a61b3e37eb3f6f37833", "evidence_kind": "English manual and source declarations", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "/docs/19/app-pgcombinebackup.html", "file": "app-pgcombinebackup.html", "label": "19beta4 English manual \u00b7 app-pgcombinebackup.html", "anchor": "", "sha256": "6c61f3ff400d0dabef7bff5f0e608b24873ae5429010906e9c4cabd1da3cf126"}, {"url": "/docs/19/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "c827f460db781b39da305303c88e73729a419cd2b2b9dedb126d8ad5cbf02c95"}], "sections": [], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "signature": "pg_combinebackup [ option ...] [ backup_directory ...]", "description": ["pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCOMBINEBACKUP\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_combinebackup</span></span></h2>\n<p>pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2>Synopsis</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.12.4.1\"><code class=\"command\">pg_combinebackup</code> [<em class=\"replaceable\"><code>option</code></em>...] [<em class=\"replaceable\"><code>backup_directory</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.5\">\n<h2>Description</h2>\n<p><span class=\"application\">pg_combinebackup</span> is used to reconstruct a synthetic full backup from an <a class=\"link\" href=\"/docs/19/continuous-archiving.html#BACKUP-INCREMENTAL-BACKUP\" title=\"25.3.3.\u00a0Making an Incremental Backup\">incremental backup</a> and the earlier backups upon which it depends.</p>\n<p>Specify all of the required backups on the command line from oldest to newest. That is, the first backup directory should be the path to the full backup, and the last should be the path to the final incremental backup that you wish to restore. The reconstructed backup will be written to the output directory specified by the <code class=\"option\">-o</code> option.</p>\n<p><span class=\"application\">pg_combinebackup</span> will attempt to verify that the backups you specify form a legal backup chain from which a correct full backup can be reconstructed. However, it is not designed to help you keep track of which backups depend on which other backups. If you remove one or more of the previous backups upon which your incremental backup relies, you will not be able to restore it. Moreover, <span class=\"application\">pg_combinebackup</span> only attempts to verify that the backups have the correct relationship to each other, not that each individual backup is intact; for that, use <a class=\"xref\" href=\"/docs/19/app-pgverifybackup.html\" title=\"pg_verifybackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_verifybackup</span></span></a>.</p>\n<p>Since the output of <span class=\"application\">pg_combinebackup</span> is a synthetic full backup, it can be used as an input to a future invocation of <span class=\"application\">pg_combinebackup</span>. The synthetic full backup would be specified on the command line in lieu of the chain of backups from which it was reconstructed.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.6\">\n<h2>Options</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d</code><br></span><span class=\"term\"><code class=\"option\">--debug</code></span></dt>\n<dd>\n<p>Print lots of debug logging output on <code class=\"filename\">stderr</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-k</code><br></span><span class=\"term\"><code class=\"option\">--link</code></span></dt>\n<dd>\n<p>Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after <span class=\"application\">pg_combinebackup</span> has completed.</p>\n<p>Requires that the input backups and the output directory are in the same file system.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br></span><span class=\"term\"><code class=\"option\">--dry-run</code></span></dt>\n<dd>\n<p>The <code class=\"option\">-n</code>/<code class=\"option\">--dry-run</code> option instructs <code class=\"command\">pg_combinebackup</code> to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with <code class=\"option\">--debug</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p>By default, <code class=\"command\">pg_combinebackup</code> will wait for all files to be written safely to disk. This option causes <code class=\"command\">pg_combinebackup</code> to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>outputdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--output=<em class=\"replaceable\"><code>outputdir</code></em></code></span></dt>\n<dd>\n<p>Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-T <em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--tablespace-mapping=<em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code></span></dt>\n<dd>\n<p>Relocates the tablespace in directory <em class=\"replaceable\"><code>olddir</code></em> to <em class=\"replaceable\"><code>newdir</code></em> during the backup. <em class=\"replaceable\"><code>olddir</code></em> is the absolute path of the tablespace as it exists in the final backup specified on the command line, and <em class=\"replaceable\"><code>newdir</code></em> is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign (<code class=\"literal\">=</code>), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--clone</code></span></dt>\n<dd>\n<p>Use efficient file cloning (also known as <span class=\"quote\">\u201c<span class=\"quote\">reflinks</span>\u201d</span> on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n<p>File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the <span class=\"application\">pg_combinebackup</span> run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy</code></span></dt>\n<dd>\n<p>Perform regular file copy. This is the default. (See also <code class=\"option\">--copy-file-range</code>, <code class=\"option\">--clone</code>, and <code class=\"option\">-k</code>/<code class=\"option\">--link</code>.)</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy-file-range</code></span></dt>\n<dd>\n<p>Use the <code class=\"function\">copy_file_range</code> system call for efficient copying. On some file systems this gives results similar to <code class=\"option\">--clone</code>, sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, <code class=\"function\">copy_file_range</code> will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--manifest-checksums=<em class=\"replaceable\"><code>algorithm</code></em></code></span></dt>\n<dd>\n<p>Like <a class=\"xref\" href=\"/docs/19/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a>, <span class=\"application\">pg_combinebackup</span> writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are <code class=\"literal\">NONE</code>, <code class=\"literal\">CRC32C</code>, <code class=\"literal\">SHA224</code>, <code class=\"literal\">SHA256</code>, <code class=\"literal\">SHA384</code>, and <code class=\"literal\">SHA512</code>. The default is <code class=\"literal\">CRC32C</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-manifest</code></span></dt>\n<dd>\n<p>Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p>When set to <code class=\"literal\">fsync</code>, which is the default, <code class=\"command\">pg_combinebackup</code> will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.</p>\n<p>On Linux, <code class=\"literal\">syncfs</code> may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, <code class=\"command\">pg_combinebackup</code> will also synchronize the file systems that contain the WAL files and each tablespace. See <a class=\"xref\" href=\"/docs/19/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a> for information about the caveats to be aware of when using <code class=\"literal\">syncfs</code>.</p>\n<p>This option has no effect when <code class=\"option\">--no-sync</code> is used.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p>Prints the <span class=\"application\">pg_combinebackup</span> version and exits.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p>Shows help about <span class=\"application\">pg_combinebackup</span> command line arguments, and exits.</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PGCOMBINEBACKUP-LIMITATIONS\">\n<h2>Limitations</h2>\n<p><code class=\"literal\">pg_combinebackup</code> does not recompute page checksums when writing the output directory. Therefore, if any of the backups used for reconstruction were taken with checksums disabled, but the final backup was taken with checksums enabled, the resulting directory may contain pages with invalid checksums.</p>\n<p>To avoid this problem, taking a new full backup after changing the checksum state of the cluster using <a class=\"xref\" href=\"/docs/19/app-pgchecksums.html\" title=\"pg_checksums\"><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></a> is recommended. Otherwise, you can disable and then optionally reenable checksums on the directory produced by <code class=\"literal\">pg_combinebackup</code> in order to correct the problem.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.8\">\n<h2>Environment</h2>\n<p>This utility, like most other <span class=\"productname\">PostgreSQL</span> utilities, uses the environment variables supported by <span class=\"application\">libpq</span> (see <a class=\"xref\" href=\"/docs/19/libpq-envars.html\" title=\"32.15.\u00a0Environment Variables\">Section\u00a032.15</a>).</p>\n<p>The environment variable <code class=\"envar\">PG_COLOR</code> specifies whether to use color in diagnostic messages. Possible values are <code class=\"literal\">always</code>, <code class=\"literal\">auto</code> and <code class=\"literal\">never</code>.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.9\">\n<h2>See Also</h2><span class=\"simplelist\"><a class=\"xref\" href=\"/docs/19/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgcombinebackup.html", "comparison_data": {"options": [{"names": ["-d", "--debug"], "signature": "-d --debug", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-k", "--link"], "signature": "-k --link", "description": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["-n", "--dry-run"], "signature": "-n --dry-run", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "signature": "-o outputdir --output= outputdir", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "signature": "--clone", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "signature": "--copy", "description": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)"}, {"names": ["--copy-file-range"], "signature": "--copy-file-range", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "signature": "--manifest-checksums= algorithm", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "signature": "--no-manifest", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "environment": []}, "comparison_hash": "59008256ecaf745d4645dde1d240c93697d28d59a42c9b28b8c7a30b44585384"}, "20": {"facts": [{"label": "Documented executable", "value": "pg_combinebackup"}, {"label": "Executable version", "value": "20devel"}, {"label": "Reference inventory", "value": "Client applications"}, {"label": "Option definition groups", "value": "14"}], "tables": [{"key": "options", "rows": [{"summary": "Print lots of debug logging output on stderr .", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "-d --debug"}}, {"summary": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "-k --link"}}, {"summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "-n --dry-run"}}, {"summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "-N --no-sync"}}, {"summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "-o outputdir --output= outputdir"}}, {"summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "-T olddir = newdir --tablespace-mapping= olddir = newdir"}}, {"summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "--clone"}}, {"summary": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "--copy"}}, {"summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "--copy-file-range"}}, {"summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "--manifest-checksums= algorithm"}}, {"summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "--no-manifest"}}, {"summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "--sync-method= method"}}, {"summary": "Prints the pg_combinebackup version and exits.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "-V --version"}}, {"summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": {"url": "/docs/devel/app-pgcombinebackup.html", "text": "-? --help"}}], "title": "Documented options", "columns": [{"key": "signature", "label": "Option and arguments"}, {"key": "summary", "label": "Description"}]}], "options": [{"names": ["-d", "--debug"], "summary": "Print lots of debug logging output on stderr .", "signature": "-d --debug", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-k", "--link"], "summary": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed.", "signature": "-k --link", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["-n", "--dry-run"], "summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": "-n --dry-run", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": "-N --no-sync", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": "-o outputdir --output= outputdir", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": "--clone", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "summary": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)", "signature": "--copy", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)"}, {"names": ["--copy-file-range"], "summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": "--copy-file-range", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": "--manifest-checksums= algorithm", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": "--no-manifest", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "summary": "Prints the pg_combinebackup version and exits.", "signature": "-V --version", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": "-? --help", "source_url": "/docs/devel/app-pgcombinebackup.html", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/20/postgresql-20-A4.pdf", "bytes": 16030631, "pages": 3052, "sha256": "bd5d82c0ce38fc18f92a0447818a91a193a261776bca1c37564bf9a683e177d0", "built_at": "2026-09-28"}, "US": {"url": "/files/documentation/pdf/20/postgresql-20-US.pdf", "bytes": 15936613, "pages": 3223, "sha256": "d97d9e0db479a02f4234b175f50fcad70c3661619afc8d6df9b9437882e3c299", "built_at": "2026-09-28"}}, "tree": "0", "index": "index.html", "major": "20", "pages": 1156, "release": "20devel", "source_url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "svg_assets": 6, "source_mode": "en SGML built with pinned official archive", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41", "source_snapshot_utc": "26-Sep-2026 20:22"}, "revision": "2eba5e0fd4c3bffb2803247b6cd537878e9d6ee5a6dfbe3c50ece8b421b80918", "evidence_kind": "English manual and source declarations", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "/docs/devel/app-pgcombinebackup.html", "file": "app-pgcombinebackup.html", "label": "20devel English manual \u00b7 app-pgcombinebackup.html", "anchor": "", "sha256": "545558c92c35ffcdb8dd24c0490590ae2eeb4770537963a4fb6072830b85e7e4"}, {"url": "/docs/devel/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "a6c7ba748fa1d9feac5bb7cde41d1d36a1f4c26d5963e07fb103d02918b2a8ca"}], "sections": [], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "signature": "pg_combinebackup [ option ...] [ backup_directory ...]", "description": ["pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCOMBINEBACKUP\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_combinebackup</span></span></h2>\n<p>pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2>Synopsis</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.12.4.1\"><code class=\"command\">pg_combinebackup</code> [<em class=\"replaceable\"><code>option</code></em>...] [<em class=\"replaceable\"><code>backup_directory</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.5\">\n<h2>Description</h2>\n<p><span class=\"application\">pg_combinebackup</span> is used to reconstruct a synthetic full backup from an <a class=\"link\" href=\"/docs/devel/continuous-archiving.html#BACKUP-INCREMENTAL-BACKUP\" title=\"25.3.3.\u00a0Making an Incremental Backup\">incremental backup</a> and the earlier backups upon which it depends.</p>\n<p>Specify all of the required backups on the command line from oldest to newest. That is, the first backup directory should be the path to the full backup, and the last should be the path to the final incremental backup that you wish to restore. The reconstructed backup will be written to the output directory specified by the <code class=\"option\">-o</code> option.</p>\n<p><span class=\"application\">pg_combinebackup</span> will attempt to verify that the backups you specify form a legal backup chain from which a correct full backup can be reconstructed. However, it is not designed to help you keep track of which backups depend on which other backups. If you remove one or more of the previous backups upon which your incremental backup relies, you will not be able to restore it. Moreover, <span class=\"application\">pg_combinebackup</span> only attempts to verify that the backups have the correct relationship to each other, not that each individual backup is intact; for that, use <a class=\"xref\" href=\"/docs/devel/app-pgverifybackup.html\" title=\"pg_verifybackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_verifybackup</span></span></a>.</p>\n<p>Since the output of <span class=\"application\">pg_combinebackup</span> is a synthetic full backup, it can be used as an input to a future invocation of <span class=\"application\">pg_combinebackup</span>. The synthetic full backup would be specified on the command line in lieu of the chain of backups from which it was reconstructed.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.6\">\n<h2>Options</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d</code><br></span><span class=\"term\"><code class=\"option\">--debug</code></span></dt>\n<dd>\n<p>Print lots of debug logging output on <code class=\"filename\">stderr</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-k</code><br></span><span class=\"term\"><code class=\"option\">--link</code></span></dt>\n<dd>\n<p>Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after <span class=\"application\">pg_combinebackup</span> has completed.</p>\n<p>Requires that the input backups and the output directory are in the same file system.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br></span><span class=\"term\"><code class=\"option\">--dry-run</code></span></dt>\n<dd>\n<p>The <code class=\"option\">-n</code>/<code class=\"option\">--dry-run</code> option instructs <code class=\"command\">pg_combinebackup</code> to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with <code class=\"option\">--debug</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p>By default, <code class=\"command\">pg_combinebackup</code> will wait for all files to be written safely to disk. This option causes <code class=\"command\">pg_combinebackup</code> to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>outputdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--output=<em class=\"replaceable\"><code>outputdir</code></em></code></span></dt>\n<dd>\n<p>Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-T <em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--tablespace-mapping=<em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code></span></dt>\n<dd>\n<p>Relocates the tablespace in directory <em class=\"replaceable\"><code>olddir</code></em> to <em class=\"replaceable\"><code>newdir</code></em> during the backup. <em class=\"replaceable\"><code>olddir</code></em> is the absolute path of the tablespace as it exists in the final backup specified on the command line, and <em class=\"replaceable\"><code>newdir</code></em> is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign (<code class=\"literal\">=</code>), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--clone</code></span></dt>\n<dd>\n<p>Use efficient file cloning (also known as <span class=\"quote\">\u201c<span class=\"quote\">reflinks</span>\u201d</span> on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n<p>File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the <span class=\"application\">pg_combinebackup</span> run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy</code></span></dt>\n<dd>\n<p>Perform regular file copy. This is the default. (See also <code class=\"option\">--copy-file-range</code>, <code class=\"option\">--clone</code>, and <code class=\"option\">-k</code>/<code class=\"option\">--link</code>.)</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy-file-range</code></span></dt>\n<dd>\n<p>Use the <code class=\"function\">copy_file_range</code> system call for efficient copying. On some file systems this gives results similar to <code class=\"option\">--clone</code>, sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, <code class=\"function\">copy_file_range</code> will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--manifest-checksums=<em class=\"replaceable\"><code>algorithm</code></em></code></span></dt>\n<dd>\n<p>Like <a class=\"xref\" href=\"/docs/devel/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a>, <span class=\"application\">pg_combinebackup</span> writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are <code class=\"literal\">NONE</code>, <code class=\"literal\">CRC32C</code>, <code class=\"literal\">SHA224</code>, <code class=\"literal\">SHA256</code>, <code class=\"literal\">SHA384</code>, and <code class=\"literal\">SHA512</code>. The default is <code class=\"literal\">CRC32C</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-manifest</code></span></dt>\n<dd>\n<p>Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p>When set to <code class=\"literal\">fsync</code>, which is the default, <code class=\"command\">pg_combinebackup</code> will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.</p>\n<p>On Linux, <code class=\"literal\">syncfs</code> may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, <code class=\"command\">pg_combinebackup</code> will also synchronize the file systems that contain the WAL files and each tablespace. See <a class=\"xref\" href=\"/docs/devel/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a> for information about the caveats to be aware of when using <code class=\"literal\">syncfs</code>.</p>\n<p>This option has no effect when <code class=\"option\">--no-sync</code> is used.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p>Prints the <span class=\"application\">pg_combinebackup</span> version and exits.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p>Shows help about <span class=\"application\">pg_combinebackup</span> command line arguments, and exits.</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PGCOMBINEBACKUP-LIMITATIONS\">\n<h2>Limitations</h2>\n<p><code class=\"literal\">pg_combinebackup</code> does not recompute page checksums when writing the output directory. It therefore refuses a chain in which some of the backups used for reconstruction were taken with checksums disabled but the final backup was taken with checksums enabled: the resulting directory would contain pages with invalid checksums, and the cluster would fail checksum verification as soon as it reads them. Take a new full backup after enabling data checksums with <a class=\"xref\" href=\"/docs/devel/app-pgchecksums.html\" title=\"pg_checksums\"><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></a>.</p>\n<p>The reverse case is accepted: when the final backup was taken with checksums disabled, stale checksums copied from an earlier backup are never verified.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.8\">\n<h2>Environment</h2>\n<p>This utility, like most other <span class=\"productname\">PostgreSQL</span> utilities, uses the environment variables supported by <span class=\"application\">libpq</span> (see <a class=\"xref\" href=\"/docs/devel/libpq-envars.html\" title=\"32.14.\u00a0Environment Variables\">Section\u00a032.14</a>).</p>\n<p>The environment variable <code class=\"envar\">PG_COLOR</code> specifies whether to use color in diagnostic messages. Possible values are <code class=\"literal\">always</code>, <code class=\"literal\">auto</code> and <code class=\"literal\">never</code>.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.9\">\n<h2>See Also</h2><span class=\"simplelist\"><a class=\"xref\" href=\"/docs/devel/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgcombinebackup.html", "comparison_data": {"options": [{"names": ["-d", "--debug"], "signature": "-d --debug", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-k", "--link"], "signature": "-k --link", "description": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["-n", "--dry-run"], "signature": "-n --dry-run", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "signature": "-o outputdir --output= outputdir", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "signature": "--clone", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "signature": "--copy", "description": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)"}, {"names": ["--copy-file-range"], "signature": "--copy-file-range", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "signature": "--manifest-checksums= algorithm", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "signature": "--no-manifest", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "environment": []}, "comparison_hash": "59008256ecaf745d4645dde1d240c93697d28d59a42c9b28b8c7a30b44585384"}}}, "snapshot": {"facts": [{"label": "Documented executable", "value": "pg_combinebackup"}, {"label": "Executable version", "value": "18.6"}, {"label": "Reference inventory", "value": "Client applications"}, {"label": "Option definition groups", "value": "14"}], "tables": [{"key": "options", "rows": [{"summary": "Print lots of debug logging output on stderr .", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-d --debug"}}, {"summary": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-k --link"}}, {"summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-n --dry-run"}}, {"summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-N --no-sync"}}, {"summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-o outputdir --output= outputdir"}}, {"summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-T olddir = newdir --tablespace-mapping= olddir = newdir"}}, {"summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--clone"}}, {"summary": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--copy"}}, {"summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--copy-file-range"}}, {"summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--manifest-checksums= algorithm"}}, {"summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--no-manifest"}}, {"summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "--sync-method= method"}}, {"summary": "Prints the pg_combinebackup version and exits.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-V --version"}}, {"summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": {"url": "/docs/18/app-pgcombinebackup.html", "text": "-? --help"}}], "title": "Documented options", "columns": [{"key": "signature", "label": "Option and arguments"}, {"key": "summary", "label": "Description"}]}], "options": [{"names": ["-d", "--debug"], "summary": "Print lots of debug logging output on stderr .", "signature": "-d --debug", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-k", "--link"], "summary": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed.", "signature": "-k --link", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["-n", "--dry-run"], "summary": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .", "signature": "-n --dry-run", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "summary": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.", "signature": "-N --no-sync", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "summary": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.", "signature": "-o outputdir --output= outputdir", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "summary": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.", "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "summary": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.", "signature": "--clone", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "summary": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)", "signature": "--copy", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)"}, {"names": ["--copy-file-range"], "summary": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.", "signature": "--copy-file-range", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "summary": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C .", "signature": "--manifest-checksums= algorithm", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "summary": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.", "signature": "--no-manifest", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "summary": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.", "signature": "--sync-method= method", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "summary": "Prints the pg_combinebackup version and exits.", "signature": "-V --version", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "summary": "Shows help about pg_combinebackup command line arguments, and exits.", "signature": "-? --help", "source_url": "/docs/18/app-pgcombinebackup.html", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "related": [], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/18/postgresql-18-A4.pdf", "bytes": 15865106, "pages": 3154, "sha256": "19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/18/postgresql-18-US.pdf", "bytes": 15748059, "pages": 3328, "sha256": "facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319", "built_at": "2026-09-26"}}, "tree": "18", "index": "index.html", "major": "18", "pages": 1148, "release": "18.6", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "revision": "ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8", "evidence_kind": "English manual and source declarations", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "/docs/18/app-pgcombinebackup.html", "file": "app-pgcombinebackup.html", "label": "18.6 English manual \u00b7 app-pgcombinebackup.html", "anchor": "", "sha256": "919ea0092ca93f97635f32b55c31e519379c8f693b26f91826a9f9b8c4ba2717"}, {"url": "/docs/18/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "68f726af77272fe73a827be2b7b5958d0f2239a6f8ed44264e9d42496bfa4fd0"}], "sections": [], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "signature": "pg_combinebackup [ option ...] [ backup_directory ...]", "description": ["pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups"], "environment": [], "manual_html": "<div><div class=\"refentry\" id=\"APP-PGCOMBINEBACKUP\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_combinebackup</span></span></h2>\n<p>pg_combinebackup \u2014 reconstruct a full backup from an incremental backup and dependent backups</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2>Synopsis</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.12.4.1\"><code class=\"command\">pg_combinebackup</code> [<em class=\"replaceable\"><code>option</code></em>...] [<em class=\"replaceable\"><code>backup_directory</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.5\">\n<h2>Description</h2>\n<p><span class=\"application\">pg_combinebackup</span> is used to reconstruct a synthetic full backup from an <a class=\"link\" href=\"/docs/18/continuous-archiving.html#BACKUP-INCREMENTAL-BACKUP\" title=\"25.3.3.\u00a0Making an Incremental Backup\">incremental backup</a> and the earlier backups upon which it depends.</p>\n<p>Specify all of the required backups on the command line from oldest to newest. That is, the first backup directory should be the path to the full backup, and the last should be the path to the final incremental backup that you wish to restore. The reconstructed backup will be written to the output directory specified by the <code class=\"option\">-o</code> option.</p>\n<p><span class=\"application\">pg_combinebackup</span> will attempt to verify that the backups you specify form a legal backup chain from which a correct full backup can be reconstructed. However, it is not designed to help you keep track of which backups depend on which other backups. If you remove one or more of the previous backups upon which your incremental backup relies, you will not be able to restore it. Moreover, <span class=\"application\">pg_combinebackup</span> only attempts to verify that the backups have the correct relationship to each other, not that each individual backup is intact; for that, use <a class=\"xref\" href=\"/docs/18/app-pgverifybackup.html\" title=\"pg_verifybackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_verifybackup</span></span></a>.</p>\n<p>Since the output of <span class=\"application\">pg_combinebackup</span> is a synthetic full backup, it can be used as an input to a future invocation of <span class=\"application\">pg_combinebackup</span>. The synthetic full backup would be specified on the command line in lieu of the chain of backups from which it was reconstructed.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.6\">\n<h2>Options</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d</code><br></span><span class=\"term\"><code class=\"option\">--debug</code></span></dt>\n<dd>\n<p>Print lots of debug logging output on <code class=\"filename\">stderr</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-k</code><br></span><span class=\"term\"><code class=\"option\">--link</code></span></dt>\n<dd>\n<p>Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after <span class=\"application\">pg_combinebackup</span> has completed.</p>\n<p>Requires that the input backups and the output directory are in the same file system.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-n</code><br></span><span class=\"term\"><code class=\"option\">--dry-run</code></span></dt>\n<dd>\n<p>The <code class=\"option\">-n</code>/<code class=\"option\">--dry-run</code> option instructs <code class=\"command\">pg_combinebackup</code> to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with <code class=\"option\">--debug</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-N</code><br></span><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p>By default, <code class=\"command\">pg_combinebackup</code> will wait for all files to be written safely to disk. This option causes <code class=\"command\">pg_combinebackup</code> to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o <em class=\"replaceable\"><code>outputdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--output=<em class=\"replaceable\"><code>outputdir</code></em></code></span></dt>\n<dd>\n<p>Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-T <em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code><br></span><span class=\"term\"><code class=\"option\">--tablespace-mapping=<em class=\"replaceable\"><code>olddir</code></em>=<em class=\"replaceable\"><code>newdir</code></em></code></span></dt>\n<dd>\n<p>Relocates the tablespace in directory <em class=\"replaceable\"><code>olddir</code></em> to <em class=\"replaceable\"><code>newdir</code></em> during the backup. <em class=\"replaceable\"><code>olddir</code></em> is the absolute path of the tablespace as it exists in the final backup specified on the command line, and <em class=\"replaceable\"><code>newdir</code></em> is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign (<code class=\"literal\">=</code>), precede that with a backslash. This option can be specified multiple times for multiple tablespaces.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--clone</code></span></dt>\n<dd>\n<p>Use efficient file cloning (also known as <span class=\"quote\">\u201c<span class=\"quote\">reflinks</span>\u201d</span> on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n<p>File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the <span class=\"application\">pg_combinebackup</span> run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy</code></span></dt>\n<dd>\n<p>Perform regular file copy. This is the default. (See also <code class=\"option\">--copy-file-range</code>, <code class=\"option\">--clone</code>, and <code class=\"option\">-k</code>/<code class=\"option\">--link</code>.)</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--copy-file-range</code></span></dt>\n<dd>\n<p>Use the <code class=\"function\">copy_file_range</code> system call for efficient copying. On some file systems this gives results similar to <code class=\"option\">--clone</code>, sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD.</p>\n<p>If a backup manifest is not available or does not contain checksum of the right type, <code class=\"function\">copy_file_range</code> will be used to copy the file, but the file will be also read block-by-block for the checksum calculation.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--manifest-checksums=<em class=\"replaceable\"><code>algorithm</code></em></code></span></dt>\n<dd>\n<p>Like <a class=\"xref\" href=\"/docs/18/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a>, <span class=\"application\">pg_combinebackup</span> writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are <code class=\"literal\">NONE</code>, <code class=\"literal\">CRC32C</code>, <code class=\"literal\">SHA224</code>, <code class=\"literal\">SHA256</code>, <code class=\"literal\">SHA384</code>, and <code class=\"literal\">SHA512</code>. The default is <code class=\"literal\">CRC32C</code>.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-manifest</code></span></dt>\n<dd>\n<p>Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sync-method=<em class=\"replaceable\"><code>method</code></em></code></span></dt>\n<dd>\n<p>When set to <code class=\"literal\">fsync</code>, which is the default, <code class=\"command\">pg_combinebackup</code> will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace.</p>\n<p>On Linux, <code class=\"literal\">syncfs</code> may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, <code class=\"command\">pg_combinebackup</code> will also synchronize the file systems that contain the WAL files and each tablespace. See <a class=\"xref\" href=\"/docs/18/runtime-config-error-handling.html#GUC-RECOVERY-INIT-SYNC-METHOD\">recovery_init_sync_method</a> for information about the caveats to be aware of when using <code class=\"literal\">syncfs</code>.</p>\n<p>This option has no effect when <code class=\"option\">--no-sync</code> is used.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p>Prints the <span class=\"application\">pg_combinebackup</span> version and exits.</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p>Shows help about <span class=\"application\">pg_combinebackup</span> command line arguments, and exits.</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PGCOMBINEBACKUP-LIMITATIONS\">\n<h2>Limitations</h2>\n<p><code class=\"literal\">pg_combinebackup</code> does not recompute page checksums when writing the output directory. Therefore, if any of the backups used for reconstruction were taken with checksums disabled, but the final backup was taken with checksums enabled, the resulting directory may contain pages with invalid checksums.</p>\n<p>To avoid this problem, taking a new full backup after changing the checksum state of the cluster using <a class=\"xref\" href=\"/docs/18/app-pgchecksums.html\" title=\"pg_checksums\"><span class=\"refentrytitle\"><span class=\"application\">pg_checksums</span></span></a> is recommended. Otherwise, you can disable and then optionally reenable checksums on the directory produced by <code class=\"literal\">pg_combinebackup</code> in order to correct the problem.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.8\">\n<h2>Environment</h2>\n<p>This utility, like most other <span class=\"productname\">PostgreSQL</span> utilities, uses the environment variables supported by <span class=\"application\">libpq</span> (see <a class=\"xref\" href=\"/docs/18/libpq-envars.html\" title=\"32.15.\u00a0Environment Variables\">Section\u00a032.15</a>).</p>\n<p>The environment variable <code class=\"envar\">PG_COLOR</code> specifies whether to use color in diagnostic messages. Possible values are <code class=\"literal\">always</code>, <code class=\"literal\">auto</code> and <code class=\"literal\">never</code>.</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.12.9\">\n<h2>See Also</h2><span class=\"simplelist\"><a class=\"xref\" href=\"/docs/18/app-pgbasebackup.html\" title=\"pg_basebackup\"><span class=\"refentrytitle\"><span class=\"application\">pg_basebackup</span></span></a></span>\n</div>\n</div></div>", "manual_path": "app-pgcombinebackup.html", "comparison_data": {"options": [{"names": ["-d", "--debug"], "signature": "-d --debug", "description": "Print lots of debug logging output on stderr ."}, {"names": ["-k", "--link"], "signature": "-k --link", "description": "Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["-n", "--dry-run"], "signature": "-n --dry-run", "description": "The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug ."}, {"names": ["-N", "--no-sync"], "signature": "-N --no-sync", "description": "By default, pg_combinebackup will wait for all files to be written safely to disk. This option causes pg_combinebackup to return without waiting, which is faster, but means that a subsequent operating system crash can leave the output backup corrupt. Generally, this option is useful for testing but should not be used when creating a production installation."}, {"names": ["-o outputdir", "--output= outputdir"], "signature": "-o outputdir --output= outputdir", "description": "Specifies the output directory to which the synthetic full backup should be written. Currently, this argument is required."}, {"names": ["-T olddir = newdir", "--tablespace-mapping= olddir = newdir"], "signature": "-T olddir = newdir --tablespace-mapping= olddir = newdir", "description": "Relocates the tablespace in directory olddir to newdir during the backup. olddir is the absolute path of the tablespace as it exists in the final backup specified on the command line, and newdir is the absolute path to use for the tablespace in the reconstructed backup. If either path needs to contain an equal sign ( = ), precede that with a backslash. This option can be specified multiple times for multiple tablespaces."}, {"names": ["--clone"], "signature": "--clone", "description": "Use efficient file cloning (also known as \u201c reflinks \u201d on some systems) instead of copying files to the new data directory, which can result in near-instantaneous copying of the data files. If a backup manifest is not available or does not contain checksum of the right type, file cloning will be used to copy the file, but the file will be also read block-by-block for the checksum calculation. File cloning is only supported on some operating systems and file systems. If it is selected but not supported, the pg_combinebackup run will error. At present, it is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on file systems created with reflink support), and on macOS with APFS."}, {"names": ["--copy"], "signature": "--copy", "description": "Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)"}, {"names": ["--copy-file-range"], "signature": "--copy-file-range", "description": "Use the copy_file_range system call for efficient copying. On some file systems this gives results similar to --clone , sharing physical disk blocks, while on others it may still copy blocks, but do so via an optimized path. At present, it is supported on Linux and FreeBSD. If a backup manifest is not available or does not contain checksum of the right type, copy_file_range will be used to copy the file, but the file will be also read block-by-block for the checksum calculation."}, {"names": ["--manifest-checksums= algorithm"], "signature": "--manifest-checksums= algorithm", "description": "Like pg_basebackup , pg_combinebackup writes a backup manifest in the output directory. This option specifies the checksum algorithm that should be applied to each file included in the backup manifest. Currently, the available algorithms are NONE , CRC32C , SHA224 , SHA256 , SHA384 , and SHA512 . The default is CRC32C ."}, {"names": ["--no-manifest"], "signature": "--no-manifest", "description": "Disables generation of a backup manifest. If this option is not specified, a backup manifest for the reconstructed backup will be written to the output directory."}, {"names": ["--sync-method= method"], "signature": "--sync-method= method", "description": "When set to fsync , which is the default, pg_combinebackup will recursively open and synchronize all files in the backup directory. When the plain format is used, the search for files will follow symbolic links for the WAL directory and each configured tablespace. On Linux, syncfs may be used instead to ask the operating system to synchronize the whole file system that contains the backup directory. When the plain format is used, pg_combinebackup will also synchronize the file systems that contain the WAL files and each tablespace. See recovery_init_sync_method for information about the caveats to be aware of when using syncfs . This option has no effect when --no-sync is used."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Prints the pg_combinebackup version and exits."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Shows help about pg_combinebackup command line arguments, and exits."}], "synopsis": ["pg_combinebackup [ option ...] [ backup_directory ...]"], "environment": []}, "comparison_hash": "59008256ecaf745d4645dde1d240c93697d28d59a42c9b28b8c7a30b44585384"}, "comparison": {"left": "17", "right": "18", "status": "changed", "diff": "--- PostgreSQL 17\n+++ PostgreSQL 18\n@@ -8,6 +8,14 @@\n         \"--debug\"\n       ],\n       \"signature\": \"-d --debug\"\n+    },\n+    {\n+      \"description\": \"Use hard links instead of copying files to the synthetic backup. Reconstruction of the synthetic backup might be faster (no file copying) and use less disk space, but care must be taken when using the output directory, because any modifications to that directory (for example, starting the server) can also affect the input directories. Likewise, changes to the input directories (for example, starting the server on the full backup) could affect the output directory. Thus, this option is best used when the input directories are only copies that will be removed after pg_combinebackup has completed. Requires that the input backups and the output directory are in the same file system. If a backup manifest is not available or does not contain checksum of the right type, hard links will still be created, but the file will be also read block-by-block for the checksum calculation.\",\n+      \"names\": [\n+        \"-k\",\n+        \"--link\"\n+      ],\n+      \"signature\": \"-k --link\"\n     },\n     {\n       \"description\": \"The -n / --dry-run option instructs pg_combinebackup to figure out what would be done without actually creating the target directory or any output files. It is particularly useful in combination with --debug .\",\n@@ -49,7 +57,7 @@\n       \"signature\": \"--clone\"\n     },\n     {\n-      \"description\": \"Perform regular file copy. This is the default. (See also --copy-file-range and --clone .)\",\n+      \"description\": \"Perform regular file copy. This is the default. (See also --copy-file-range , --clone , and -k / --link .)\",\n       \"names\": [\n         \"--copy\"\n       ],"}}