docs: Update README with correct commands and repository URLs
This commit is contained in:
125
README.md
125
README.md
@ -52,16 +52,21 @@ A comprehensive, high-performance database backup and restore solution with **mu
|
|||||||
|
|
||||||
### 💡 **Smart Progress Features**
|
### 💡 **Smart Progress Features**
|
||||||
```bash
|
```bash
|
||||||
# Live backup progress example
|
# Live cluster backup progress example
|
||||||
🔄 Starting backup: postgres
|
🔄 Starting cluster backup (all databases)
|
||||||
[10%] Backup directory prepared
|
Backing up global objects...
|
||||||
[20%] Generated backup filename
|
Getting database list...
|
||||||
[30%] Backup command prepared
|
Backing up 13 databases...
|
||||||
[40%] Starting database backup...
|
[1/13] Backing up database: backup_test_db
|
||||||
[80%] Database backup completed
|
Database size: 84.1 MB
|
||||||
[90%] Backup verified: 822 B
|
✅ Completed backup_test_db (56.5 MB)
|
||||||
[100%] Backup operation completed successfully
|
[2/13] Backing up database: postgres
|
||||||
✅ ✅ Single database backup completed: db_postgres_20251024_185103.dump
|
Database size: 7.4 MB
|
||||||
|
✅ Completed postgres (822 B)
|
||||||
|
...
|
||||||
|
Backup summary: 13 succeeded, 0 failed
|
||||||
|
Creating compressed archive...
|
||||||
|
✅ Cluster backup completed: cluster_20251105_102722.tar.gz (56.6 MB)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🚀 Key Features
|
## 🚀 Key Features
|
||||||
@ -103,31 +108,31 @@ Download the appropriate binary for your platform from the `bin/` directory:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Linux (Intel/AMD)
|
# Linux (Intel/AMD)
|
||||||
curl -L https://git.uuxo.net/renz/dbbackup/raw/branch/master/bin/dbbackup_linux_amd64 -o dbbackup_linux_amd64
|
curl -L https://git.uuxo.net/uuxo/dbbackup/raw/branch/main/bin/dbbackup_linux_amd64 -o dbbackup
|
||||||
chmod +x dbbackup_linux_amd64
|
chmod +x dbbackup
|
||||||
sudo mv dbbackup_linux_amd64 /usr/local/bin/dbbackup
|
sudo mv dbbackup /usr/local/bin/dbbackup
|
||||||
|
|
||||||
# macOS (Intel)
|
# macOS (Intel)
|
||||||
curl -L https://git.uuxo.net/renz/dbbackup/raw/branch/master/bin/dbbackup_darwin_amd64 -o dbbackup_darwin_amd64
|
curl -L https://git.uuxo.net/uuxo/dbbackup/raw/branch/main/bin/dbbackup_darwin_amd64 -o dbbackup
|
||||||
chmod +x dbbackup_darwin_amd64
|
chmod +x dbbackup
|
||||||
sudo mv dbbackup_darwin_amd64 /usr/local/bin/dbbackup
|
sudo mv dbbackup /usr/local/bin/dbbackup
|
||||||
|
|
||||||
# macOS (Apple Silicon)
|
# macOS (Apple Silicon)
|
||||||
curl -L https://git.uuxo.net/renz/dbbackup/raw/branch/master/bin/dbbackup_darwin_arm64 -o dbbackup_darwin_arm64
|
curl -L https://git.uuxo.net/uuxo/dbbackup/raw/branch/main/bin/dbbackup_darwin_arm64 -o dbbackup
|
||||||
chmod +x dbbackup_darwin_arm64
|
chmod +x dbbackup
|
||||||
sudo mv dbbackup_darwin_arm64 /usr/local/bin/dbbackup
|
sudo mv dbbackup /usr/local/bin/dbbackup
|
||||||
|
|
||||||
# Windows (download and rename)
|
# Windows (download and rename)
|
||||||
curl -L https://git.uuxo.net/renz/dbbackup/raw/branch/master/bin/dbbackup_windows_amd64.exe -o dbbackup_windows_amd64.exe
|
curl -L https://git.uuxo.net/uuxo/dbbackup/raw/branch/main/bin/dbbackup_windows_amd64.exe -o dbbackup.exe
|
||||||
# Use directly or move into PATH
|
# Use directly or move into PATH
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build from Source
|
### Build from Source
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.uuxo.net/renz/dbbackup.git
|
git clone https://git.uuxo.net/uuxo/dbbackup.git
|
||||||
cd dbbackup
|
cd dbbackup
|
||||||
go build -o dbbackup .
|
go build -o dbbackup main.go
|
||||||
```
|
```
|
||||||
|
|
||||||
### Cross-Platform Build
|
### Cross-Platform Build
|
||||||
@ -139,60 +144,45 @@ go build -o dbbackup .
|
|||||||
|
|
||||||
## 🖥️ Usage Examples
|
## 🖥️ Usage Examples
|
||||||
|
|
||||||
### Interactive Mode with Progress Tracking (Recommended)
|
### Interactive Mode (Recommended)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start enhanced interactive interface with real-time progress
|
# Start interactive interface with menu system
|
||||||
dbbackup interactive --database your_database
|
dbbackup interactive
|
||||||
|
|
||||||
# Interactive mode with progress monitoring
|
# Alternative aliases (all equivalent)
|
||||||
dbbackup menu --database postgres --host localhost --user postgres
|
dbbackup menu
|
||||||
|
dbbackup ui
|
||||||
# Alternative UI command
|
|
||||||
dbbackup ui --database myapp_db --progress
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The interactive mode provides:
|
||||||
|
- **Real-time progress tracking** with animated spinners
|
||||||
|
- **Visual menu navigation** with arrow keys
|
||||||
|
- **Database engine switching** using left/right arrows or pressing `t`
|
||||||
|
- **Automatic status updates** without requiring keypresses
|
||||||
|
- **Operation history** and active operation monitoring
|
||||||
|
|
||||||
> 💡 In the interactive menu, use the left/right arrow keys (or press `t`) to switch the target engine between PostgreSQL and MySQL/MariaDB before launching an operation.
|
> 💡 In the interactive menu, use the left/right arrow keys (or press `t`) to switch the target engine between PostgreSQL and MySQL/MariaDB before launching an operation.
|
||||||
|
|
||||||
### Enhanced Progress Tracking Commands
|
### Progress Tracking in CLI Mode
|
||||||
|
|
||||||
#### Real-Time Progress Monitoring
|
Progress tracking is automatically enabled for all backup operations in CLI mode:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Single backup with detailed progress tracking
|
# Single database backup with automatic progress tracking
|
||||||
dbbackup backup single myapp_db --progress --verbose
|
dbbackup backup single myapp_db
|
||||||
|
|
||||||
# Sample backup with progress indicators
|
# Sample backup (10% of data) with progress indicators
|
||||||
dbbackup backup sample myapp_db --sample-ratio 10 --progress
|
dbbackup backup sample myapp_db --sample-ratio 10
|
||||||
|
|
||||||
# Cluster backup with comprehensive logging
|
# Cluster backup with comprehensive progress output
|
||||||
dbbackup backup cluster --progress --detailed --timestamps
|
dbbackup backup cluster
|
||||||
```
|
|
||||||
|
|
||||||
#### Operation Status & History
|
# All operations show:
|
||||||
|
# - Step-by-step progress indicators
|
||||||
```bash
|
# - Database sizes and completion status
|
||||||
# View current operation status
|
# - Elapsed time and final summary
|
||||||
dbbackup status --detailed
|
# - Success/failure counts
|
||||||
|
|
||||||
# Show operation history with metrics
|
|
||||||
dbbackup status --history --performance
|
|
||||||
|
|
||||||
# Monitor active operations
|
|
||||||
dbbackup status --active --refresh-interval 2s
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Progress Feature Examples
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Backup with file-by-file progress
|
|
||||||
dbbackup backup single large_db --progress --show-files
|
|
||||||
|
|
||||||
# Backup with byte-level transfer tracking
|
|
||||||
dbbackup backup cluster --progress --show-bytes --compression 9
|
|
||||||
|
|
||||||
# Restore with step-by-step progress
|
|
||||||
dbbackup restore backup.dump --progress --verify --show-steps
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Command Line Interface
|
### Command Line Interface
|
||||||
@ -279,17 +269,20 @@ sudo -u postgres dbbackup backup cluster --insecure
|
|||||||
#### System Diagnostics
|
#### System Diagnostics
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check connection status
|
# Check connection status and configuration
|
||||||
dbbackup status
|
dbbackup status
|
||||||
|
|
||||||
# Run preflight checks
|
# Run preflight checks before backup
|
||||||
dbbackup preflight
|
dbbackup preflight
|
||||||
|
|
||||||
# List databases and archives
|
# List available databases and backups
|
||||||
dbbackup list
|
dbbackup list
|
||||||
|
|
||||||
# Show CPU optimization settings
|
# Show CPU optimization settings
|
||||||
dbbackup cpu
|
dbbackup cpu
|
||||||
|
|
||||||
|
# Enable debug logging for troubleshooting
|
||||||
|
dbbackup status --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
## ⚙️ Configuration
|
## ⚙️ Configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user