Scheduled rsync + encrypted zip archiver daemon. Backs up files from remote hosts (or local paths) on a schedule, stores each unique content as a password-protected zip, and prunes old versions. Optional authenticated web UI to browse and download archives.
# Download from releases
curl -sSL https://github.com/javimosch/gob-cli/releases/latest/download/gob-cli-linux-amd64 -o /usr/local/bin/gob-cli
chmod +x /usr/local/bin/gob-cli
# Or build from source
git clone https://github.com/javimosch/gob-cli.git
cd gob-cli
./build.sh# Create a backup config
mkdir -p ~/.config/gob-cli
cat > ~/.config/gob-cli/config.json << 'EOF'
{
"backups": [
{
"name": "my-env",
"source": "myserver:/path/to/.env",
"dest": "/home/user/gob-backups",
"method": "rsync",
"password": "my-secret",
"retention": 7,
"enabled": true
}
]
}
EOF
# Run once (foreground)
gob-cli start
# Run as background daemon
gob-cli start -daemon
# Run with status UI on port 8080
gob-cli start -port 8080
# With master password (fallback for all backups)
gob-cli start -daemon -password 'master-pass'
# Via env
export GOB_CLI_PASSWORD='master-pass'
gob-cli start -daemon| Command | Description |
|---|---|
start |
Start backup daemon |
stop |
Stop daemon |
status |
Check if daemon is running |
version |
Show version |
help |
Show help |
| Flag | Default | Description |
|---|---|---|
-port |
0 |
HTTP server port (0 = disabled) |
-bind |
127.0.0.1 |
Bind address (0.0.0.0 for all interfaces) |
-daemon |
false |
Run as background daemon |
-password |
"" |
Master password for zip encryption |
-user |
"" |
Basic auth username for UI |
-rate-limit |
30 |
Max requests/minute per IP (0 = unlimited) |
~/.config/gob-cli/config.json
{
"backups": [
{
"name": "my-env",
"source": "server:/remote/path",
"dest": "/home/user/gob-backups",
"method": "rsync",
"password": "zip-encryption-password",
"retention": 7,
"schedule": "@hourly",
"enabled": true
}
]
}| Field | Description | Default |
|---|---|---|
name |
Display name for the backup | required |
source |
host:path (rsync over SSH) or /local/path |
required |
dest |
Local directory for zip archives | ~/gob-backups/<name> |
method |
rsync or copy |
rsync |
password |
Per-backup zip encryption password | (master) |
retention |
Max unique versions to keep | 7 |
schedule |
@hourly (only supported value) |
@hourly |
enabled |
Toggle this backup on/off | true |
Passwords are resolved in order: per-backup password > --password flag > GOB_CLI_PASSWORD env var.
Start with -port to enable the HTTP server:
gob-cli start -port 8080 -user adminThe UI provides:
- Browse backup targets with expandable archive lists
- Download zip archives with one click
- Status dashboard with uptime, archive count, total size
- Basic auth protection when
-useris set
| Endpoint | Description |
|---|---|
GET / |
Web UI |
GET /api/status |
Server status |
GET /api/health |
Health check |
GET /api/backups |
All backups + archives |
GET /api/backups/{name} |
Archives for a backup |
GET /api/backups/{name}/{file} |
Download an archive |
Per-IP sliding window rate limiting protects the UI and API from brute force attacks:
- Default: 30 requests/minute per IP
- Configure with
--rate-limit Nor--rate-limit 0to disable - Returns
429 Too Many RequestswithRetry-After: 60header - Respects
X-Forwarded-ForandX-Real-IPheaders behind proxies - Stale entries are purged every 5 minutes
- Every hour, the scheduler checks each enabled backup
- Rsync pulls the file from source to a temp directory
- SHA256 is computed — if the content is new, a password-protected zip is created
- Zips are named
{name}_{timestamp}_{sha[:16]}.zip - Retention enforcement removes the oldest unique-SHA zips beyond the limit
rsync(for remote sources over SSH)zip(for password-protected archives)- SSH key access to remote hosts (for rsync over SSH)
MIT