Keep Google Drive Files Offline with rclone
In this article
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
- 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. - Configure rclone for Google Drive. Open your terminal and run
rclone config. Typenfor a new remote, give it a name (e.g.,gdrive), and choosedriveas the type. Follow the prompts. When asked for client_id and client_secret, leave them blank (rclone will use its own). For scope, choosedrive(full access) ordrive.readonlyif 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. - Test the connection. Run
rclone lsd gdrive:to list your folders. If you see your Drive contents, the setup is correct. - Choose a local folder. Create a folder on your computer where you want the offline copies, e.g.,
~/GoogleDriveOffline(orC:\GoogleDriveOfflineon Windows). - 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, replacegdrive:withgdrive:MyFolder. The first sync may take a while depending on your data size. - 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 syncis fine. If you want two-way, you'd needrclone bisync, but that's more complex and not recommended for beginners. - 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 -eand add a line like0 */6 * * * rclone sync gdrive: /home/you/GoogleDriveOfflineto sync every 6 hours.
Common Mistakes
- Using
rclone copyinstead ofrclone sync.copyonly adds new files; it does not delete local files that were removed from Drive.syncmakes 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-runfirst. Runrclone sync gdrive: /local/folder --dry-runto 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
--excludeflags to skip certain file types or folders, e.g.,--exclude "*.tmp"or--exclude "Archive/**". - Use
--progressto see transfer status. Add--progressto 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 mountfor on-demand access. If you don't need full offline copies,rclone mount gdrive: /mnt/gdrivegives 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 syncand the local folder contains files that aren't in Drive, they will be deleted. To avoid this, userclone copyinstead, 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.