{"id":42397208,"url":"https://github.com/herwingx/backup-proxmox","last_synced_at":"2026-01-28T01:01:58.816Z","repository":{"id":330646848,"uuid":"1123451305","full_name":"herwingx/backup-proxmox","owner":"herwingx","description":"Sistema de respaldo híbrido e inteligente para Proxmox VE con sync a Google Drive y alertas en Telegram.","archived":false,"fork":false,"pushed_at":"2026-01-02T17:31:21.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-09T03:56:41.032Z","etag":null,"topics":["automation","backup","bash","google-drive","proxmox","rclone","telegram"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/herwingx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-26T22:44:46.000Z","updated_at":"2026-01-02T17:31:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/herwingx/backup-proxmox","commit_stats":null,"previous_names":["herwingx/backup-proxmox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/herwingx/backup-proxmox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herwingx%2Fbackup-proxmox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herwingx%2Fbackup-proxmox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herwingx%2Fbackup-proxmox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herwingx%2Fbackup-proxmox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herwingx","download_url":"https://codeload.github.com/herwingx/backup-proxmox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herwingx%2Fbackup-proxmox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28831150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","backup","bash","google-drive","proxmox","rclone","telegram"],"created_at":"2026-01-28T01:01:58.712Z","updated_at":"2026-01-28T01:01:58.801Z","avatar_url":"https://github.com/herwingx.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔄 Proxmox Smart Backup\n\n\u003e **Sistema de respaldo híbrido e inteligente para Proxmox VE** — Backups automáticos locales, rotación inteligente y sincronización segura a Google Drive con notificaciones en tiempo real.\n\n[![Proxmox](https://img.shields.io/badge/Proxmox-E57000?style=flat-square\u0026logo=proxmox\u0026logoColor=white)](https://www.proxmox.com/)\n[![Bash](https://img.shields.io/badge/Language-Bash-4EAA25?style=flat-square\u0026logo=gnu-bash\u0026logoColor=white)](https://www.gnu.org/software/bash/)\n[![Security](https://img.shields.io/badge/Security-Age%20Encryption-101010?style=flat-square\u0026logo=letsencrypt\u0026logoColor=white)](https://github.com/FiloSottile/age)\n[![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/herwingx/assets/main/proxmox-backup-banner.png\" alt=\"Proxmox Smart Backup Architecture\" width=\"800\"/\u003e\n  \u003c!-- Placeholder image, replace with actual screenshot/diagram if available --\u003e\n\u003c/p\u003e\n\n---\n\n## ✨ Características\n\n| Característica          | Descripción                                                                                             |\n| :---------------------- | :------------------------------------------------------------------------------------------------------ |\n| 💾 **Backup Local**      | Ejecución diaria de `vzdump` para VMs y Contenedores LXC con rotación configurable (Default: 3 copias). |\n| ☁️ **Sync Híbrido**      | Estrategia inteligente: Configs se suben a diario, Backups pesados cada 3 días a Google Drive.          |\n| 🔐 **Zero Knowledge**    | Gestión de secretos segura usando `age` para encriptar tokens y credenciales en el repositorio.         |\n| 📱 **Alertas Real-Time** | Notificaciones detalladas por Telegram al iniciar, completar o fallar un respaldo.                      |\n| 🤖 **Automatización**    | Instalador interactivo que configura Cronjobs, Logrotate y dependencias automáticamente.                |\n| 📦 **Dependencias Auto** | Integración nativa con `dotfiles` para el manejo de `rclone` y credenciales de nube.                    |\n\n---\n\n## 🚀 Inicio Rápido\n\n### Requisitos Previos\n\n- **Proxmox VE** 7.x o superior.\n- **Acceso Root** al servidor.\n- **[dotfiles](https://github.com/herwingx/dotfiles)** ejecutado (Recomendado para instalar `age`, `rclone` y configurar `gdrive`).\n\n### 1. Clonar el repositorio\n\n```bash\ncd /root/development\ngit clone https://github.com/herwingx/backup-proxmox.git\ncd backup-proxmox\n```\n\n### 2. Configurar Secretos\n\nGestionamos las credenciales de forma segura. Copia la plantilla y configura tus tokens.\n\n```bash\ncp .env.example .env\nnano .env\n```\n\nVariables principales (`.env`):\n```env\nTELEGRAM_TOKEN=\"123456789:ABCdefGHIjklMNOpqrsTUVwxyZ\"\nTELEGRAM_CHAT_ID=\"987654321\"\n```\n\nEncripta tus secretos para mantenerlos seguros (opcional pero recomendado):\n```bash\n./scripts/manage_secrets.sh encrypt\n# Te pedirá una passphrase. ¡Guárdala bien!\n```\n\n### 3. Instalación Automática\n\nEl script instalará las herramientas en `/usr/local/bin` y configurará el Cronjob.\n\n```bash\nsudo ./install.sh\n```\n\nEl asistente verificará:\n- [x] Dependencias (`age`, `rclone`).\n- [x] Configuración de Google Drive (`rclone config`).\n- [x] Desencriptado de secretos (si usaste `manage_secrets`).\n- [x] Prueba de conexión con Telegram.\n\n---\n\n## 🏗️ Arquitectura\n\n### 🗺️ Panorama General\n\nEl sistema sigue un flujo de respaldo híbrido priorizando la velocidad local y la seguridad en la nube.\n\n```mermaid\nflowchart TD\n    %% Defines Styles\n    classDef server fill:#f9f9f9,stroke:#333,stroke-width:2px;\n    classDef cloud fill:#e1f5fe,stroke:#0277bd,stroke-width:2px;\n    classDef storage fill:#fff3e0,stroke:#ef6c00,stroke-width:2px;\n    classDef bot fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px,stroke-dasharray: 5 5;\n\n    subgraph Proxmox_Server [🖥️ Proxmox VE Server]\n        direction TB\n        VMs[📦 VMs \u0026 LXC]:::server\n        VZDump[⚙️ VZDump Tool]:::server\n        LocalStore[📂 /mnt/backups/dump]:::storage\n        Script[📜 Smart Backup Script]:::server\n        \n        VMs --\u003e|Snapshot Diario| VZDump\n        VZDump --\u003e|Genera .zst| LocalStore\n        Script -.-\u003e|Controla| VZDump\n    end\n\n    subgraph Cloud [☁️ Nube]\n        GDrive[Google Drive]:::cloud\n    end\n\n    Telegram[📱 Telegram Bot]:::bot\n\n    LocalStore --\u003e|\"Sync Encriptado (rclone)\"| GDrive\n    Script --\u003e|Notificación| Telegram\n\n    Note[📝 Estrategia de Subida:\u003cbr/\u003e- Configs: Diario\u003cbr/\u003e- VMs: Cada 3 Días]\n    Script -.- Note\n```\n\n### 🔄 Flujo de Ejecución\n\nDetalle del proceso paso a paso ejecutado por el cronjob.\n\n```mermaid\nsequenceDiagram\n    autonumber\n    participant Cron as ⏰ Cronjob\n    participant Script as 📜 Backup Script\n    participant PVE as 🖥️ Proxmox VE\n    participant Local as 📂 Disco Local\n    participant Cloud as ☁️ Google Drive\n    participant TG as 📱 Telegram\n\n    Cron-\u003e\u003eScript: Ejecuta (3:00 AM)\n    Script-\u003e\u003eTG: 🔔 Notificación de Inicio\n    \n    loop Por cada VM/LXC\n        Script-\u003e\u003ePVE: vzdump (Snapshot Mode)\n        PVE--\u003e\u003eLocal: Guardar archivo .zst\n        Script-\u003e\u003eLocal: Rotar Backups (Mantener 3)\n    end\n\n    rect rgb(240, 248, 255)\n    note right of Script: Sincronización Inteligente\n    alt Solo Configs (Días 1, 2, 4, 5...)\n        Script-\u003e\u003eCloud: Rclone sync (Configs)\n    else Full Backup (Días 3, 6, 9...)\n        Script-\u003e\u003eCloud: Rclone sync (VMs + Configs)\n    end\n    end\n\n    Script-\u003e\u003eTG: ✅ Reporte de Éxito\n    \n    opt Error Crítico\n        Script-\u003e\u003eTG: ❌ Alerta de Fallo + Logs\n    end\n```\n\n---\n\n## 📦 Opciones de Despliegue\n\n| Método         | Archivo Principal   | Uso Ideal                                                   |\n| :------------- | :------------------ | :---------------------------------------------------------- |\n| **Instalador** | `install.sh`        | **Producción**. Configura todo el entorno, logs y cronjobs. |\n| **Manual**     | `scripts/backup.sh` | **Debug/Dev**. Ejecución directa para pruebas puntuales.    |\n\n## 🔧 Comandos Útiles\n\n```bash\n# Ejecutar backup manualmente (Trigger inmediato)\nproxmox-backup\n\n# Ver logs en tiempo real\ntail -f /var/log/proxmox-backup/backup-$(date +%F).log\n\n# Editar configuración de entorno\nnano /etc/proxmox-backup/config.env\n\n# Gestionar secretos (Encriptar/Desencriptar)\n./scripts/manage_secrets.sh help\n```\n\n## 📚 Documentación\n\n| Documento                                                | Descripción                              |\n| :------------------------------------------------------- | :--------------------------------------- |\n| [`install.sh`](install.sh)                               | Script de instalación e idempotencia.    |\n| [`scripts/backup.sh`](scripts/backup.sh)                 | Lógica principal de respaldo y rotación. |\n| [`scripts/manage_secrets.sh`](scripts/manage_secrets.sh) | Utilidad para encriptar `.env` con age.  |\n\n## 🛠️ Stack Tecnológico\n\n**Core**\n- **Bash**: Scripting avanzado con manejo de errores y señales.\n- **Proxmox API / VZDump**: Herramientas nativas de virtualización.\n\n**Seguridad \u0026 Almacenamiento**\n- **Age**: Encriptación moderna para secretos.\n- **Rclone**: Sincronización cloud agnóstica (Google Drive configurado por defecto).\n\n**Notificaciones**\n- **Telegram Bot API**: Alertas instantáneas.\n\n## 🔒 Seguridad\n\n- ✅ **Secretos Encriptados**: Las credenciales nunca se suben en texto plano al repositorio (uso de `.env.age`).\n- ✅ **Permisos Restrictivos**: Los archivos de configuración en `/etc/proxmox-backup` tienen permisos `600` (solo root).\n- ✅ **Logs Rotativos**: `logrotate` configurado para evitar saturación de disco, manteniendo 7 días de historial.\n\n## 🤝 Contribuir\n\n1. Fork del repositorio.\n2. Crea una rama para tu feature: `git checkout -b feat/nueva-funcionalidad`.\n3. Commit de tus cambios: `git commit -m 'feat: añade soporte para AWS S3'`.\n4. Push a la rama: `git push origin feat/nueva-funcionalidad`.\n5. Abre un Pull Request.\n\n## 📄 Licencia\n\nEste proyecto está bajo la licencia MIT. Ver [LICENSE](LICENSE) para más detalles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherwingx%2Fbackup-proxmox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherwingx%2Fbackup-proxmox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherwingx%2Fbackup-proxmox/lists"}