Google Storage

HashBackup supports:

  • Google Storage via its S3-compatibile API

  • Google Drive via Rclone

  • Gmail via imap

Google has several storage products and it can get a bit confusing:

Google Drive, Google Docs, and Gmail are related since they are charged together and share a storage quota.

  • HashBackup can write to Google Drive if it is mounted as a filesystem using a Dir destination (write to a directory). IMPORTANT: don’t write directly to your Google Drive with -c unless you protect your key with a passphrase! Use a Dir destination instead.

  • HashBackup can write to Google Drive using Rclone as a transfer agent. See the Rclone destination for details.

  • HashBackup can write to Gmail using an IMAP destination. Gmail is only feasible for small backups. It’s good for a redundant backup of very critical data like config files.

  • HashBackup cannot write directly to Google Docs with the Google Docs API

Google Storage aka Google Cloud Storage has an S3-compatible interface and is probably what you want to use with HashBackup. Read the rest of this, then see the S3 destination for details.

Google Storage has 4 storage classes: standard, dra, nearline and coldline. For HashBackup, nearline storage is recommended since it is has lower cost than standard storage and has a 30-day delete penalty instead of the 90-day penalty of coldline. If you are going to have a write-only backup and not use HB’s retain command, coldline would be cheaper.

To use nearline storage, create a bucket at Google’s website and set the storage class to nearline. HashBackup does not set or change the storage class of a bucket. If you let HashBackup create a new bucket, it will have the standard storage class. The class keyword is not currently used for Google Storage because their S3-compatible interface does not support setting storage class on files.

To use Google Storage with HashBackup, you first need to generate S3-compatible Developer Keys. These are different from the regular Google Storage API keys! See this guide for "simple migration from S3": This will give you an S3-compatible access key and secret key to use in dest.conf.

Set the type keyword in dest.conf to gs to indicate you want Google Storage rather than Amazon S3 storage.

See S3 destination for more details about S3 and S3-compatible destinations.