(408) 943-4100               V   Commercial Support Toggle between Light and Dark mode
Edit this page

How To Back Up Google Drive to TrueNAS SCALE

  4 minute read.

Last Modified 2021-09-23 13:58 EDT

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. TrueNAS offers the ability to easily back up Google Drive by using the built-in cloud sync.

Setting up Google Drive credentials

Set up the credentials under Credentials > Backup Credentials.

CredentialsBackupCredentials

Next click ADD for Cloud Credentials.

Name the Credential and select Google Drive for the Provider. Click LOGIN TO PROVIDER and login with the appropriate Google user account.

CredentialsAddCredentials

Google will request to allow access to all the Google Drive files for the FreeNAS device.

GoogleOAuthProceed

GoogleOAuthAccount

GoogleOAuthPermissions

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 and wait for the credential to verify.

CredentialsVerify

Once successful, click SUBMIT. The new cloud credentials will be visible in the web interface.

CredentialsBackupCredentialsNew

Set the cloud sync task

Click on Data Protection to open the Tasks page. Click on + icon for Cloud Sync Tasks to create a new Cloud Sync Task.

Set the backup time frame, frequency, and folders – both the cloud-based folder and TrueNAS dataset. Set whether the synchronization should sync all changes, just copy new files, or move files. Files are removed from the cloud source or TrueNAS source depending on push or pull. Add a description for the task and select the cloud credentials. Choose the appropriate cloud folder target and TrueNAS 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., TrueNAS pulls files from Google Drive or pushes files to Google Drive).
  • Move: Copy 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 TrueNAS storage.

TasksCloudSyncTask

Once created, attempt a Dry Run of the task.

CloudSyncDryRun

CloudSyncDryRunLog

If the Dry Run succeeds, click SUBMIT to save the task.

CloudSyncTaskNew

Expand the section down to see the options for the task.

CloudSyncTaskNewExpanded

Clicking RUN NOW will prompt the task to start immediately.

CloudSyncRunNow

CloudSyncTaskStarted

CloudSyncTaskRunning

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.

Once the sync reports a status of SUCCESS you can verify this by opening the folder on another computer if it is a share, through SSH access, or by checking the destination directory through the TrueNAS CLI.

CloudSyncTaskSuccess

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.

GoogleDriveBadPermissions

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.

GoogleDriveShareLink

TrueNAS is 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.