Skip to main content

Database sync tool for developers

Project description

dbsyncx

Sync and backup databases like Git.


What is dbsyncx?

dbsyncx is a developer-first CLI that makes it easy to:

  • Sync databases between environments
  • Create backups instantly
  • Avoid complex pg_dump commands
  • Work safely with production data

Think of it as:

Git-style workflow for your database


Why dbsyncx?

If you've ever:

  • Needed to debug production locally
  • Run risky migrations without a backup
  • Forgotten pg_dump flags
  • Accidentally overwritten the wrong DB 😅

Then dbsyncx is for you.


Features

  • Sync databases (pull / push)
  • One-command database backups
  • Built-in safety confirmations
  • Dry-run mode (preview actions)
  • Clean YAML configuration
  • Adapter-based architecture
  • Fully local (no cloud required)

Example

Pull production → local

dbsyncx pull production local
This will overwrite 'local'. Continue? [y/N]:
12:41:03 | INFO | Pulling database: production -> local
12:41:05 | INFO | Dumping source database
12:41:07 | INFO | Restoring into target database
✔ Pull complete

Create a backup

dbsyncx dump production
✔ Dump created: dbsyncx_production_20260427_125102.dump

Installation

Requirements

Make sure PostgreSQL tools are installed:

pg_dump --version
pg_restore --version
psql --version

Install

pip install dbsyncx

Or from source:

pip install -e .

Verify

dbsyncx version
dbsyncx is at version 1.0.0

Quick Start

1. Initialize

dbsyncx init

2. Configure

Edit:

.dbsyncx/config.yaml
project_id: my-project

databases:
  local:
    url: postgresql://localhost:5432/mydb

  production:
    url: postgresql://user:password@host:5432/mydb

3. Test connection

dbsyncx status local

4. Sync database

dbsyncx pull production local

Commands

Initialize config

dbsyncx init

Pull database

dbsyncx pull <source> <target>

Push database

dbsyncx push <source> <target>

Dump database (backup)

dbsyncx dump <database>

Options:

--output, -o   Custom output file
--dry-run      Simulate without executing

Check connection

dbsyncx status <database>

Version

dbsyncx version

Safety Features

dbsyncx protects you by default:

  • Prompts before overwriting databases
  • --force to skip confirmation
  • --dry-run to simulate actions

Security

  • Runs entirely locally
  • No credentials leave your machine
  • No cloud dependency
  • Uses native PostgreSQL tools

How it works

dbsyncx uses:

  • pg_dump → export database
  • pg_restore → restore database

No magic — just safer workflows.


Architecture

Adapter-based design:

Current:

  • ✅ PostgreSQL

Future:

  • MySQL
  • SQLite
  • MongoDB

Roadmap

v1.0.0 (Current)

  • CLI sync tool
  • Backup support
  • Safety features

v1.1.0

  • Schema-only sync
  • Table-specific sync

v1.2.0

  • Cloud dashboard
  • Sync history

v2.0.0

  • Multi-database support

Development

git clone https://github.com/yourusername/dbsyncx
cd dbsyncx

pip install -e .[dev]
pytest

Contributing

Contributions welcome.

Open issues or PRs.


License

MIT


Support

If you find this useful:

  • ⭐ Star the repo
  • Share with your team
  • Suggest features

Coming Soon

Optional cloud dashboard for:

  • Sync monitoring
  • Scheduled backups
  • Team workflows

CLI will always remain free.


Built for developers who are tired of database headaches.

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

dbsyncx-1.1.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

dbsyncx-1.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file dbsyncx-1.1.0.tar.gz.

File metadata

  • Download URL: dbsyncx-1.1.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.4

File hashes

Hashes for dbsyncx-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b38766092636eca91d2917fa5e64210654a2fd2fe74983e05d21f382d98046e7
MD5 7fae916078c1b5d783f285960d8517ec
BLAKE2b-256 a41567f16dcf80577c6380692cdbd37948d82eb94a3c2ea8a2d8f5d9979ead45

See more details on using hashes here.

File details

Details for the file dbsyncx-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: dbsyncx-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.4

File hashes

Hashes for dbsyncx-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 316448f18d9fe722c1c61f3a3ac4835c09bd71575a00e4a8bdbe3ed752a8145d
MD5 53d64aa5be0967e57ee5471383f64811
BLAKE2b-256 566e74df06980fa4dbc6f789de44f75552dc433c1b37fba3ba2a92cdd1d1270c

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