Although official documentation instructed to use
curl https://rclone.org/install.sh | sudo bash for installing
rclone is available view
brew, I figured that I'll use
brew instead, for the sake of mroe centralized storage.
brew install rclone resticrclone config
We need to configure Google Drive to work with
rclone. This can be done by following the official instructions found here:
Log into the Google API Console with your Google account. It doesn’t matter what Google account you use. (It need not be the same account as the Google Drive you want to access)
Select a project or create a new project.
Under “ENABLE APIS AND SERVICES” [...] enable the “Google Drive API”.
Click “Credentials” in the left-side panel (not “Create credentials”, which opens the wizard), then “Create credentials”, then “OAuth client ID”. It will prompt you to set the OAuth consent screen product name, if you haven’t set one already.
You must configure your OAuth consent screen in order to see the OAuth option in Step 4. This is very important.
Choose an application type of “other”, and click “Create”. (the default name is fine)
It will show you a client ID and client secret. [...]
rclone to this API, following this doc. The following optional settings are worth noticing:
Since we are going to encrypt our backups anyways, it makes little sense to use the "Computers" folders on Google Drive.
Leave Service Account Credentials blank. This will have the effect that
rclone require you to authorize the Google account whose Drive you want to save backups to. This can be a separate account than the one you configured the Google Cloud project with. Don't user Auto Config -- it didn't work for me on my MacBook at least.
Don't set a password for the
rclone config file.
Now you can quit
rcloud config. Issue the following command to let
restic talk to
restic -r rclone:[rcloud config name]:restic-backups/macbook/ init
Use a strong password.
Initiate your first backup with:
restic -r rclone:[rcloud config name]:restic-backups/macbook/ backup ~/Backups
After a backup, you should be able to mount the storage to a local directory:
brew cask install osxfuse # if you haven't done this alreadyrestic -r rclone:[rcloud config name]:restic-backups/macbook/ mount ~/mnt