@@ -15,6 +15,41 @@ A comprehensive command-line interface (CLI) utility for backing up and restorin
1515
1616## Installation
1717
18+ ### Download Pre-built Binaries (Recommended)
19+
20+ Download the latest release for your platform:
21+
22+ ** Linux (AMD64):**
23+
24+ ``` bash
25+ curl -L -o dbu https://github.com/ibrahimraimi/database-backup-utility/releases/latest/download/dbu-linux-amd64
26+ chmod +x dbu
27+ sudo mv dbu /usr/local/bin/
28+ ```
29+
30+ ** macOS (Intel):**
31+
32+ ``` bash
33+ curl -L -o dbu https://github.com/ibrahimraimi/database-backup-utility/releases/latest/download/dbu-darwin-amd64
34+ chmod +x dbu
35+ sudo mv dbu /usr/local/bin/
36+ ```
37+
38+ ** macOS (Apple Silicon):**
39+
40+ ``` bash
41+ curl -L -o dbu https://github.com/ibrahimraimi/database-backup-utility/releases/latest/download/dbu-darwin-arm64
42+ chmod +x dbu
43+ sudo mv dbu /usr/local/bin/
44+ ```
45+
46+ ** Windows (AMD64):**
47+
48+ ``` powershell
49+ # Download using PowerShell
50+ Invoke-WebRequest -Uri "https://github.com/ibrahimraimi/database-backup-utility/releases/latest/download/dbu-windows-amd64.exe" -OutFile "dbu.exe"
51+ ```
52+
1853### From Source
1954
2055``` bash
@@ -35,62 +70,64 @@ make build-all
3570go install github.com/ibrahimraimi/database-backup-utility@latest
3671```
3772
73+ > ** Note:** For detailed download instructions and release information, see the [ Releases Documentation] ( docs/releases.md ) .
74+
3875## Quick Start
3976
4077### Test Database Connection
4178
4279``` bash
4380# Test MySQL connection
44- ./db-backup test --db-type mysql --host localhost --port 3306 --username root --password mypassword --database mydb
81+ ./dbu test --db-type mysql --host localhost --port 3306 --username root --password mypassword --database mydb
4582
4683# Test PostgreSQL connection
47- ./db-backup test --db-type postgres --host localhost --port 5432 --username postgres --password mypassword --database mydb
84+ ./dbu test --db-type postgres --host localhost --port 5432 --username postgres --password mypassword --database mydb
4885
4986# Test MongoDB connection
50- ./db-backup test --db-type mongodb --host localhost --port 27017 --username admin --password mypassword --database mydb
87+ ./dbu test --db-type mongodb --host localhost --port 27017 --username admin --password mypassword --database mydb
5188
5289# Test SQLite connection
53- ./db-backup test --db-type sqlite --database /path/to/database.db
90+ ./dbu test --db-type sqlite --database /path/to/database.db
5491```
5592
5693### Create a Backup
5794
5895``` bash
5996# MySQL backup
60- ./db-backup backup --db-type mysql --host localhost --username root --password mypassword --database mydb --type full --compress
97+ ./dbu backup --db-type mysql --host localhost --username root --password mypassword --database mydb --type full --compress
6198
6299# PostgreSQL backup
63- ./db-backup backup --db-type postgres --host localhost --username postgres --password mypassword --database mydb --type full --compress
100+ ./dbu backup --db-type postgres --host localhost --username postgres --password mypassword --database mydb --type full --compress
64101
65102# MongoDB backup
66- ./db-backup backup --db-type mongodb --host localhost --username admin --password mypassword --database mydb --type full --compress
103+ ./dbu backup --db-type mongodb --host localhost --username admin --password mypassword --database mydb --type full --compress
67104
68105# SQLite backup
69- ./db-backup backup --db-type sqlite --database /path/to/database.db --type full --compress
106+ ./dbu backup --db-type sqlite --database /path/to/database.db --type full --compress
70107
71108# Selective backup (specific tables)
72- ./db-backup backup --db-type mysql --host localhost --username root --password mypassword --database mydb --tables " users,orders,products" --compress
109+ ./dbu backup --db-type mysql --host localhost --username root --password mypassword --database mydb --tables " users,orders,products" --compress
73110
74111# Cloud storage backup
75- ./db-backup backup --db-type mysql --host localhost --username root --password mypassword --database mydb --storage cloud --cloud-provider aws --bucket my-backup-bucket --region us-east-1
112+ ./dbu backup --db-type mysql --host localhost --username root --password mypassword --database mydb --storage cloud --cloud-provider aws --bucket my-backup-bucket --region us-east-1
76113```
77114
78115### Restore a Backup
79116
80117``` bash
81118# Restore from local backup
82- ./db-backup restore --db-type mysql --host localhost --username root --password mypassword --database mydb --file ./backups/mysql_mydb_full_2024-01-15_10-30-00.sql.gz
119+ ./dbu restore --db-type mysql --host localhost --username root --password mypassword --database mydb --file ./backups/mysql_mydb_full_2024-01-15_10-30-00.sql.gz
83120
84121# Restore from cloud backup
85- ./db-backup restore --db-type mysql --host localhost --username root --password mypassword --database mydb --file s3://my-backup-bucket/mysql_mydb_full_2024-01-15_10-30-00.sql.gz
122+ ./dbu restore --db-type mysql --host localhost --username root --password mypassword --database mydb --file s3://my-backup-bucket/mysql_mydb_full_2024-01-15_10-30-00.sql.gz
86123
87124# Selective restore (specific tables)
88- ./db-backup restore --db-type mysql --host localhost --username root --password mypassword --database mydb --file ./backups/mysql_mydb_full_2024-01-15_10-30-00.sql.gz --tables " users,orders"
125+ ./dbu restore --db-type mysql --host localhost --username root --password mypassword --database mydb --file ./backups/mysql_mydb_full_2024-01-15_10-30-00.sql.gz --tables " users,orders"
89126```
90127
91128## Configuration
92129
93- Create a configuration file at ` ~/.db-backup .yaml ` :
130+ Create a configuration file at ` ~/.dbu .yaml ` :
94131
95132``` yaml
96133# Logging configuration
@@ -137,7 +174,7 @@ export AZURE_STORAGE_KEY=your_storage_key
137174
138175### Global Flags
139176
140- - ` --config ` : Path to configuration file (default: ~ /.db-backup .yaml)
177+ - ` --config ` : Path to configuration file (default: ~ /.dbu .yaml)
141178- ` --log-level ` : Log level (debug, info, warn, error)
142179- ` --log-format ` : Log format (json, text)
143180
@@ -183,7 +220,7 @@ DB_NAME="mydb"
183220BACKUP_DIR=" /var/backups/db"
184221
185222# Create backup
186- ./db-backup backup \
223+ ./dbu backup \
187224 --db-type mysql \
188225 --host $DB_HOST \
189226 --username $DB_USER \
@@ -195,7 +232,7 @@ BACKUP_DIR="/var/backups/db"
195232 --path $BACKUP_DIR
196233
197234# Upload to cloud
198- ./db-backup backup \
235+ ./dbu backup \
199236 --db-type mysql \
200237 --host $DB_HOST \
201238 --username $DB_USER \
@@ -281,6 +318,7 @@ This project is licensed under the MIT License - see the LICENSE file for detail
281318Comprehensive documentation is available in the ` /docs ` directory:
282319
283320- [ Getting Started] ( docs/getting-started.md ) - Quick start guide and installation
321+ - [ Releases] ( docs/releases.md ) - Download pre-built binaries and release information
284322- [ MySQL Guide] ( docs/mysql.md ) - Complete MySQL backup and restore guide
285323- [ PostgreSQL Guide] ( docs/postgresql.md ) - Complete PostgreSQL backup and restore guide
286324- [ MongoDB Guide] ( docs/mongodb.md ) - Complete MongoDB backup and restore guide
0 commit comments