Skip to content

ashutoshsuthar2020/snapdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snapdb

snapdb is a cross-platform, extensible database backup and restore utility written in Go. It supports PostgreSQL, MySQL, and MongoDB, making it easy to automate, compress, and manage backups for multiple database types. Designed for reliability and ease of use, snapdb works on Windows, Linux, and macOS.


Key Features

  • Multi-DB Support: Backup and restore for PostgreSQL, MySQL, and MongoDB.
  • Backup Types: Full backups (incremental/differential coming soon).
  • Compression: Automatic gzip compression of backup files.
  • Storage Options: Save backups locally; cloud storage (AWS S3, GCS, Azure Blob) coming soon.
  • Logging: Detailed logs of backup activities, including status and errors.
  • Notifications: Optional Slack notifications on backup completion/failure.
  • Restore: Restore databases from backup files; selective restore planned.
  • User-Friendly CLI: Simple commands, clear help, and robust error handling.

Features To Be Implemented

  • Incremental and differential backups for supported databases
  • Cloud storage integration (AWS S3, Google Cloud Storage, Azure Blob)
  • Selective restore for specific tables/collections
  • Advanced scheduling and retention policies

How To Run

  1. Install Go (>= 1.22)

  2. Clone the repo:

    git clone https://github.com/ashutoshsuthar2020/snapdb.git
    cd snapdb
  3. Edit your config file:
    Update config.yaml with your database connection details.

  4. Run a backup:

    go run main.go backup --config=config/config.yaml

    Backups will be saved in the backups/ directory and compressed automatically.

  5. Restore a backup (coming soon):

    go run main.go restore --config=config/config.yaml --file=backups/your_backup.sql

How It Works

snapdb reads your config file, connects to each database, runs the appropriate backup command, compresses the output, and saves it locally. All activities are logged, and you can enable Slack notifications for backup status. Restore operations will allow you to recover databases from backup files.


Contributions and feedback are welcome!
For more details, see the project repo.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages