How To Back Up Google Drive to FreeNAS

Google Drive and G Suite are widely used tools for creating and sharing documents, spreadsheets, and presentations with team members. While cloud-based tools have inherent backups and replications included by the cloud provider, certain users may require additional backup or archive capabilities. For example, companies using G Suite for important work may be required to keep records for years, potentially beyond the scope of the G Suite subscription. FreeNAS and TrueNAS offer the ability to back up Google Drive easily, using the built-in cloud sync.

This blog will explain how to set up Google Drive sync with FreeNAS 11.3, as well as provide a few caveats and workarounds when backing up Google Docs and other Google created content.

Setting up Google Drive credentials

Set up the credentials under System Cloud Credentials.

Click LOGIN TO PROVIDER and login with the appropriate Google user account. Google will request to allow access to all the Google Drive files for the FreeNAS device.

Allow access and the appropriate access key will be inserted to the FreeNAS access token. Assign a Team ID if required, but it is not necessary in all cases. 

Click VERIFY CREDENTIAL. Once successful, click SAVE. The new cloud credentials will be visible in the web interface.

Set the cloud sync task

Go to Tasks Cloud Sync Tasks and set the backup time frame, frequency, and folders – both the cloud-based folder and FreeNAS dataset. Set whether the synchronization should sync all changes, just copy new files, or move files. Remove files from the cloud source or FreeNAS source depending on push or pull.

Add a description for the task and select the cloud credentials.

Choose the appropriate cloud folder target and FreeNAS storage location.

Select the file transfer mode: 

  • Sync: Keep files newly created or deleted the same.
  • Copy: Copy new files to the appropriate target (i.e., FreeNAS pulls files from Google Drive or pushes files to Google Drive).
  • Move: Copies files to the target and then delete files from the source. Using Move, users can set a folder in Google Drive for archival, and move older documents to that folder from their Drive account. Those files would then automatically get backed up to their FreeNAS storage.

Once created the Task will run during the designated period of time. Edits can be made by clicking the down arrow on the right-hand side.

Clicking RUN NOW will prompt the task to start immediately and the web interface will show the status as RUNNING and SUCCESS upon completion. Details can be accessed via the Task Manager icon in the upper right-hand corner.

To verify success, SSH to the FreeNAS or use the built-in Shell Terminal to verify that the files are visible. 

If file access to a client PC or other device is needed, create a share to the same dataset that was set to store the cloud sync. An SMB share is used as an example. 

Go to Sharing Windows Shares (SMB) and click ADD. Choose the appropriate dataset, permissions, and settings to create a new SMB share. 

Once mounted to the client, the files should all be visible. 

Working with Google created content

One caveat is that Google Docs and other files created with Google tools will have their own proprietary set of permissions and their read/write characteristics will be unknown to the system over a standard file share. Files are unreadable as a result.

To allow Google created files to become readable, allow link sharing to access the files before the backup. Doing so will ensure that other users will be able to open the files with read access, make changes, and then save as another file should further edits be needed. Note that this is only necessary if the file was created using Google Docs, Google Sheets, or Google Slides; other files should not require modification of their share settings.

TrueNAS and FreeNAS are perfect for storing content, including cloud-based content, for the long-term. Not only is it simple to sync and backup from the cloud, but users can rest assured that their data is safe, with unlimited snapshots, copy-on-write, and built-in replication functionality.

Please contact us at for more information on what iXsystems can do for your organization.


  1. Photo Joe

    Works like a charm in 11.3 RC2. Nice!

    • Joon Lee

      Thank you for your support!

  2. Stanley

    works great! thanks

    • Joon Lee

      Thanks for your support!

  3. James

    Nothing happens after the “login to provider” step. The access token doesn’t download. Any idea as to why that might be? 11.3 stable.

    • Joe D.

      Please help to confirm you are using a valid Gmail address with permissions open allowing for apps to be added to your account. On the browser side, also verifying it is an up-to-date (Chrome, Firefox) version and isn’t preventing pop-ups may also be necessary – the login will open in a pop-up window.

    • keith

      I had the same problem too. Just give the cloud credential a name and the “Verify Credential” button will light up allowing you to continue

  4. Mateusz

    Hi. Could you please show us how to create task with added filter for files older than n-days? Cloud sync task have only exlude option built-in.

    • Joon Lee

      That is not yet a supported feature but we suggest you request it via a support ticket. You could move the files based on age to an excluded folder to achieve the result you want.

      Submit Feature Request Here

  5. Maz


    I’ve set up Google Drive with Team Drive ID. It successfully verifies credentials, however, in the Tasks, it does not show the Team Drive and only the account’s own Google Drive folders. Can you help? I’ve been searching for a solution for days. Thank you.

    • Joon Lee

      First, I’d make sure you’re on 11.3-U4.1. There were two fixes regarding Google Drive and Team Drive ID’s specifically. If it’s still not showing up in the UI, try specifying the folder path manually instead of using the dropdown.

  6. Aaron

    Verify credential after Google login showing error.

    Error: 2021/02/03 22:00:00 ERROR : : error listing: couldn’t list directory: Get “”: dial tcp: lookup on dial udp connect: network is unreachable
    2021/02/03 22:00:00 Failed to lsjson with 2 errors: last error was: error in ListJSON: couldn’t list directory: Get “”: dial tcp: lookup on dial udp connect: network is unreachable

    • Joon Lee

      Hi Aaron,

      It is difficult to help with this on here. Can you create a forum post? You can create it here:

      Please include some more details and some screenshots.


Submit a Comment

Your email address will not be published. Required fields are marked *

ESG Labs: TrueNAS Technical Report
Download Enterprise Storage Guide Button
iXsystems values privacy for all visitors. Learn more about how we use cookies and how you can control them by reading our Privacy Policy.