1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00
pgbackrest/test/expect
David Steele 34d649579e
Bundle files in the repository during backup.
Bundle (combine) smaller files during backup to reduce the number of files written to the repository (enable with --bundle). Reducing the number of files is a benefit on all file systems, but especially so on object stores such as S3 that have a high file creation cost. Another benefit is that zero-length files are only stored as metadata in the manifest.

Files are batched up to bundle-size and then compressed/encrypted individually and stored sequentially in the bundle. The bundle id and offset of each file is stored in the manifest so files can be retrieved randomly without needing to read the entire bundle. Files are ordered by timestamp descending when being assigned to bundles to reduce the amount of random access that needs to be done. The idea is that bundles with older files can be read in their entirety on restore and only bundles with newer files will get fragmented.

Bundles are a custom format with metadata stored in the manifest. Tar was considered but it is too limited a format, the major issue being that the size of the file must be known in advance and that is very contrary to how pgBackRest works, especially once we introduce page-level incremental backups.

Bundles are stored numbered in the bundle directory. Some files may still end up in pg_data if they are added after the backup is complete. backup_label is an example.

Currently, only the backup command works in batches. The restore and verify commands use the offsets to pull individual files out of the bundle. It seems better to finalize how this is going to work before optimizing the other commands. Even as is, this is a major step forward, and all commands function with bundling.

One caveat: resume is currently not supported when bundle is enabled.
2022-02-14 13:24:14 -06:00
..
mock-all-001.log Simplify manifest defaults. 2022-01-21 15:22:48 -05:00
mock-all-002.log Remove primary flag from manifest. 2022-01-20 14:01:10 -05:00
mock-archive-001.log Add TLS Server. 2021-10-18 14:32:41 -04:00
mock-archive-002.log Add TLS Server. 2021-10-18 14:32:41 -04:00
mock-archive-stop-001.log Add TLS Server. 2021-10-18 14:32:41 -04:00
mock-archive-stop-002.log Adjustments for new breaking change in Azurite. 2021-10-25 15:42:28 -04:00
mock-expire-001.log Change archive expiration logging from detail to info level. 2021-05-27 08:03:44 -04:00
mock-expire-002.log Change archive expiration logging from detail to info level. 2021-05-27 08:03:44 -04:00
mock-stanza-001.log Add TLS Server. 2021-10-18 14:32:41 -04:00
mock-stanza-002.log Adjustments for new breaking change in Azurite. 2021-10-25 15:42:28 -04:00
real-all-001.log Bundle files in the repository during backup. 2022-02-14 13:24:14 -06:00