Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

postgrespro/testgres-pg_probackup2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Control and testing utility forpg_probackup2. Python 3.5+ is supported.

Installation

To installtestgres, run:

pip install testgres-pg_probackup

We encourage you to usevirtualenv for your testing environment.The package requires testgres~=1.9.3.

Usage

Environment variables

VariableRequiredDefault valueDescription
PGPROBACKUP_TMP_DIRNotests/tmp_dirsThe 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_PREFIXNoTemporary test hierarchyPrefix 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.

SeeTestgres on how to configure a custom Postgres installation usingPG_CONFIG andPG_BIN environment variables.

Examples

Here is an example of what you can do withtestgres-pg_probackup2:

# You can see full script here plugins/pg_probackup2/pg_probackup2/tests/basic_test.pydeftest_full_backup(self):# Setting up a simple test nodenode=self.pg_node.make_simple('node',pg_options={"fsync":"off","synchronous_commit":"off"})# Initialize and configure Probackupself.pb.init()self.pb.add_instance('node',node)self.pb.set_archiving('node',node)# Start the node and initialize pgbenchnode.slow_start()node.pgbench_init(scale=100,no_vacuum=True)# Perform backup and validationbackup_id=self.pb.backup_node('node',node)out=self.pb.validate('node',backup_id)# Check if the backup is validself.assertIn(f"INFO: Backup{backup_id} is valid",out)

Authors

Postgres Professional

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp