Rsync Google Drive Setup and Cloud Syncing Tutorial

Author

Reads 710

Detailed view of internal hard drive platters and read/write heads for data storage technology.
Credit: pexels.com, Detailed view of internal hard drive platters and read/write heads for data storage technology.

Setting up rsync with Google Drive involves creating a Google Cloud Storage bucket and enabling the Google Drive API. This allows you to sync your files with Google Drive.

Rsync is a powerful tool for syncing files, and Google Drive offers a convenient way to store and access your files from anywhere. To get started, you'll need to install the Google Cloud SDK and set up a project in the Google Cloud Console.

You'll also need to enable the Google Drive API and create credentials for your project, which will be used to authenticate your rsync connections. This will give you a client ID and client secret, which you'll need to store securely.

The rsync command will use these credentials to connect to your Google Drive account and sync your files.

Google Drive Setup

To set up Google Drive with rsync, you'll need to create a credential in your FreeNAS device. Go to System > Cloud Credentials and click ADD to start the process.

Credit: youtube.com, How to use Google Drive - Tutorial for Beginners

Name the credential and select Google Drive as the provider. You'll then need to log in with the appropriate Google user account.

Google will request permission to access all your Google Drive files for the FreeNAS device. Allow access to complete the setup.

Once you've set up the credential, you can authenticate with Google Drive using the --authenticate option. This will provide a URL where you can obtain a GUID from Google.

After authenticating, the GUID will be cached in your ~/.gsync directory. To force authentication again, simply remove this directory.

Cloud Sync Task

To set up a Cloud Sync Task in TrueNAS, go to Tasks > Cloud Sync Tasks and configure the backup time frame, frequency, and folders. You'll need to specify the cloud-based folder and TrueNAS dataset.

The synchronization options are crucial: Sync keeps files newly created or deleted the same, Copy copies new files to the target, and Move copies files to the target and deletes them from the source. You can use Move to set a folder in Google Drive for archival and move older documents to that folder from your Drive account.

Credit: youtube.com, How to Properly Use Cloud Storage | Rsync Encrypt Tutorial

The task options are as follows:

  • Sync: Keep files newly created or deleted the same.
  • Copy: Copy new files to the appropriate target.
  • Move: Copy files to the target and delete them from the source.

Once you create the task, attempt a Dry Run to test its feasibility. If the Dry Run succeeds, click SAVE to proceed.

Folders and Files

The folders and files in the rsync Google Drive implementation are listed below, but it's worth noting that the last commit message and date are blank.

The folders and files include 224 Commits, bin, docs/images, libgsync, regression, tests, .gitignore, .pylintrc, CHANGELIST.rst, LICENSE, MANIFEST.in, Makefile, README.rst, and setup.py.

Here's a breakdown of the folders and files:

Margarita Champlin

Writer

Margarita Champlin is a seasoned writer with a passion for crafting informative and engaging content. With a keen eye for detail and a knack for simplifying complex topics, she has established herself as a go-to expert in the field of technology. Her writing has been featured in various publications, covering a range of topics, including Azure Monitoring.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.