How to automate Coolify backups to Google Drive?
Automate Coolify backups by routing local data through a MinIO S3 bucket and using Rclone to sync that storage mount to Google Drive via a scheduled cron job.
At InfraCordeX, we realized that relying on local disk backups is a recipe for disaster. While building internal tools, we needed a "set and forget" pipeline that moved our Coolify snapshots to an off-site 5TB vault without manual intervention. This protocol uses MinIO as a local buffer and Rclone as the transport layer.
How to configure MinIO for local backup storage?
Deploy MinIO via Docker Compose to act as an S3-compatible intermediary that captures Coolify's backup exports before cloud synchronization.
Standard S3 providers can get expensive with high egress. We run MinIO locally to handle the initial "hit" of the backup. This allows Coolify to point to an S3-compatible endpoint on the same network, which we then "vacuum" to the cloud.
YAML
services:
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
restart: always
ports:
- "9005:9000" # API Access
- "9006:9001" # Console Access
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: YourVerySecurePassword123
volumes:
- minio_data:/data
volumes:
minio_data:
Where are Docker volume mount points located?
Locate Docker volume mount points by running docker volume inspect and identifying the "Mountpoint" field, typically found in /var/lib/docker/volumes/.
To sync files, Rclone needs to know where the bits actually live on your NVMe or SSD. Don't guess the path; Docker abstracts this. Use the inspect command to find the absolute path for your script.
Bash
# List all volumes to find your MinIO data docker volume ls # Inspect the specific volume docker volume inspect infracordex-backups_minio_data
Look for the Mountpoint key. It usually maps to /var/lib/docker/volumes//_data. This is the source path for your Rclone sync.
How to sync MinIO backups to Google Drive with Rclone?
Use the rclone sync command targeted at your local MinIO data directory and a configured Google Drive remote to create an automated off-site backup pipeline.
Rclone is the industry standard for this. Once you've installed it via their official script, you need to map a "remote." If you are working on a headless server, use SSH port forwarding (-L 53682:127.0.0.1:53682) to handle the Oauth2 flow in your local browser.
The Automation Script
We store our logic in /opt/scripts/backup-vault.sh. This script handles the heavy lifting of mirroring the local MinIO directory to the Google Drive "Vault" folder.
Bash
#!/bin/bash # Sync local MinIO data volume to the 5TB GDrive remote # Replace with the path from docker volume inspect SOURCE="/var/lib/docker/volumes/minio_data/_data/infra-backups/" DEST="gdrive:InfraCordeX_Vault" rclone sync "$SOURCE" "$DEST" --log-file=/var/log/backup-vault.log
Scheduling the Cron Job
A backup is only good if it actually runs. We schedule this for 4:00 AM when traffic is lowest.
Bash
# Set permissions sudo chmod +x /opt/scripts/backup-vault.sh # Add to crontab 0 4 * * * /opt/scripts/backup-vault.sh
Comparison of Backup Strategies
| Strategy | Speed | Cost | Reliability |
| Local Only | Fastest | $0 | Low (Single point of failure) |
| Native S3 | Medium | High | High (Expensive Egress) |
| Hybrid (MinIO + Rclone) | Fast | Low | Highest (Redundant & Automated) |
Implementation Resources
Related Guides
- Setting Up phpMyAdmin Users in Coolify
- The Ultimate Angular 21 Migration Guide
- Migrating System Bars in Capacitor 8
- DeepSeek V4 vs. ChatGPT and Claude: A Comprehensive Comparison
Struggling with server deployments or Coolify configurations? InfraCordeX optimizes your infrastructure for speed and security. [Get an Audit]
Written by Muhammad Nouman Sehgal
Full Stack Developer & CEO of InfraCordeX. Specializing in high-performance Angular, Ionic, and On-Device AI architectures.
