secubox-openwrt/package/secubox/secubox-app-backup
CyberMind-FR 9ddf5a4e0b fix(build): Fix 16 failed packages with missing Build/Compile and URL config
- Add missing 'define Build/Compile' to script-only packages:
  - secubox-app-config-vault
  - secubox-app-gotosocial
  - secubox-app-ipblocklist
  - secubox-app-ksmbd
  - secubox-app-qbittorrent
  - secubox-app-talk-hpb
  - secubox-app-vhost-manager
  - secubox-app-webtorrent
  - secubox-avatar-tap
  - secubox-core-users
  - secubox-dpi-dual
  - secubox-app-backup

- Fix luci-app-interceptor: Add missing BuildPackage call
- Fix luci-app-master-link: Correct RPCD handler filename (underscore → dash)
- Fix luci-app-config-vault: Add Build/Compile definition

- Create secubox-console Makefile (new package for remote management)
- Create secubox-app-backup cron job file

- Update secubox-app-repo: Change feed URLs from local IP (192.168.255.1:8888)
  to repo.secubox.in domain with HTTPS and proper src/gz format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-18 18:01:51 +01:00
..
files fix(build): Fix 16 failed packages with missing Build/Compile and URL config 2026-03-18 18:01:51 +01:00
Makefile fix(build): Fix 16 failed packages with missing Build/Compile and URL config 2026-03-18 18:01:51 +01:00
README.md feat: Add unified backup manager, custom mail server, DNS subdomain generator 2026-02-05 10:40:32 +01:00

SecuBox Backup Manager

Unified backup system for LXC containers, UCI configuration, service data, and profiles with mesh sync support.

Installation

opkg install secubox-app-backup

CLI Usage

Create Backups

# Full backup (config + containers + services)
secubox-backup create --full

# Config only (UCI, certificates)
secubox-backup create --config

# Containers only (LXC)
secubox-backup create --containers

# Services only (HAProxy, mitmproxy data)
secubox-backup create --services

List Backups

secubox-backup list              # All backups
secubox-backup list --local      # Local only
secubox-backup list --remote     # Gitea remote only

Restore

secubox-backup restore config-20260205-120000.tar.gz
secubox-backup restore config-20260205-120000.tar.gz --dry-run

Container Management

secubox-backup container list                    # List LXC containers
secubox-backup container backup mitmproxy        # Backup specific container
secubox-backup container restore mitmproxy /path/to/backup.tar.gz
secubox-backup container backups mitmproxy       # List backups for container

Profile Management

secubox-backup profile list          # List profiles
secubox-backup profile create mysetup # Create from current config
secubox-backup profile apply mysetup  # Apply profile

Remote Sync (Gitea)

secubox-backup sync --push    # Push to Gitea
secubox-backup sync --pull    # List remote backups

Maintenance

secubox-backup status    # Show backup status
secubox-backup cleanup   # Remove old backups (keeps last 10)

UCI Configuration

config backup 'main'
    option enabled '1'
    option storage_path '/srv/backups'
    option retention_days '30'
    option max_backups '10'
    option compress '1'

config schedule 'daily'
    option enabled '1'
    option type 'config'
    option cron '0 3 * * *'

config schedule 'weekly'
    option enabled '1'
    option type 'full'
    option cron '0 4 * * 0'

config remote 'gitea'
    option enabled '1'
    option url 'https://git.example.com'
    option repo 'user/backups'
    option token 'your-token'
    option branch 'master'

Backup Structure

/srv/backups/
├── config/           # UCI and certificate backups
│   └── config-YYYYMMDD-HHMMSS.tar.gz
├── containers/       # LXC container backups
│   ├── mitmproxy-YYYYMMDD-HHMMSS.tar.gz
│   └── haproxy-YYYYMMDD-HHMMSS.tar.gz
├── services/         # Service data backups
│   └── haproxy-YYYYMMDD-HHMMSS.tar.gz
└── profiles/         # Configuration profiles
    └── mysetup.json

What's Backed Up

Type Contents
Config /etc/config/*, /etc/secubox/*, /etc/haproxy/*, /srv/haproxy/certs/*, /etc/acme/*
Containers Full LXC rootfs from /srv/lxc/<name>/
Services /srv/haproxy/, /srv/mitmproxy/, /srv/localai/, /srv/gitea/

Dependencies

  • lxc - For container backup/restore
  • tar - Archive creation
  • wget - Gitea API communication (optional)