Hostxpeed
Login Get Started →
Control Panel

How to Set Up Google Drive Backup in HestiaCP

5 min read
31 views
Jun 10, 2026

Prerequisites

Before setting up Google Drive backup, make sure you have:

  • Google account with Google Drive access
  • SSH access to your VPS

Install and Configure Rclone

curl https://rclone.org/install.sh | sudo bash

Configure Google Drive:

rclone config

Follow prompts:

  1. Select n) New remote
  2. Name: gdrive
  3. Type: drive
  4. Client ID: Leave blank
  5. Client Secret: Leave blank
  6. Scope: 1 (full drive access)
  7. Root folder ID: Leave blank
  8. Service Account: Leave blank
  9. Edit advanced config: n
  10. Use auto config: n (if headless server)
  11. Follow URL in browser to authorize
  12. Paste verification code

Google Drive Backup Script

#!/bin/bash
# Create backup
/usr/local/hestia/bin/v-backup-users

# Sync to Google Drive
rclone sync /backup/ gdrive:HestiaBackups/

# Keep only last 7 days locally
find /backup -name "*.tar" -mtime +7 -delete

# Log
echo "$(date): Backup to Google Drive completed" >> /var/log/gdrive-backup.log

Make executable:

chmod +x /root/gdrive-backup.sh

Schedule Backup

crontab -e

Add:

0 2 * * * /root/gdrive-backup.sh

Restore from Google Drive

# List backups
rclone ls gdrive:HestiaBackups/

# Download specific backup
rclone copy gdrive:HestiaBackups/admin.2026-04-29.tar /backup/

# Restore
/usr/local/hestia/bin/v-restore-user admin /backup/admin.2026-04-29.tar

Monitor Backup Logs

tail -f /var/log/gdrive-backup.log

✅ Google Drive backup has been configured successfully!

Was this article helpful?