Skip to content

Commit 5671aa1

Browse files
committed
docs(README): update with WordPress integration and Docker support
1 parent 59fd13d commit 5671aa1

File tree

1 file changed

+58
-47
lines changed

1 file changed

+58
-47
lines changed

README.md

Lines changed: 58 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,67 @@
11
# DB Sync Manager
22

3-
A cross-platform desktop GUI application built with Go and Fyne v2 for managing database synchronizations. It allows you to export large databases from remote Linux servers via SSH and restore them to local or remote servers, supporting both native MySQL/MariaDB and Dockerized instances.
3+
A cross-platform desktop GUI application built with Go and Fyne v2 for managing database synchronizations. It allows you to export large databases from remote Linux servers via SSH, WordPress sites, or Docker containers, and restore them efficiently.
44

55
## Features
66

7-
- **Export (Backup):** Connect to remote servers via SSH, dump large databases (5GB+ supported via streaming), compress (gzip), and download locally.
8-
- **Import (Restore):** Upload local SQL dumps (gzip supported) to remote servers or restore locally, handling large files efficiently.
9-
- **Docker Support:** Seamlessly handles databases running inside Docker containers vs native OS processes.
10-
- **Profile Management:** Save and load connection profiles for quick access.
11-
- **Activity Logs:** Track all operations with timestamps and status.
12-
- **Cross-Platform:** Runs on Windows, macOS, and Linux.
13-
14-
## Requirements
15-
16-
- Go 1.21 or later
17-
- C compiler (gcc) for Fyne (requires CGO)
18-
- On Linux: `libgl1-mesa-dev` and `xorg-dev` packages (for Fyne)
19-
20-
## Installation
21-
22-
1. Clone the repository.
23-
2. Install dependencies:
24-
```bash
25-
go mod tidy
26-
```
27-
3. Run the application:
28-
```bash
29-
go run main.go
30-
```
31-
32-
## Usage
33-
34-
### Export Tab
35-
1. Enter SSH Connection details (Host, Port, User, Password/Key).
36-
2. Configure Source Database details.
37-
- Check "Is Docker Container?" if applicable and provide Container Name/ID.
38-
3. Select a Destination Folder.
39-
4. Click "Start Backup & Download".
40-
41-
### Import Tab
42-
1. Select a local `.sql.gz` (or `.sql`) file.
43-
2. Configure Destination Server.
44-
- Uncheck "Restore to Localhost?" to stream to a remote server.
45-
3. Configure Destination Database details.
46-
4. Click "Start Upload & Restore".
47-
48-
### Activity Logs
49-
View a history of all operations.
7+
### 🔌 Connectivity
8+
* **SSH:** Connect to any remote Linux server using Password or Private Key authentication.
9+
* **WordPress:** Direct integration with WordPress sites via a secure, auto-generated plugin (no SSH required).
10+
* **Docker:** Seamless support for databases running inside Docker containers.
11+
* **Databases:** Support for **MySQL** and **MariaDB**.
12+
13+
### 🚀 Core Functions
14+
* **Export (Backup):** Stream large database dumps (5GB+) with on-the-fly GZIP compression.
15+
* **Import (Restore):** Stream uploads and restores to remote servers or local instances.
16+
* **Profile Management:**
17+
* Save connection details for quick access.
18+
* **Smart History:** Remembers your last destination folder per profile.
19+
* Create, Update, and **Delete** profiles easily.
20+
21+
### 📊 Activity & History
22+
* **History Tab:** A data grid view of all past operations with timestamps, status, and file sizes.
23+
* **Persistence:** All logs are saved locally to `logs.json`.
24+
25+
### 🛠️ Diagnostics
26+
* **Test Connectivity:** Built-in tools to verify Server (SSH/HTTP) and Database connections before running heavy operations.
27+
28+
## Installation & Running
29+
30+
### Option 1: Run via Docker (Recommended)
31+
Avoid system dependency issues (missing X11/GL headers) by running the app in a container.
32+
33+
```bash
34+
./docker-run.sh
35+
```
36+
*The app will appear on your desktop via X11 forwarding.*
37+
38+
### Option 2: Run Locally (Linux)
39+
Requires `gcc`, `libgl1-mesa-dev`, and `xorg-dev`.
40+
41+
```bash
42+
sudo apt-get install libgl1-mesa-dev xorg-dev
43+
./run.sh
44+
```
45+
46+
### Option 3: Build Binaries
47+
To generate standalone executables for Linux and Windows:
48+
49+
```bash
50+
./build.sh
51+
```
52+
*Artifacts will be created as `dback-linux` and `dback-windows.exe`.*
53+
54+
## WordPress Integration Guide
55+
56+
1. Open the **Export** tab.
57+
2. Select **Type: WordPress**.
58+
3. Click **Generate Plugin** and save the `dback-sync-plugin.zip`.
59+
4. **Install** this plugin on your WordPress site (Plugins > Add New > Upload).
60+
5. Copy your WordPress **URL** into the app.
61+
6. The **API Key** is automatically filled (it matches the key embedded in the plugin).
62+
7. Click **Test Connectivity** or **Start Backup**.
5063

5164
## FAQ
5265

5366
### Why does this app require X11/GL libraries?
54-
This application is built using **Fyne**, a high-performance GUI toolkit for Go. Fyne uses **OpenGL** to render its graphics (GPU acceleration).
55-
On Linux, interfacing with OpenGL and creating windows requires the **X11** and **OpenGL** development headers (C libraries).
56-
These are standard requirements for building almost any native GUI application on Linux from source.
67+
This application is built using **Fyne**, a high-performance GUI toolkit for Go. Fyne uses **OpenGL** to render its graphics (GPU acceleration). On Linux, interfacing with OpenGL and creating windows requires the **X11** and **OpenGL** development headers. Using the Docker method (`./docker-run.sh`) bypasses this requirement on your host machine.

0 commit comments

Comments
 (0)