Paperless-ngx Backup to Synology NAS via NFS
Paperless-ngx Backup to Synology NAS via NFS
Overview
This guide sets up automated, daily, incremental backups of Paperless-ngx running in a Proxmox LXC container to a Synology NAS.
The architecture ensures that even if the Proxmox host fails, all documents, metadata, and configurations are safely mirrored to external network storage.
Technical Implementation
1. Infrastructure (NFS & Mounts)
Detailed steps for creating the Synology shared folder, configuring NFS permissions, and mounting the share permanently on the Proxmox host.
2. Automation (Rsync & Cron)
Detailed steps for installing prerequisites, creating the backup script, and scheduling it for daily execution.
Backup Summary
- Frequency: Daily at 2:00 AM.
- Method: Rsync (Incremental Mirror).
- Storage: Synology NAS (
paperless-backupshared folder). - Paths:
- Inside LXC:
/data/paperless/(Source) →/mnt/paperless-backup/(Target) - Proxmox Host:
/mnt/paperless-backup/
- Inside LXC:
Recovery Process
To restore from backup:
- Stop containers:
docker compose down. - Sync data back:
rsync -av /mnt/paperless-backup/media/ /data/paperless/media/. - Restart containers:
docker compose up -d.
Troubleshooting & Maintenance
- Logs: Check
/var/log/paperless-backup.logon the Proxmox host. - Verification: Run
du -sh /mnt/paperless-backup/periodically to check growth. - Security: NFS access is limited to the local subnet.
System Architecture
graph TD
A[Paperless in Docker LXC] -->|/data/paperless/| B(Bind Mount to Host)
B -->|/mnt/paperless-backup/| C{Proxmox Host}
C -->|NFS Protocol| D[Synology NAS]
D -->|volume1/paperless-backup/| E[Final Storage]