Backup agentless vía SFTP/SSH, zero deployment en el host remoto, soporte a network equipment (Cisco/Juniper/MikroTik/…), NAS (Synology/QNAP/TrueNAS), cloud SFTP (AWS Transfer, Hetzner Storage Box) y cloud VMs. Reemplaza mountpoints SSHFS/NFS/CIFS frágiles con conexiones SFTP per-job sin estado stale.
Documento técnico complementario a la página del plugin PodHeitor SFTP.
1. El problema: SSHFS/NFS/CIFS mountpoints son frágiles
El patrón tradicional de «backup remoto sin agente Bacula» es montar el filesystem remoto vía SSHFS/NFS/CIFS en el host del FD. Suena simple pero falla en campo de varias formas:
| Problema del mountpoint | Ventaja del SFTP |
|---|---|
| SSHFS/NFS/CIFS mounts quedan stale → backups fallan silenciosamente | SFTP abre conexión fresh per job — sin state stale |
| Mount requiere FUSE o kernel module en el host del FD | SFTP/SSH es pure userspace (Rust ssh2 / libssh2) — sin deps de kernel |
Credenciales almacenadas en /etc/fstab o systemd mount files |
Credenciales viven en config Bacula, encriptadas en rest |
| Mount expone el filesystem entero al host del FD | SFTP scopa acceso al path — sin mount surface local |
| Firewalling NFS/CIFS es complejo (portmapper, SMB ports) | SFTP/SSH = single TCP port (22), fácilmente firewalled |
| Mounts stale bloquean el proceso FD (hung stat calls) | SFTP timeout es per-operation — nunca bloquea el daemon |
| Network devices (switches, routers, firewalls) no se pueden montar | SFTP/SSH es nativo en network equipment |
| Servicios cloud SFTP (AWS Transfer, Hetzner Storage Box) | Conexión SFTP directa — sin mount layer |
2. Modelo arquitectónico
┌──────────────┐ PTCOMM protocol ┌──────────────────────────┐
│ Bacula FD │◄═══════════════════════► │ podheitor-sftp-backend │
│ │ (stdin/stdout) │ (Rust + libssh2) │
│ loads .so: │ │ │
│ podheitor- │ Handshake → Job Info │ connect() → walk() → │
│ sftp-fd.so │ → Params → Start → │ FNAME/STAT/DATA → │
│ (Rust cdylib,│ ← file data ← │ filtros include/exclude │
│ metaplugin- │ │ │
│ rs) │ │ │
└──────────────┘ └──────────────────────────┘
Misma arquitectura PodHeitor de cdylib + backend. El backend hospeda el cliente SFTP (libssh2 vía Rust ssh2), hace walk recursivo del path remoto, y streama metadata + data vía PTCOMM. Sin disco intermedio; el FD recibe los bytes directo.
3. Features
- Agentless — solo SFTP/SSH, sin software en el host remoto
- Full / Incremental / Differential — niveles Bacula nativos vía comparación de mtime
- Filtros include/exclude — glob-based (
*.pdf,*.tmp) por archivo y directorio - Metadata preservada — permisos, UID/GID, timestamps, symlinks
- Autenticación — SSH key (ed25519, RSA, ECDSA), agent forwarding, password
- Host key verification — protección MITM vía known_hosts
- File listing —
estimate(pre-backup), catalog queries, restore tree browsing - Multiple sources — N servidores SFTP en un solo FileSet
- Compression & Encryption — LZ4/GZIP nativo Bacula + AES
4. Casos de uso documentados
4.1 Network equipment
| Vendor | Modelos / OS |
|---|---|
| Cisco | Catalyst 9000 (IOS-XE), Nexus (NX-OS), ISR/ASR |
| Juniper | EX, QFX, SRX, MX (Junos) |
| MikroTik | Todos los RouterOS devices |
| Arista | 7000, 7500 series (EOS) |
| HPE Aruba | CX switches, Instant AP |
| Dell | PowerSwitch (OS10) |
| Fortinet | FortiGate (FortiOS) |
| Palo Alto | PA series (PAN-OS) |
| Ubiquiti | UniFi, EdgeRouter |
| Otros | VyOS, OPNsense, pfSense |
4.2 NAS y Storage
| Synology DiskStation | SFTP/SSH built-in (DSM) |
| QNAP | SFTP/SSH built-in (QTS) |
| TrueNAS / FreeNAS | SFTP/SSH built-in |
| Asustor, TerraMaster | SFTP/SSH disponible |
4.3 Cloud SFTP services
| AWS Transfer Family | Endpoint SFTP gestionado |
| Azure Blob Storage | SFTP access (preview/GA) |
| Hetzner Storage Box | SFTP/SSH nativo (port 23) |
| Files.com, ExaVault, GoAnywhere MFT | SFTP enterprise |
4.4 Cloud VMs y hosting
AWS EC2, GCP Compute, Azure VMs, DigitalOcean, Linode, Vultr, Hetzner Cloud, OVH; cPanel/WHM, Plesk, DirectAdmin — cualquier hosting con SFTP/SSH.
4.5 Embedded e IoT
Raspberry Pi, IoT gateways — backup ligero sin overhead de mount. Devices con storage limitado — sin layer FUSE/mount necesario.
5. Parámetros del plugin
| Parámetro | Required | Default | Descripción |
|---|---|---|---|
host |
yes | — | Hostname o IP del servidor SFTP |
port |
no | 22 |
Puerto SFTP |
user |
yes | — | Username SFTP |
password |
no | — | Password SFTP (prefiera keyfile) |
keyfile |
no | — | Path de la llave privada |
passphrase |
no | — | Passphrase de la llave |
path |
yes | / |
Directorio base remoto |
known_hosts |
no | — | Path del known_hosts |
verify_host |
no | yes |
Verifica host key |
timeout |
no | 30 |
Connection timeout (segundos) |
include |
no | — | Glob patterns de inclusión (ej. *.pdf,*.doc) |
exclude |
no | — | Glob patterns de exclusión (ej. *.tmp,*.log) |
abort_on_error |
no | no |
Aborta job en error de lectura |
6. Quick start
# 1. Prepara llave para acceso SFTP
sudo mkdir -p /etc/bacula/.ssh
sudo ssh-keygen -t ed25519 -f /etc/bacula/.ssh/id_ed25519 -N ""
sudo ssh-copy-id -i /etc/bacula/.ssh/id_ed25519.pub [email protected]
# 2. Configura FileSet
FileSet {
Name = "SFTP-Backup"
Include {
Options { Signature = SHA256; Compression = LZ4 }
Plugin = "podheitor-sftp: host=server.local user=backup keyfile=/etc/bacula/.ssh/id_ed25519 path=/data"
}
}
Job {
Name = "SFTP-Daily"
Type = Backup
Level = Incremental
FileSet = "SFTP-Backup"
Client = myserver-fd
Storage = File1
Pool = Default
Schedule = "WeeklyCycle"
}
7. Ejemplos include/exclude y multi-source
# Solo PDFs y Office docs
Plugin = "podheitor-sftp: host=server user=backup path=/data include=*.pdf,*.docx,*.xlsx"
# Skip temp y cache
Plugin = "podheitor-sftp: host=server user=backup path=/data exclude=*.tmp,*.cache,*.log"
# Network switch — solo configs
Plugin = "podheitor-sftp: host=10.0.0.1 user=admin path=/ include=*.conf,*.cfg verify_host=no"
# MikroTik — backup y export files
Plugin = "podheitor-sftp: host=10.0.0.3 user=admin path=/ include=*.backup,*.rsc verify_host=no"
Multi-source en un solo FileSet:
FileSet {
Name = "AllServers"
Include {
Options { Signature = SHA256; Compression = LZ4 }
Plugin = "podheitor-sftp: host=web1.prod user=deploy keyfile=/etc/bacula/.ssh/key path=/var/www exclude=*.log"
Plugin = "podheitor-sftp: host=web2.prod user=deploy keyfile=/etc/bacula/.ssh/key path=/var/www exclude=*.log"
Plugin = "podheitor-sftp: host=nas.local user=admin keyfile=/etc/bacula/.ssh/key path=/volume1/shared"
Plugin = "podheitor-sftp: host=switch-core user=admin keyfile=/etc/bacula/.ssh/key path=/ include=*.conf verify_host=no"
}
}
8. Restore
Restore opera en el namespace @sftp/host:port/path:
bconsole
* restore where=/tmp/sftp-restore select all done yes
9. Requirements
| Componente | Mínimo | Notas |
|---|---|---|
| Bacula Community | 13.0.0+ | Metaplugin framework requerido |
| libssh2 / openssl | system | Runtime libs (system packages) |
| Remote host | SFTP/SSH access | Sin agente |
10. Postura de licencia
Propietaria — LicenseRef-PodHeitor-Proprietary (tanto el .so FD-side como el backend). Ningún código statically-linked third-party es AGPL u otro copyleft. Las dependencias Rust transitivas (ssh2, libssh2-sys, libc, parking_lot, openssl-sys) son todas MIT / Apache-2.0.
¿Listo para evaluar?
Trial gratuito de 30 días para deployments SFTP calificados (network equipment, NAS, cloud, embedded). Garantizamos al menos 50% de descuento vs Bacula Enterprise, Veeam o Commvault, con más funcionalidades — incluyendo agentless puro sin el mountpoint frágil que el competidor fuerza.
Heitor Faria — Fundador, PodHeitor International
✉ [email protected]
☎ +1 (789) 726-1749 · +55 (61) 98268-4220 (WhatsApp)
🔗 Página del plugin PodHeitor SFTP
Disponível em:
Português (Portugués, Brasil)
English (Inglés)
Español