Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Keep Google Drive Files Offline with rclone

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide shows you how to use rclone, a command-line tool, to keep your Google Drive files available offline on your computer. You'll set up a local folder that syncs with your Drive, so you can access files without an internet connection. You'll need a Google account, a computer with rclone installed, and basic comfort with the command line.

What You'll Need

  • A Google account (the one with your Drive files)
  • rclone installed on your computer (download from rclone.org or use your package manager)
  • Command-line access (Terminal on macOS/Linux, Command Prompt or PowerShell on Windows)
  • Sufficient local disk space for the files you want offline

Step-by-Step

  1. Install rclone. Follow the instructions for your operating system from the official rclone website. On macOS, you can use brew install rclone; on Linux, use your package manager (e.g., sudo apt install rclone); on Windows, download the zip and extract it, then add the folder to your PATH.
  2. Configure rclone for Google Drive. Open your terminal and run rclone config. Type n for a new remote, give it a name (e.g., gdrive), and choose drive as the type. Follow the prompts. When asked for client_id and client_secret, leave them blank (rclone will use its own). For scope, choose drive (full access) or drive.readonly if you only need to read. For root_folder_id, leave blank. For service_account_file, leave blank. Then rclone will give you a link to authenticate in your browser. Copy the code, paste it back into the terminal, and confirm.
  3. Test the connection. Run rclone lsd gdrive: to list your folders. If you see your Drive contents, the setup is correct.
  4. Choose a local folder. Create a folder on your computer where you want the offline copies, e.g., ~/GoogleDriveOffline (or C:\GoogleDriveOffline on Windows).
  5. Run an initial sync. To copy all files from your Drive to this folder, use rclone sync gdrive: /path/to/local/folder. This will download everything. If you only want a specific subfolder, replace gdrive: with gdrive:MyFolder. The first sync may take a while depending on your data size.
  6. Keep it updated. Run the same sync command periodically to reflect changes (new files, edits, deletions) from Drive. For a one-way mirror (Drive to local), rclone sync is fine. If you want two-way, you'd need rclone bisync, but that's more complex and not recommended for beginners.
  7. Automate with a scheduler (optional). To keep it updated automatically, set up a cron job (macOS/Linux) or a scheduled task (Windows) to run the sync command at regular intervals. For example, on Linux, crontab -e and add a line like 0 */6 * * * rclone sync gdrive: /home/you/GoogleDriveOffline to sync every 6 hours.

Common Mistakes

  • Using rclone copy instead of rclone sync. copy only adds new files; it does not delete local files that were removed from Drive. sync makes the local folder an exact mirror (but be careful: it will also delete local files that aren't in Drive).
  • Forgetting to re-run the sync. The offline copy is only as current as your last sync. If you edit a file on Drive and don't sync, you'll see the old version offline.
  • Syncing the entire Drive when you only need a few folders. This wastes bandwidth and disk space. Sync only what you need.
  • Not checking the sync logs. rclone can fail silently if there are permission issues or network drops. Always review the output for errors.

Tips

  • Use --dry-run first. Run rclone sync gdrive: /local/folder --dry-run to see what would be copied, changed, or deleted without actually doing it. This is a safe way to preview.
  • Exclude large or unnecessary files. Use --exclude flags to skip certain file types or folders, e.g., --exclude "*.tmp" or --exclude "Archive/**".
  • Use --progress to see transfer status. Add --progress to see a live progress bar and speed.
  • Keep the local folder on an internal drive. If you use an external drive, it must be connected when syncing, or the sync will fail.
  • Consider using rclone mount for on-demand access. If you don't need full offline copies, rclone mount gdrive: /mnt/gdrive gives you a virtual drive that streams files on demand, but that requires an internet connection to open files.

Troubleshooting

  • Authentication errors. If rclone says "token expired" or "unauthorized", run rclone config reconnect gdrive: to re-authenticate.
  • Sync fails with "quota exceeded". Google Drive has a 750 GB daily upload limit and a 10 TB download limit for personal accounts. If you hit this, wait 24 hours or reduce the amount of data you're syncing.
  • Files are not downloading. Check the rclone output for errors. Common causes: file names with special characters, or files that are Google Docs/Sheets (these are not real files; you need to export them). To download Google Docs as Office files, use --drive-export-formats docx,xlsx,pptx.
  • Sync is very slow. This can be due to many small files. Use --transfers 4 (default) or increase to 8, but note that too many parallel transfers may cause rate limiting.
  • Local files are being deleted unexpectedly. If you run rclone sync and the local folder contains files that aren't in Drive, they will be deleted. To avoid this, use rclone copy instead, or ensure your local folder is exclusively for the sync.

Frequently Asked Questions

Can I edit files offline and have the changes sync back?

With rclone sync, changes you make locally will be overwritten by the Drive version on the next sync (because sync is one-way). To edit offline and push changes back, you need rclone bisync, which does two-way sync. However, bisync is more complex and can cause conflicts.

Does this work with Google Docs, Sheets, and Slides?

No, these are not regular files. They are stored in Google's proprietary format. To have them offline, you need to export them (e.g., as .docx). Use --drive-export-formats docx,xlsx,pptx to download them in Office formats.

How often should I run the sync?

It depends on how often you change files. For most users, daily or every few hours is enough. If you need real-time sync, consider using Google's official Drive for Desktop app, which offers on-demand files and offline access.

Will this use a lot of bandwidth?

Only on the first sync, which downloads everything. Subsequent syncs only transfer changed files (incremental). To reduce bandwidth, sync only specific folders.

Can I use this on a server without a GUI?

Yes, rclone is a command-line tool, so it works perfectly on headless servers. The only GUI part is the initial OAuth authentication, which you can do by copying a link to a browser on any machine.

Is it safe to stop the sync mid-way?

Yes, you can interrupt rclone with Ctrl+C. The next sync will resume from where it left off, but it may re-check some files. It's safe but may take a bit longer.