TOOL / SCRIPT
DBM: Database Manager
stableStable: This tool is production-ready, well-tested, and actively maintained. It's been battle-tested across multiple projects and is ready for serious use. Found a bug or have suggestions? Open an issue on GitHub.
Magical PostgreSQL management tool with backup, restore, SSL support, and multi-database configuration. Simplifies database operations for development teams.
time Saved
70%
databases
10+
backups
Daily
What It Does
DBM is a Bash-powered PostgreSQL management tool that handles all database operations through a simple CLI. It supports multiple credential methods (.pgpass, environment variables, config files), automatic SSL certificate handling, and one-command backup/restore operations. Think of it as a Swiss Army knife for database management.
The Problem
As a QA engineer working across multiple projects, I was constantly juggling different database environments. Looking up connection strings, managing credentials, and running lengthy backup commands was eating up hours each week. The manual process was slow, error-prone, and occasionally I'd forget to backup before making changes.
The Solution
DBM centralizes all database operations into simple commands. It manages credentials securely, handles SSL automatically, and turns complex backup/restore operations into one-liners. Now I can switch between databases instantly and never worry about losing data.
Key Features
Multiple credential management methods (10+ formats supported)
1Password and Bitwarden integration for secure credential storage
SSL/TLS support with automatic certificate handling
One-command backup and restore operations
Connection testing and health checks
Database information and statistics
Interactive configuration management
Support for cloud databases (AWS RDS, Azure, GCP)
Comprehensive error handling and rollback
Usage Examples
Quick Start
Basic database operations in three simple commands
# Start interactive shell
./dbm.sh start myproject
# Backup database
./dbm.sh backup myproject ~/backup.psql
# Restore from backup
./dbm.sh reset myproject ~/backup.psqlConfiguration
Flexible configuration with multiple methods
# .dbmrc file
myproject=user:password:5432:database
production=user:pass:5432:db:prod.example.com:require
# Or use environment variables
export MYPROJECT_USER=user
export MYPROJECT_PASSWORD=password
export MYPROJECT_DB=databaseAdvanced Features
Health checks, monitoring, and configuration management
# Test all connections
./dbm.sh check --all
# Get database info
./dbm.sh info myproject --tables --size
# Manage configurations
./dbm.sh config add newdb user:pass:5432:dbWhat's Next
Features I'm thinking about adding slowly:
MySQL and MongoDB support for multi-database management
Automated backup prompt when restoring a new database
Docker container support for isolated database environments
License - MIT
© 2025 Shamlo Ameer
This tool is open source and free to use. You're welcome to use, modify, and distribute it for any purpose, including commercial projects. Attribution is appreciated but not required.
✓ You can:
- •Use for personal or commercial projects
- •Modify and adapt to your needs
- •Distribute and share freely
- •Include in your own projects
ℹ️ Please note:
- •Provided "as is" without warranty
- •Attribution appreciated but optional
- •No liability for any damages
Questions or feedback? zothstic@gmail.com