Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / Backup/Sync to Cloud Storage with Rclone on Windows

October 9, 2026

Backup/Sync to Cloud Storage with Rclone on Windows

Rclone is an open-source, Go-based command-line tool that can be used to copy, backup, and sync files stored on a local computer with various cloud storage services, including Google Drive, OneDrive, Dropbox, any S3-compatible object storage, and many other cloud storage providers. Rclone is often described as rsync for cloud storage. In this article, we will look at how to use rsync on a Windows machine to automate backup transfers and synchronize files and folders between your computer and Google Drive. Similarly, you can use any other cloud provider as the underlying cloud storage.

Contents:
  • Install Rclone on Windows and Connect Google Drive
  • Basic Rclone Commands: A Beginner’s Guide
  • How to Mount Google Drive in Windows Using Rclone
  • Backup and Sync Local Files to Google Drive Using PowerShell and Rclone
  • Configure Cloud Backup Data Encryption with Rclone
  • Creating Client ID and Client Secret to Access Google Drive from Rclone

Install Rclone on Windows and Connect Google Drive

You can install the rclone tool on Windows using the built-in WinGet package manager, or download the installer from the official Rclone website or the Rclone GitHub repository.

winget install Rclone.Rclone

winget install Rclone

Rclone is a command-line tool, which means that it is configured and operated via a command-line interface. To start the interactive Rclone configuration wizard, run:

rclone config

The tool should display a list of the configured storages. Currently, this list is empty.

  1. Enter n (New remote) to create a new connection. This will launch an interactive wizard to help you create and configure remote storage. We will connect Google Drive as remote cloud storage and perform OAuth authentication via the browser.
  2. Set a name for the connection, for example: gdrive
  3. A list of all the cloud storage providers supported by rclone will appear. Find Google Drive (drive) in the list and enter its number. In my version of Rclone, it is available as option 24 . Configure Google Drive connection on Windows using Rclone
  4. At the next step, you need to specify the client_id and client_secret. You can leave these fields empty. In this case, Rclone will use its shared OAuth client ID.
    Google plans to retire Rclone’s built-in shared client ID entirely later in 2026. Therefore, we strongly recommend creating your own application in your Google account and generating your own client_id and client_secret. We describe how to do this in detail at the end of this article.
  5. The next step is to configure access level permissions for the Rclone client to your Google Drive files. If you select 1: Full access (drive), Rclone will have access to all files on your Google Drive. If you only want to back up files from your local computer to cloud storage, we recommend choosing the more secure option 3: Access to files created by rclone only (drive.file). In this mode, Rclone only has access to the files and folders that it has created itself.
    Set access permissions to Google Drive files for Rclone
  6. Leave the service_account_file blank and press Enter.
  7. In the Edit advanced config step, select n
  8. The next step is: Use web browser to automatically authenticate rclone with remote? Type y if the machine running rclone has a web browser that can be used for authentication.
  9. This will open a browser in which you will need to perform OAuth authentication using your Google account.
  10. Grant rclone access to Google Drive files. Approve Rclone access to Google Drive files
  11. You should receive a message indicating that the access token has been successfully received. oauth access token google drive obtained
  12. When prompted to configure this connection as a Shared Drive (Team Drive), select No (default). Shared Drive (Team Drive) mode
  13. Press y to confirm saving the configuration, and then press q to exit rclone interactive mode. View Google Drive remote settings in rclone

Rclone stores the cloud connection configurations in the rclone.conf file, which is located under the current user’s profile. This file contains the access_token that was obtained to access your Google Drive storage. You can get the path to the current rclone configuration file using the command:

rclone config file

C:\Users\username\AppData\Roaming\rclone\rclone.conf

rclone config file

Basic Rclone Commands: A Beginner’s Guide

Now, let’s take a look at some of the basic Rclone commands.

List the root directories in the cloud storage:

rclone lsd gdrive:

As we have only granted access to Google Drive files created using rclone, this list will be empty initially.

Rclone supports several cloud synchronization modes, ranging from simply copying individual files and directories to synchronizing directory contents, including bidirectional synchronization.

To copy a specified local folder to the cloud:

rclone copy "C:\Backup" gdrive:HomePCBackup --progress

This command copies new and modified files from the source directory to the HomePCBackup directory in the remote cloud storage. If the destination directory does not exist, Rclone will create it automatically.

The --progress option has been added to display the current transfer speed and the estimated remaining time. If you want Rclone to display information about every processed file, add the -v (--verbose) option.

rclone copy directory from Windows to Google Drive

Open Google Drive in your browser to check that a new folder has been created and that the files have been copied from your computer.

A new folder appeared in Google Drive.

To list the files in a cloud directory:

rclone lsf gdrive:HomePCBackup

Delete a specific file from the remote cloud storage:

rclone delete gdrive:HomePCBackup /whitelist.yaml --verbose --progress

To empty the Google Drive trash folder:

rclone cleanup gdrive:

This command can only be used if selected access mode 1: Full access all files, excluding application data.

As mentioned above, rclone copy command copies and replaces only new and modified files. If a file is deleted from the local source directory, it will not be deleted from the cloud copy.

If you need to configure full directory synchronization between a local folder and a cloud directory, use the sync command. When this mode is used, any file deleted from the local computer will also be deleted from the cloud after sync.

rclone sync "C:\Backup" gdrive:HomePCBackup --progress

The rclone sync command is not ideal for data backups because it is primarily designed for synchronizing data. If a file is deleted or becomes corrupted in the source directory, the copy in the cloud will be affected too.

To use rclone sync for backup purposes, it is advisable to add the --backup-dir option. In this case, rather than deleting files from the cloud, Rclone simply moves them to the specified backup directory during sync:

rclone sync "C:\Backup" gdrive:HomePCBackup --backup-dir gdrive:HomePCBackupTrash --progress

Use Rclone to verify the integrity of your cloud-stored files. To protect against storage-related errors on the cloud provider’s side, which are rare but worth accounting for, you can periodically verify file sizes and cryptographic hashes in the cloud storage.

rclone check "C:\Backup" gdrive:HomePCBackup --one-way

rclone check: compares files in a source and destination to verify if they match by size and cryptographic hashes

Rclone also supports bidirectional file synchronization (bisync). In this mode, the tool monitors changes in both the local directory and the cloud, propagating changes in either direction when the two copies differ.

To enable bidirectional synchronization, you need to use the --resync option during the initial run:

rclone bisync "C:\Backup" gdrive:BackupFolder --resync

Rclone creates a local database that contains information about the structure and state of the synchronized files. Once initial synchronization has been completed, you can run the regular synchronization task without the --resync flag. These tasks can be scheduled using Windows Task Scheduler:

rclone bisync "C:\Backup" gdrive:BackupFolder --resilient --conflict-resolve newer

The last two options control conflict resolution and error handling:

  • --conflict-resolve newer – determines how conflicts are resolved when the same file has been modified on both sides. In this case, the version of the file modified most recently will be considered the current.
  • --resilient – allows the synchronization process to continue if the existing synchronization database becomes corrupted or unavailable.

Rclone also includes a built-in Rclone Backend web interface that can be accessed from a browser. To start the web interface, run:

rclone rcd --rc-web-gui

This will start a lightweight web server that provides access to Rclone through a web-based GUI. From there, you can configure storage connections, browse the contents of cloud storage, and monitor running Rclone tasks in real time.

Rclone Official Built-in Web GUI

By default, Google Drive offers 15 GB of free storage (shared with Gmail and Google Photos) for all users. You can use rclone to view the total quota limit, the current used and free space in Drive, the size of all files in the Trash, and the space used by other Google services. Run this command to display current Google Drive stats:

rclone about gdrive:

rclone about gdrive - check your Google Drive storage quota and usage

Additional Useful Options:

  • If you are copying a large number of small files, you can increase the number of simultaneous file transfers from the default value of 4: --transfers 8
  • When synchronizing large files, it can be useful to increase the buffer size allocated to each transfer from the default 16 MB: --buffer-size 64

It is possible to exclude specific file types or directories from an Rclone synchronization. You can specify the list of exclusion files and folders directly in the command line:

--exclude "/TEMP/" --exclude "*.{log,tmp,temp,lock,bak}" --exclude "pagefile.sys,thumbcache_*.db"

Or, you can specify a path to a text file containing the list of exclusions:

--filters-file "C:\rclone\filters.txt"

How to Mount Google Drive in Windows Using Rclone

If you don’t use Rclone exclusively for automated backups and file storage, it can be inconvenient to run Rclone commands from the command line each time you need to work with your files. It will be much more convenient to mount Google Drive as a usual network drive and assign it a drive letter in Windows.

First, install the WinFSP (Windows File System Proxy) tool (which is similar to FUSE on Linux):

winget install WinFsp.WinFsp

winget install WinFsp

Then you can mount your Google Drive to a specific drive letter using a command:

rclone mount gdrive: G:

rclone mount google drive locally with drive letter assigned

To make the drive letter available in File Explorer, run this command from a non-elevated command prompt session. This is related to how Windows handles access to mapped network drives from elevated and non-elevated apps.

Make sure that the contents of your Google Drive are now displayed as a separate network drive in File Explorer.

Google Drive mapped folder in File Explorer in Windows 11

Backup and Sync Local Files to Google Drive Using PowerShell and Rclone

Let’s look at an example of how to automate the synchronization of local folders with Google Drive cloud storage. We created a small PowerShell script that uses Rclone to synchronize several local folders with Google Drive.

Here’s the basic logic of the backup script:

  1. Two directories are created in the cloud: current (which is a current mirror of your local files) and archive (where previous versions and deleted files are stored).
  2. Each time rclone sync runs, it updates the current directory. If a file on the local computer has been modified or deleted, its previous version is moved to the archive/YYYY-MM-DD folder.
  3. Then the script removes files from the archive directory that are older than 60 days. This will free up space on Google Drive by deleting old changed file versions.

$Remote = "gdrive:"
$Folders = @("C:\Backup\","C:\Users\woshub\Documents\","F:\Projects\")
$Dest = "BackupRclone/DesktopHome/current"
$Archive = "BackupRclone/DesktopHome/archive"
$Timestamp = Get-Date -Format "yyyy-MM-dd"
$ExcludeFile = "$PSScriptRoot\exclude.txt"
$HasErrors = $false
foreach ($F in $Folders) {
if (Test-Path $F) {
$FolderName = Split-Path $F -Leaf
rclone sync $F "$Remote$Dest/$FolderName" --backup-dir "$Remote$Archive/$FolderName/$Timestamp" --exclude-from $ExcludeFile --progress --verbose
if ($LastExitCode -ne 0) { $HasErrors = $true }
}
}
# Delete file versions from the Trash that are older than 60 days ( if there are no errors in the previous sync)
if (-not $HasErrors) {
# 1. Delete files older than 60 days.
rclone delete "$Remote$Archive" --min-age 60d --ignore-errors --progress --verbose
# 2. Clean up empty folders
rclone rmdirs "$Remote$Archive" --leave-root --progress --verbose
} else {
Write-Error "Error! Cannot cleanup files"
}

Then create a task in Task Scheduler that runs this PowerShell script automatically. For example, you could set it to run once a day at a specified time. You can create the task through the taskschd.msc graphical interface or by using the following commands:

$TaskName="Rclone_Backup_to_GoogleDrive"
$Trigger = New-ScheduledTaskTrigger -Daily -At 6:00PM
$Action= New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -NonInteractive -WindowStyle Hidden -File C:\Scripts\Rclone_Backup_to_GoogleDrive.ps1"
Register-ScheduledTask -TaskName $TaskName -Trigger $Trigger -Action $Action

PowerShell script in Task Scheduler to automatically sync a local folder with Google Drive

Configure Cloud Backup Data Encryption with Rclone

Rclone can encrypt files before uploading them to cloud storage. To enable data encryption, run rclone config and create a new remote storage with the crypt type (option 16 in my example). Name it crypt_gdrive .

auto encrypt google drive files with rclone

The new encrypted storage is created on top of the previously configured Google Drive connection. Specify the previously created drive name (gdrive:) or a specific folder on a Google Drive where you want to store encrypted backups (gdrive:BackupCrypt)

Select the file name encryption mode. For example, select ‘1 – Standard‘, which encrypts file names. Then enable directory name encryption (Encrypt directory names = True) and specify your own encryption password or generate it automatically.

rclone enable filename encryption

Next, generate a password for the salt. Make sure to remember both passwords and store them in a secure location.

rclone set encryption key with the password and salt

Now, when you want to upload files in encrypted form, simply copy or sync them to the crypt_gdrive remote.

crypt_gdrive remotein rclone

For example:

rclone copy "C:\Docs\" crypt_gdrive:HomePCBackup --progress

Rclone automatically encrypts the files as they are uploaded to the cloud and decrypts them when they are downloaded back to your computer.

In the cloud storage, instead of readable file and folder names and their contents, an attacker or even the cloud provider’s employees will see only an unreadable set of files.

Rclone copies encrypted files to Google Drive

If you list encrypted files in the remote crypt storage via Rclone, their names are displayed unencrypted:

rclone lsf crypt_gdrive:HomePCBackup

rclone lsf crypt - view unencrypted file in google drive

Creating Client ID and Client Secret to Access Google Drive from Rclone

When you use rclone with Google Drive in its default configuration, rclone’s default client ID is used. It is shared between all the rclone users. This shared client ID is being retired and will stop working in 2026.

Leave blank to use rclone's shared client_id, or if you are using a service account.
The shared client_id is being retired and will stop working during 2026, so creating your own is now strongly recommended.
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.

Leave blank to use rclone's shared client_id, or if you are using a service account. The shared client_id is being retired and will stop working during 2026, so creating your own is now strongly recommended.

Here is how to generate your own Google Drive client_id and client_secret for rclone in the Google Cloud Console:

Step 1: Create a Google Cloud Project

  1. Go to the Google Cloud Console.
  2. Log in with your personal Google account.
  3. Click the project dropdown in the top-left corner and click New Project.
  4. Name it something like RcloneHomeBackup and click Create.

Create a Google Cloud Project

Step 2: Enable the Google Drive API

  1. Select your new project in the top-left dropdown.
  2. Under Getting started, click Explore and enable APIs Explore and enable APIs in Google Cloud
  3. In the search bar, type Google Drive API and click on it.
  4. Click the blue Enable button. Enable the Google Drive API

Step 3: Configure the OAuth Consent Screen

  1. In the Navigation Menu, select OAuth consent screen.OAuth Consent Screen
  2. Set the App name (Rclone Backup) and select your email.
  3. Select External (this is normal for personal accounts) and click Create.
  4. Fill in the contact information fields:
  5. Click Create. Create an app in Google ccoubt

Step 4: Configure Google Drive Data Access

  1. Go to the Data Access section and add a new scope.Google Drive Data Access
  2. In the search bar, type drive.file. Check the box for .../auth/drive.file (View and manage Google Drive files and folders that you have opened or created with this app). Click Save. Grant access to drive.file

Step 5: Create a Custom Google App

  1. Go to the Branding section and fill in basic information about your app.
  2. Enter your app name and user support email
  3. Then scroll down and fill in the URLs. Since you’re creating an app only for yourself, Google doesn’t check their content. Paste any working URLs there, for example: https://google.com
  4. In the Authorized domains field, enter the domain of these links: google.com
  5. Save the changes Configure Google app branding info

Step 5: Publish a Custom Google App

  1. Go to the Audience tab and click Publish app.
  2. Add your Google account email under Test users. Publish a custom Google app and grant user permissions
  3. In the left sidebar, click Clients.
  4. Click + Create client to create a new OAuth client ID.
  5. In the Application type dropdown, select Desktop app.
  6. Name it Windows PC Backup and click Create. create OAuth client ID
  7. A pop-up will appear displaying your Client ID and Client Secret. Copy these down safely! Copy Client ID and Client Secret for your app

Use these secrets when creating a remote connection to Google Drive in rclone.

0 comment
0
Facebook Twitter Google + Pinterest
PowerShellWindows 11Windows Server 2025
previous post
Fix Missing “Yes” Button in User Account Control Prompt on Windows

Related Reading

How to Move (Migrate) Windows Shares to a...

February 26, 2026

SMB over QUIC: Mount File Share over Internet...

December 24, 2025

Monitor Windows Log Files in Real Time with...

March 26, 2026

Security Warnings When Opening RDP Files in Windows...

April 20, 2026

Stop Windows Server from Auto-Shutdown Every Hour

February 11, 2026

Automate Software and Settings Deployment with WinGet Configure...

August 24, 2026

CrowdSec on Windows: From Installation to Threat Blocking

July 6, 2026

Remove the Max Path Length Limit (260-Characters) on...

November 19, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Backup/Sync to Cloud Storage with Rclone on Windows

    October 9, 2026
  • Fix Missing “Yes” Button in User Account Control Prompt on Windows

    October 7, 2026
  • Block Specific Keyboard Shortcuts with Keyboard Filter on Windows

    October 3, 2026
  • How to Set Task Priority in Windows Task Scheduler

    September 22, 2026
  • AutoStart Program at RDP Logon in Windows RDS

    September 8, 2026
  • How to Convert Windows Machine into a Proxmox VM

    August 30, 2026
  • Enable or Disable Fast User Switching in Windows 11

    August 18, 2026
  • How to Hide Wi-Fi Network in Windows with WLAN Filters (Blacklist and Whitelist)

    August 14, 2026
  • Invalid Signature Detected: Check Secure Boot Policy [Fix]

    August 5, 2026
  • Windows Installer Service Could Not Be Accessed? How to Fix It

    July 28, 2026

Follow us

  • Facebook
  • Twitter
  • Youtube
  • Telegram
Popular Posts
  • Run Elevated Commands with Sudo on Windows 11
  • Fix: Slow Startup of PowerShell Console and Scripts
  • Automate Software and Settings Deployment with WinGet Configure (DSC)
  • How to Hide (Block) a Specific Windows Update
  • Pin and Unpin Apps to Taskbar in Windows 11 via PowerShell
  • Enable/Disable Random Hardware (MAC) Address for Wi-Fi on Windows
  • How to Pause (Delay) Update Installation on Windows 11 and 10
Footer Logo

@2014 - 2026 - Windows OS Hub. All about operating systems for sysadmins


Back To Top