testgres-pg_probackup2
Control and testing utility for pg_probackup2. Python 3.7+ is supported.
Installation
To install testgres-pg_probackup, run:
pip install testgres-pg_probackup
We encourage you to use virtualenv for your testing environment.
The package requires testgres.
Usage
Environment variables
| Variable | Required | Default value | Description |
|---|---|---|---|
| PGPROBACKUP_TMP_DIR | No | tests/tmp_dirs | The root of the temporary directory hierarchy where tests store data and logs. Relative paths start from the current working directory. |
| PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX | No | Temporary test hierarchy | Prefix of the test backup directories. Must be an absolute path. Use this variable to store test backups in a location other than the temporary test hierarchy. |
| PG_PROBACKUP_VALGRIND | No | Not set | Run pg_probackup through valgrind if the variable is set to 'y'. Setting PG_PROBACKUP_VALGRIND_SUP (see below) to any value enables valgrind just like setting PG_PROBACKUP_VALGRIND=y would do. |
| PG_PROBACKUP_VALGRIND_SUP | No | Not set | Specify the path to a valgrind suppression file. If the variable is not set then a file named "valgrind.supp" is searched for in the current working directory (normally the root of pg_probackup repository). Setting PG_PROBACKUP_VALGRIND_SUP to any value enables valgrind just like setting PG_PROBACKUP_VALGRIND=y (see above) would do. |
See Testgres on how to configure a custom Postgres installation using PG_CONFIG and PG_BIN environment variables.
Examples
Here is an example of what you can do with testgres-pg_probackup2:
# You can see full script here plugins/pg_probackup2/pg_probackup2/tests/basic_test.py
def test_full_backup(self):
# Setting up a simple test node
node = self.pg_node.make_simple('node', pg_options={"fsync": "off", "synchronous_commit": "off"})
# Initialize and configure Probackup
self.pb.init()
self.pb.add_instance('node', node)
self.pb.set_archiving('node', node)
# Start the node and initialize pgbench
node.slow_start()
node.pgbench_init(scale=100, no_vacuum=True)
# Perform backup and validation
backup_id = self.pb.backup_node('node', node)
out = self.pb.validate('node', backup_id)
# Check if the backup is valid
self.assertIn(f"INFO: Backup {backup_id} is valid", out)
Authors
Metadata
Release files for testgres-pg-probackup2 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| testgres_pg_probackup2-0.10.0.tar.gz | 19.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| testgres_pg_probackup2-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.1 kB
Release files / testgres_pg_probackup2-0.10.0.tar.gz
| Download URL | testgres_pg_probackup2-0.10.0.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df1db4a3c5aeedd6ee107188e7324db55fc0d682a5f195614eb02e205a9325db
|
|
BLAKE2b-256 checksum How to use checksums |
01f94fbcb32eb110f996f90dfbe35cb7192ff2f1b977cc637c3d84a8b088f679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / testgres_pg_probackup2-0.10.0-py3-none-any.whl
| Download URL | testgres_pg_probackup2-0.10.0-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9ac901254b1fb37edfdbe667a3f15557433e8fecde955fef48b349d42c3ed8a
|
|
BLAKE2b-256 checksum How to use checksums |
1f81c3dedda0a252084b549874a79a1b20de34bc73dbe489e3e58e7d6b7eb027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for testgres-pg-probackup2 0.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for testgres_pg_probackup2-0.10.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.