Skip to main content

Tool to get snapshots of PostgreSQL databases.

Project description

vkarious

vkarious is a tool to create snapshots and branches of PostgreSQL databases.

Important: This project is an active work-in-progress. Expect rapid changes, occasional instability, and breaking changes as features evolve. To get notified about updates, use the Watch button on the repository (choose "All Activity"). Manage your watch settings for this repo at: https://github.com/ybrs/vkarious/subscription

Configuration

Set the VKA_DATABASE environment variable to your PostgreSQL connection string:

export VKA_DATABASE="postgresql://username:password@localhost:5432/database_name"

Optionally, set VKA_PG_DATA_PATH to override the detected PostgreSQL data directory. This is useful when PostgreSQL runs in a container but vkarious runs on the host and needs a host-visible path for copying database files (e.g., COW file copies):

# Example: host path where the container's PGDATA is mounted
export VKA_PG_DATA_PATH="/Users/me/docker-volumes/postgres-data"

Usage

List all databases:

vkarious databases list

Create a snapshot:

vkarious snapshot database_name

Create a branch with a custom name:

vkarious branch database_name branch_name

When VKA_PG_DATA_PATH is set, vkarious uses that directory for physical file operations instead of querying SHOW data_directory from PostgreSQL.

List snapshots:

vkarious snapshots list

Restore from a snapshot:

vkarious snapshots restore database_name snapshot_name

Delete a snapshot:

vkarious snapshots delete snapshot_name

Check version:

vkarious version

Example

export VKA_DATABASE="postgresql://@localhost:5432/postgres"
(vkarious) $ uv run vkarious databases list
OID        Database Name
------------------------------
14042      postgres
4          template0
1          template1
65786      test

Development

Install the project in editable mode and run the CLI using uv:

uv venv
uv pip install -e .
uv run vkarious --help

Run the test suite with:

uv run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vkarious-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vkarious-0.1.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file vkarious-0.1.0.tar.gz.

File metadata

  • Download URL: vkarious-0.1.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for vkarious-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d65ec3f8ff849a2b751167e990de46b37bf9944270d46a94dc09bf70e437454
MD5 04da6954a2db4983a87c3615a489c9cd
BLAKE2b-256 5cbca963710044da6138234322a7b795e5e3fab64c433074388f69e7a1a949c8

See more details on using hashes here.

File details

Details for the file vkarious-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vkarious-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for vkarious-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e305d7faf890e2d0577a88b8baf3bd00b584fdd33b0fcfa190d43bb603c3fc8
MD5 2c5c4e757eddc82e8646e795144cb799
BLAKE2b-256 db2c571710eeb61faec56592dffedb5f429fde4bc38470560f34f163aa25b2d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page