A guided path to learn and use Database Swap effectively. This page links to focused docs so you can ramp up quickly and deepen as needed.
- What it is: A Python tool to migrate data between SQLite, MySQL, and MongoDB with validation, rate limiting, and progress tracking.
- Who it’s for: Developers and data engineers moving datasets across database engines reliably.
- Getting started (install + first migration)
- Read: docs/getting-started.md
- Understand the configuration
- Read: docs/configuration.md
- Use the CLI efficiently
- Read: docs/cli.md
- Know your database adapters
- Read: docs/adapters.md
- How it works under the hood
- Read: docs/architecture.md
- Extend to new databases
- Read: docs/extending.md
- Troubleshoot common issues
- Read: docs/troubleshooting.md
- Recipes and examples
- Read: docs/recipes.md
- FAQ
- Read: docs/faq.md
Installation (from source)
pip install -r requirements.txt
pip install -e .Available CLI commands
# Initialize a config file in the current folder
database-swap init-config -o config.yaml
# Test a connection
database-swap test-connection --db-type sqlite --database .\source.db
# Analyze a database (structure + counts)
database-swap analyze --db-type sqlite --database .\source.db
# Migrate from SQLite to MySQL (dry run first)
database-swap migrate --dry-run `
--source-type sqlite --source-database .\source.db `
--target-type mysql --target-host localhost --target-database target_db --target-username root
# Run the actual migration
database-swap migrate `
--source-type sqlite --source-database .\source.db `
--target-type mysql --target-host localhost --target-database target_db --target-username rootConfiguration keys you’ll use most
- source.* and target.*: database types and connection info
- migration.batch_size: records per write
- migration.rate_limit_delay: seconds to wait between batches
- migration.tables: subset of tables to migrate
- validation.strict_mode: fail fast on invalid data
See docs/configuration.md for a full reference.
- examples/sqlite-to-sqlite.yaml
- examples/mysql-to-mongodb.yaml
These are great starting points for your own config files.
- Open issues and PRs are welcome.
- See docs/extending.md to add new database adapters.