Skip to content

Backup to Google Cloud

If your inventory has the variable gcloud_sync defined, then Google Cloud backup tools will be installed and configured automatically.

The configuration of the Google cloud backup is done through the inventory and an example configuration looks like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
gcloud_sync:
  - source: /var/backups/mysql
    account: backup
    bucket: mysql/hostname
    hour: 3
    minute: 10
  - source: /jails/mysite/var/www/files/default
    account: backup
    bucket: files
    hour: 4
    minute: 10

In addition, you have to define your Google Cloud account and projects with another inventory variable:

1
2
3
4
5
gcloud:
  backup:
    projectid: id-from-google-cloud
    authfile: Backups-123456789.json
    account: abcdefghijh@developer.gserviceaccount.com

You'll find those credentials in your Google Cloud account.


Last update: January 12, 2021 18:06:10