← Back to list

How to Backup Your Website to Google Drive in Chunks

A Complete Guide for Slow Internet Connections

Mursaleen Ahmad · 2026-01-29 01:09 · 0 claps · 3.0 min read
#backup #servers #rclone #google-drive #website
Open on Medium ↗

How to Backup Your Website to Google Drive in Chunks

A Complete Guide for Slow Internet Connections

The Problem with Traditional Backups

If you’ve ever tried to backup your entire website with a slow internet connection, you know the frustration: downloads that take hours, interrupted transfers, and timeouts that force you to start all over again. The solution? Break your backup into manageable chunks and upload them directly from your server to Google Drive using your server’s fast connection.

In this guide, I’ll walk you through the complete process of creating compressed backup chunks and automatically syncing them to Google Drive — no painful downloads required.

The Solution: Server-to-Cloud Backup

Instead of downloading the backup to your computer, we’ll

  • Compress the website files on the server
  • Split the compressed backup into smaller chunks (500MB each)
  • Upload chunks directly from the server to Google Drive using a tool named rclone
  • Access your backups anytime from Google Drive

This approach leverages your server’s fast connection and creates resumable chunks that won’t fail if there’s a brief interruption.

Step-by-Step Guide

Step 1: Connect to Your Server

First, connect to your server via SSH:

ssh username@your-server-ip

Step 2: Install rclone

rclone is a powerful command-line tool that syncs files to cloud storage. Install it with this single command:

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

Step 3: Configure rclone with Google Drive

Now let’s connect rclone to your Google Drive account:

rclone config

Follow these prompts:

  • Type n for new remote
  • Name it gdrive (or any name you prefer)
  • Select Google Drive from the list (usually option 13–15)
  • Leave Client ID and Secret blank (press Enter)
  • Choose full access scope (option 1)
  • Leave root folder ID blank
  • Leave service account file blank
  • Say n to advanced config
  • Say n to auto config (because you’re on a remote server and that server can’t run browser’s instance)

Step 3.1: The Authorization Challenge

Here’s where it gets interesting. The config will ask you to run a command that looks like this:

rclone authorize "drive" "some_token_here"

Important: You need to run this command on your LOCAL computer (not the server), because it will open a browser for authentication.

On your local machine, install rclone (see Step 2) and run the authorization command. Your browser will open, you’ll authorize Google Drive access, and you’ll receive a long token that looks like a JSON object.

Copy the entire token and paste it back into your server’s SSH session when prompted for config_token.

  • Say n when asked about Team Drive (unless you need it)
  • Confirm the configuration by typing y

Step 3.2: Test the Connection

Verify everything is working:

rclone lsd gdrive:

This should list your Google Drive folders. If it works, you’re all set!

Step 4: Create Backup in Chunks

Navigate to the parent directory of your website:

cd /path/to/parent-of-website

Now create a compressed backup split into 500MB chunks:

tar -czf - website-folder-name | split -b 500M - website-backup-$(date +%Y%m%d).tar.gz.part

This command does three things:

  • tar -czf compresses your website folder
  • split -b 500M breaks it into 500MB chunks
  • $(date +%Y%m%d) adds today’s date to the filename

You’ll end up with files named like website-backup-20260129.tar.gz.partaa, website-backup-20260129.tar.gz.partab, and so on.

Step 5: Upload to Google Drive

First, create a dedicated folder in Google Drive (optional but recommended):

rclone mkdir gdrive:WebsiteBackups

Now upload all the chunks:

rclone copy website-backup-*.tar.gz.part* gdrive:WebsiteBackups/ --progress

The — progress flag shows you real-time upload progress. Sit back and let your server’s fast connection do the work!

Step 6: Verify Upload

Check that all files uploaded successfully:

rclone ls gdrive:WebsiteBackups/

Step 7: Clean Up (Optional)

Once you’ve verified the upload, you can delete the backup chunks from your server to save space:

rm website-backup-*.tar.gz.part*

How to Restore Your Backup

When you need to restore your website, here’s how to reassemble the chunks:

Download the chunks from Google Drive:

rclone copy gdrive:WebsiteBackups/ ./restore-folder/

Combine the chunks back into a single file:

cat website-backup-*.tar.gz.part* > website-backup.tar.gz

Extract the backup:

tar -xzf website-backup.tar.gz

Pro Tips

  • Adjust chunk size: Change 500M to any size that works for you (100M, 1G, etc.)
  • Include database backups: Don’t forget to backup your database separately using mysqldump or pg_dump
  • Keep multiple versions: Store at least 2–3 backup versions in Google Drive in case you need to roll back
  • Test restores: Always test the restore process before you actually need it
  • Monitor storage: Keep an eye on your Google Drive storage limits

Conclusion

This method has saved me countless hours of frustration, and I hope it does the same for you. The best part? Once you set up the automation, your backups happen automatically without any manual intervention.

Have questions or suggestions? Drop them in the comments below. Happy backing up!


메타데이터
post_id
eef3883cd5a6
slug
how-to-backup-your-website-to-google-drive-in-chunks-eef3883cd5a6
url
https://medium.com/@mursaleen5959/how-to-backup-your-website-to-google-drive-in-chunks-eef3883cd5a6
canonical_url
https://medium.com/@mursaleen5959/how-to-backup-your-website-to-google-drive-in-chunks-eef3883cd5a6
author_url
https://medium.com/@mursaleen5959
status
ok
fetched_at
2026-07-13 10:58:23