deja dup backup logoThe Deja Dup backup tool is preinstalled on the Ubuntu desktop by default — but like many, I don’t use it.

Or rather I didn’t, not until this week when I learned that Deja Dup can backup files to Google Drive automatically.

Simple, zero-fuss backups, at that.

Thanks to some spiffy GNOME Online Accounts integration Deja Dup is able to schedule file, folder and even entire system backups directly to Google Drive.

These file backups can happen as often/when I like, as well as run automatically in the background. I can also restore file backups from Google Drive to my local system.

If this handy backup feature sounds like something you want to use, read on to learn to how.

Using Google Drive on Linux

What is Google Drive?

Google Drive is a free cloud storage service from Google that allows you to store and share files in the cloud for free.

Google gives each Google Drive user 15GB of free cloud storage as standard. This offers plenty of room for photos, files and music backups, but it’s not enough room for an entire PC backup.

Additional space can be purchased from Google for a relatively small fee.

Backup Options

There is no official Google Drive client for Linux, but there is an official API

The official Google Drive app for Windows and macOS offers built-in backup & sync option. This lets users on those platforms effortlessly store important photos, videos and documents in the cloud, safe from crashes, accidental edits, and unintended deletions.

Sadly, no official Google Drive client for Linux exists.

Thankfully, there is an official Google Drive API though. This API allows third-party apps like Deja Dup integrate with and make use of Google Drive on the Linux desktop.

Using Google Drive on Linux

Store important files in the cloud, safe from system crashes and accidental  deletions

We’ve shown you how to access Google Drive on Ubuntu through Nautilus before, a process which mounts your Google Drive as a remote file system in the file manager.

This is a great solution for browsing and opening files you have already backed up, but it’s not so great for backing up files you haven’t (you have to manually copy each file and folder over by hand, connection is sometimes slow for larger files, etc).

So you may want to schedule backups to Google Drive using Deja Dup instead.

Schedule Backups to Google Drive using Deja Dup

Google Drive Backups on Ubuntu

It is very simple to set up Google Drive backup on Ubuntu (and other Linux distros) using Deja Dup.

It is very simple to set up Google Drive backups on Ubuntu using Deja Dup

There’s no complicated command line set-up, and no third-party file sync service to download, install or purchase.

In fact, you can get reliable file backup to Google Drive of your most important files using apps you (should) already have installed:

  • GNOME Online Accounts
  • Deja Dup backup utility
  • Google account

The first time is installed out-of-the-box on Ubuntu 18.04 LTS or later, as is the second. You can install Deja Dup from the Ubuntu Software app or by running:

sudo apt install deja-dup

The final point is a hard requirement: you must have a Google account (with free space available) to get things running.


When you’re ready:

  1. Open Settings > Online Accounts > Google
  2. Sign in with your Google account and grant GNOME access to it
  3. Open ‘Deja Dup‘ (hit Super, type ‘backup’, and click the icon that appears)
  4. Select your Google Drive account in ‘Storage Location’

You can set a custom name for your backup folder (e.g., “Ubuntu backups”). This folder is stored in the top level of your Drive.

Deja Dup lets you choose which folders to backup and which to ignore

Configure Deja Dup before backing up

Without no further configuration Deja Dup will backup your entire home folder to the cloud the moment you hit the “backup” button.

Because I don’t have oodles of Google Drive space (just the 15GB free), versioned copies of my home folder’s dot files, browser cache, local GTK themes, etc is, for my needs at least, over the top!

As Deja Dup lets you choose which folders to backup and which to ignore you will want to set things up to suit your needs.

You don’t need to manually type path names to directories just: click the ‘+’ button to add a folder location to backup, or click the ‘-‘ button to remove one.

Other options include:

  • Set a backup folder name
  • Choose which locations to backup (and which to ignore)
  • Choose a backup frequency
  • “Backup now” option
  • Make encrypted backups
  • Choose how long backups are retained
  • Restore previous backups

Backup format

Backups are saved as custom file format; you have to use Deja Dup to restore your files

File and folders you backup using this app are not stored as regular files but as tar’d archives in an “opaque” format. This custom file format is necessary to support the utility’s features, including:

  • Encryption
  • Compression
  • Incremental backups
  • Cloud backups
  • Maintaining file permissions

The “downside” to this is that your backed up files can only be restored using Deja Dup or another app based on the “Duplicity” CLI tool.

Learn more about how Deja Dup works


Need to backup big files? Deja Dup supports other storage locations, including USB hard drives of colossal sizes

My backup needs are modest. All of my critical keepsake files (mainly photos of my late mum) are backed up in quadruplicate to the cloud across multiple services, including Google Drive.

But there other files and projects I like to keep backups of (and versioned backups of at that) for a while, like whatever template I’m using for my avatar, work in progress thumbnail designs, and so on.

And so this article is squarely aimed at a similar use case. It’s perfect for basic backups rather than full system clones.

If you do need to store more, like 100GBs of music of movies, then you will want to use something else. Helpfully, Deja Dup supports a range of storage locations, including USB hard drives of colossal sizes and a self-hosted NextCloud.

How To backup dejadup google drive googledrive