How to Archive WordPress and Server Data on Google Drive using Rclone

How to Archive WordPress and Server Data on Google Drive using Rclone

This page has had its content updated on December 9, 2025 EST by Jordan

Content Error or Suggest an Edit

Notice a grammatical error or technical inaccuracy? Let us know; we will give you credit!

Rclone is a command-line utility designed for managing files on various cloud storage platforms. Functioning similarly to “rsync for cloud storage,” it handles file copying, synchronization, moving, and mounting to and from services like Google Drive.

This guide provides technical steps for installing rclone, configuring a Google Drive remote, addressing remote server authentication requirements, and detailing the manual installation process for older Linux distributions like RHEL 7.

Section 1: Rclone Installation

There are multiple methods to install Rclone

1.1 Ubuntu/Debian

You can install Rclone on Ubuntu and Debian using apt-get

apt-get install rclone

1.2 Windows Installation (Winget / Pre-compiled Binary)

Windows users can utilize the Windows Package Manager (winget) or opt for a manual binary installation. If Winget is installed on your system, you can use the command below.

Attention

I’ve provided the Windows installation option only as a means to authenticate Rclone to Google Drive or another platform. This guide doesn’t specifically talk about backing up data in a Windows environment

winget install Rclone.Rclone

You can also visit the Rclone website downloads section and download the Windows binary.

rclone
Rclone downloads
Download rclone binaries for your OS.
rclonerclone.org

1.3 Manual Install

You can always do a manual install by running the install bash script from the rclone.org website.

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

1.4 RHEL 7 

You might find yourself installing rclone and then running into the following error.

2025/12/09 16:41:47 CRITICAL: Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount3": executable file not found in $PATH

This error occurs when the FUSE library required for mounting is missing or incorrectly configured. RHEL 7 requires FUSE 3 (which uses fusermount3).

1. Enable EPEL

    sudo yum install epel-release -y

    2. Install fuse3 & fuse3-devel

      sudo yum install fuse3 fuse3-devel -y

      3. Verify that fusermount3 now exists

        which fusermount3 ls -l /bin/fusermount3

        You should then be able to run rclone mount properly.

        Section 2: Google Drive Configuration

        The rclone config utility manages the creation of “remotes,” which are connection profiles for cloud storage services.

        1. Start the Configuration

        rclone config

        2. Create a New Remote

        n) New remote s) Set configuration password q) Quit config n/s/q> n

        3. Name the Remote

        Assign a profile name (e.g., gdrive_archive).name> gdrive_archive

        4. Select Storage Type

          Select drive (usually option 20 or similar for Google Drive).Storage> drive

          5. Client ID/Secret:

          Leave client_id and client_secret blank. Press Enter for both.

          6. Scope

          Select 1 for full read and write access.scope> 1

          7. Service Account

          Leave service_account_file blank. Press Enter.

          8. Advanced Config

          Enter n for “Edit advanced config.”

          9. Auto Config (Authentication Method):

          • Local Machine: If running rclone on a local PC or a desktop machine with a browser, enter y (Yes). A browser window will open automatically to complete the OAuth flow.
          • Remote/Headless Server: If running rclone on a remote, headless server, enter n (No). Continue to Section 3 for remote authentication steps.

            2.1 Setting Up Shared Drives (Team Drives)

            After the primary Google authentication is successful, rclone prompts for Shared Drive configuration:

            1. Configure this as a Shared Drive (Team Drive)?
              • Enter n for individual Google Drive storage.
              • Enter y to access a Shared Drive (Google Workspace/G Suite).
            2. Select Shared Drive: If you enter y, rclone will list the available Shared Drives. Enter the corresponding number to set that drive as the remote’s root.
            3. Final Confirmation: Confirm the configuration details with y.

            Section 3: Remote/Headless Server Authentication

            When configuring rclone on a server that lacks a web browser (headless), standard OAuth authentication fails. The recommended process uses the rclone authorize command on a local machine to obtain the necessary token for the remote server.

            1. On the Remote Server: Run rclone config and complete steps 1–8 of the Google Drive setup (Section 2).
            2. When prompted for Auto Config, enter n (No).
            3. The remote terminal will provide a command to be executed on a separate local machine with a browser:Execute the following on the machine with the web browser (same rclone version recommended): rclone authorize "drive"
            4. On Your Local PC (with a browser): Run the displayed command:rclone authorize "drive"
            5. Local Browser Action: A browser window will open for Google authentication. Complete the login and permission grant.
            6. Token Generation: Your local terminal will display a configuration block containing the required token (starting with SECRET_TOKEN).
            7. Back on the Remote Server: Copy this entire configuration block and paste it into the remote server’s terminal at the config_token> prompt.
            8. Complete the remaining configuration steps (Shared Drive, final confirmation).

            Section 5: Mounting Google Drive with Rclone

            Mounting allows the Google Drive remote to be accessed as a local directory on your file system. This functionality requires an installed file system layer: FUSE on Linux/macOS or WinFsp on Windows.

            5.1 Prerequisites for Mounting

            • Linux/macOS: You must have FUSE (Filesystem in Userspace) installed. On Linux, this may require installing the fuse or fuse3 packages (refer to Section 1.4 for RHEL 7 specific steps).

            5.2 Basic Mount Command

            The rclone mount command requires two arguments: the remote name followed by the local mount point directory.

            rclone mount <remote_name>: <local_mount_directory> [flags]
            

            Example (Linux/macOS):

            To mount your configured remote gdrive_archive: to a local directory /mnt/gdrive/:

            # Create the local directory first (if it doesn't exist)
            mkdir -p /mnt/gdrive/
            
            # Run the mount command
            rclone mount gdrive_archive: /mnt/gdrive/ --daemon --allow-other
            
            • --daemon: Runs rclone in the background.
            • --allow-other: Allows non-root users to access the mount point.

            5.3 Performance and Caching

            For robust read/write performance, especially with large files or frequent access, it is recommended to enable the VFS cache mode. The full mode is often used for mounted archives that may be edited or modified.

            rclone mount gdrive_archive: /mnt/gdrive/ --allow-other --vfs-cache-mode full
            

            5.4 Unmounting the Drive

            To safely disconnect the remote, use the appropriate unmount command for your operating system:

            • fusermount -u /mnt/gdrive/

            Section 6: Common Archiving Commands

            Once your gdrive_archive: remote is configured, you can begin data transfers.

            CommandActionDescription
            rclone copyCopyTransfers files from source to destination, skipping files that already exist. This command is non-destructive.
            rclone syncSynchronizeMakes the destination directory content match the source content exactly. This process deletes files from the destination if they are absent from the source.
            rclone moveMoveTransfers files from source to destination, deleting them from the source only after a successful transfer.
            rclone lsdList DirectoriesLists directories contained within the specified remote path.
            rclone sizeCheck SizeDisplays the total storage size of the specified remote path.

            Example Usage:

            To copy a local directory to your Google Drive remote, displaying transfer progress:

            rclone copy /path/to/local/archive gdrive_archive:MyArchiveFolder -P
            

            (The -P flag is recommended for monitoring progress on large data transfers.)

            0 Shares:

            You May Also Like