Skip to content

StanleyWorks/db_mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DB Sync

A simple tool that I use to copy production DB to my local setup.

Please note

This tool is still under heavy development and I cannot guarantee stability.
I also have a Node.js version here

Setup

This tool is configured with a TOML file.

  1. Create a config.toml
  2. Copy the config structure below
[primary_db]
host = ""
port = 3306
user = ""
password = ""
schema = ""

[secondary_db]
host = "127.0.0.1"
port = 3306
user = ""
password = ""
schema = ""

Logging

This tool uses env_logger for log output.

You can control verbosity using the RUST_LOG environment variable:

  • Default (no env var): shows info, warn, error
  • Show only warnings and errors:
RUST_LOG=warn cargo run
  • Silence all logs:
RUST_LOG=off cargo run
  • Show debug logs (if used):
RUST_LOG=debug cargo run
  • Log output format:
[2025-04-16 22:25:41]: App started

More docs coming soon.

About

Copy dbs between environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages