mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-01 10:22:08 +00:00
120 lines
11 KiB
JSON
120 lines
11 KiB
JSON
{
|
||
"meta": {
|
||
"title": "Proxmox Backup to Personal Cloud Storage | ProxMenux Guides",
|
||
"description": "Use rclone to mount a personal cloud (Google Drive, Mega, Dropbox, OneDrive, etc.) as a directory on the Proxmox VE host, register it as a vzdump datastore, and back up VMs / CTs straight to the cloud — no extra script.",
|
||
"ogTitle": "Proxmox Backup to Personal Cloud Storage",
|
||
"ogDescription": "Mount a personal cloud with rclone on a Proxmox VE host and back up VMs / CTs straight to it as a vzdump datastore."
|
||
},
|
||
"header": {
|
||
"title": "Proxmox Backup to Personal Cloud Storage",
|
||
"description": "Use rclone to mount a personal cloud (Google Drive, Mega, Dropbox, OneDrive, etc.) as a directory on the Proxmox VE host, register it as a vzdump datastore, and back up VMs / CTs straight to the cloud — no extra script.",
|
||
"section": "Guides"
|
||
},
|
||
"intro": {
|
||
"pbsCalloutTitle": "Consider Proxmox Backup Server first",
|
||
"pbsCalloutBody": "On a second machine that meets its x86-64 requirements, <pbsLink>Proxmox Backup Server</pbsLink> offers incremental, deduplicated backups and optional client-side encryption. It is designed for VM backups. This guide instead covers mounting personal cloud storage such as Google Drive, Mega, OneDrive or Dropbox as a backup destination.",
|
||
"stepsTitle": "What you'll do",
|
||
"steps": [
|
||
"Create a directory on the Proxmox host and register it as a vzdump-capable datastore.",
|
||
"Install and configure rclone for your cloud provider.",
|
||
"Mount the cloud folder onto the directory.",
|
||
"Make the mount survive reboots (systemd unit — more robust than crontab)."
|
||
],
|
||
"vzdumpCalloutTitle": "Heads up about Proxmox vzdump backups",
|
||
"vzdumpCalloutBody": "Proxmox vzdump archives are <strong>full backups, not incremental</strong>. Their actual size depends on the data included and compression, not just the virtual disk capacity. If one archive occupies 30 GB, five retained archives need roughly 150 GB. Set a retention policy so the cloud does not fill up."
|
||
},
|
||
"createDir": {
|
||
"heading": "1. Create the host directory and register it as a datastore",
|
||
"body": "SSH into the host (or use the Proxmox shell) and create a mount-point directory under <code>/mnt/</code>. The name is arbitrary — use something that identifies the provider:",
|
||
"mkdirCode": "mkdir -p /mnt/gdrive",
|
||
"afterMkdir": "In the Proxmox web UI: <strong>Datacenter → Storage → Add → Directory</strong>.",
|
||
"image1Alt": "Adding new storage in Proxmox",
|
||
"configIntro": "Configure it like this:",
|
||
"configItems": [
|
||
"<strong>ID:</strong> <code>gdrive</code> (or whatever you used for the directory name)",
|
||
"<strong>Directory:</strong> <code>/mnt/gdrive</code>",
|
||
"<strong>Content:</strong> select <strong>VZDump backup file</strong>"
|
||
],
|
||
"image2Alt": "Configuring new storage in Proxmox",
|
||
"afterConfig": "Click <strong>Add</strong>:",
|
||
"image3Alt": "New storage added in Proxmox",
|
||
"afterAdd": "The directory is now registered as a Proxmox datastore — but it's still empty (no cloud is mounted on it yet)."
|
||
},
|
||
"installRclone": {
|
||
"heading": "2. Install and configure rclone",
|
||
"body": "<rcloneLink>rclone</rcloneLink> is the tool that talks to cloud storage providers. Install it from Debian repositories:",
|
||
"installCode": "apt-get update\napt-get install -y rclone",
|
||
"newerCalloutTitle": "If you need a newer rclone",
|
||
"newerCalloutBody": "If you need a newer rclone than what Debian ships, use the official installer:",
|
||
"newerCode": "curl https://rclone.org/install.sh | bash",
|
||
"tunnelHeading": "2.1 Browser-based authentication via SSH tunnel",
|
||
"tunnelBody": "For providers with browser-based login, the Proxmox host usually has no browser. Follow <remoteSetupLink>rclone’s remote-setup procedure</remoteSetupLink>: use your laptop’s browser and forward its localhost callback connection through SSH to rclone on the host.",
|
||
"tunnelFrom": "From your <strong>laptop</strong> (replace <code>ip_proxmox</code> with the Proxmox IP):",
|
||
"tunnelCode": "ssh -L localhost:53682:localhost:53682 root@ip_proxmox",
|
||
"tunnelAfter": "This SSH session opens localhost port 53682 on your laptop and forwards connections to the same port on the Proxmox host. Keep it open during the rclone configuration below.",
|
||
"runHeading": "2.2 Run rclone config",
|
||
"runBody": "In the SSH session you just opened, run:",
|
||
"runCode": "rclone config",
|
||
"runAfter": "Follow the prompts to add a new remote. The exact answers depend on your provider — see the <providerDocsLink>rclone provider docs</providerDocsLink> for Google Drive, Mega, Dropbox, OneDrive, etc. The key step is the auth question:",
|
||
"authPrompt": "Use web browser to automatically authenticate rclone with remote?\n * Say Y if the machine running rclone has a web browser you can use\n * Say N if running rclone on a (remote) machine without web browser access\nIf not sure try Y. If Y failed, try N.\ny) Yes\nn) No\ny/n> y",
|
||
"authAfter": "Answer <strong>Y</strong> — rclone prints a localhost URL. Open it in <strong>your laptop's browser</strong> (the SSH tunnel routes it correctly), authorise the rclone application in your cloud provider, and the config completes.",
|
||
"nameRemote": "When asked for the remote's name, use something matching the directory you created — e.g. <code>gdrive</code>."
|
||
},
|
||
"mount": {
|
||
"heading": "3. Mount the cloud folder",
|
||
"body": "Create a folder in your personal cloud to hold the backups. Call it something like <code>PBC</code> (Proxmox Backup Cloud).",
|
||
"mountIntro": "Mount it onto the host directory:",
|
||
"mountCode": "rclone mount gdrive:/PBC /mnt/gdrive --allow-other --allow-non-empty --vfs-cache-mode writes",
|
||
"mountItems": [
|
||
"<code>gdrive:/PBC</code> — the folder in your cloud.",
|
||
"<code>/mnt/gdrive</code> — the host directory you registered as a datastore."
|
||
],
|
||
"mountFootnote": "<strong>This command stays in the foreground.</strong> For testing, leave it running in a terminal and try a backup. For permanent mounting on every boot, set up a systemd unit (next section)."
|
||
},
|
||
"systemd": {
|
||
"heading": "4. Auto-mount on every boot (systemd)",
|
||
"body": "A systemd unit is more robust than <code>crontab @reboot</code> — it can wait for the network to be ready, restart on failure, and gives you proper logs via <code>journalctl</code>.",
|
||
"createIntro": "Create the unit file:",
|
||
"createCode": "nano /etc/systemd/system/rclone-gdrive.service",
|
||
"pasteIntro": "Paste:",
|
||
"unitCode": "[Unit]\nDescription=rclone mount for Proxmox cloud backups\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nType=notify\nExecStart=/usr/bin/rclone mount \\\n gdrive:/PBC /mnt/gdrive \\\n --allow-other \\\n --allow-non-empty \\\n --vfs-cache-mode writes \\\n --log-level INFO \\\n --log-file /var/log/rclone-gdrive.log\nExecStop=/bin/fusermount -uz /mnt/gdrive\nRestart=on-failure\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target",
|
||
"adjust": "Adjust <code>gdrive:/PBC</code> and <code>/mnt/gdrive</code> if you used different names. Save (<code>Ctrl+X</code>), then enable and start:",
|
||
"enableCode": "systemctl daemon-reload\nsystemctl enable --now rclone-gdrive.service",
|
||
"verifyIntro": "Verify:",
|
||
"verifyCode": "systemctl status rclone-gdrive.service\nmount | grep /mnt/gdrive",
|
||
"verifyAfter": "The unit requests a restart after 10 seconds if the rclone process exits with a failure. This does not repair expired credentials or guarantee recovery from every network or provider error. Check <code>/var/log/rclone-gdrive.log</code> and <code>journalctl -u rclone-gdrive.service -f</code>.",
|
||
"vfsCalloutTitle": "Why --vfs-cache-mode writes?",
|
||
"vfsCalloutBody": "With write caching, writes such as <code>fwrite</code> go to a local disk cache. rclone uploads a file after it is closed and the write-back delay has passed. Reserve enough local space for active backups, and verify the upload has completed before counting the cloud copy as available."
|
||
},
|
||
"configureBackup": {
|
||
"heading": "5. Configure the backup to land in the cloud",
|
||
"body": "In the Proxmox UI, when scheduling a backup or running an ad-hoc one, pick the storage you registered as the <strong>target</strong>:",
|
||
"image5Alt": "Selecting backup destination in Proxmox",
|
||
"after": "After vzdump finishes, wait for rclone’s background upload to complete and verify the archive in the cloud provider’s interface:",
|
||
"image6Alt": "Backup file in cloud storage"
|
||
},
|
||
"retention": {
|
||
"heading": "6. Retention — keep cloud quota under control",
|
||
"body": "Proxmox vzdump archives are <strong>full backups, not incremental</strong>. Their actual size depends on the data included and compression, not just the virtual disk capacity. If one archive occupies 30 GB, five retained archives need roughly 150 GB. Set a retention policy so the cloud does not fill up.",
|
||
"uiPath": "In the Proxmox UI: <strong>Datacenter → Backup → [your job] → Retention</strong>:",
|
||
"image7Alt": "Backup retention settings in Proxmox",
|
||
"starterIntro": "Reasonable starter values for a home / lab setup:",
|
||
"starterItems": [
|
||
"Keep last 5 daily backups",
|
||
"Keep last 4 weekly backups",
|
||
"Keep last 6 monthly backups"
|
||
],
|
||
"adjust": "Adjust based on your cloud quota and how often the VMs change."
|
||
},
|
||
"troubleshoot": {
|
||
"heading": "Troubleshooting",
|
||
"items": [
|
||
"<strong><code>Mount point /mnt/gdrive is itself on a fuse.rclone filesystem</code>:</strong> the directory is already mounted, possibly by another rclone instance. Check that no backup is active before removing the old mount with <code>fusermount -uz /mnt/gdrive</code>, then restart the systemd unit.",
|
||
"<strong>Backup is extremely slow:</strong> confirm <code>--vfs-cache-mode writes</code> is on the <code>ExecStart</code> line. Check local cache performance, upload bandwidth and provider limits. The background upload can continue after vzdump finishes.",
|
||
"<strong>Backup fails with No space left on device:</strong> check local cache space and the provider’s quota. The cache commonly uses <code>~/.cache/rclone/</code>. If it is full, select a cache path such as <code>--cache-dir /var/cache/rclone</code> on a filesystem with enough space; a different path on the same full filesystem will not help.",
|
||
"<strong>rclone authentication token expired:</strong> reconnect over SSH with the tunnel (<code>ssh -L localhost:53682:localhost:53682 root@ip_proxmox</code>) and run <code>rclone config reconnect gdrive:</code> to renew authorization.",
|
||
"<strong>Backups land but are corrupted on restore:</strong> stop using cloud storage as the <strong>only</strong> backup destination. Combine with local PBS / vzdump on a different disk for resilience."
|
||
]
|
||
}
|
||
}
|