8

Basically, my question is: what are the best ways to keep my Google Cloud Storage bucket data safe?

I understand that using Object Versioning is a first measure you can take to protect yourself against accidentally deleting data. However, I would also like to keep offsite backups (either locally, or on another provider like S3). Are there any recommended ways to do this?

One direction I was looking was to keep incremental, rsync-like local copies of my buckets. I was hoping gsutil would be able to have a sync command (like s3cmd does), but it doesn't seem it does.

Backing up to another cloud provider like S3 would also be handy, but as I understand the only way to do this is to download all the data to an instance (either in the Google or Amazon datacenter), and then upload it to the target bucket. But this would again require an incremental sync.

Remko
  • 183
  • 3
  • `gsutil` may be sufficient, but in case you don't know it, [rclone](http://rclone.org) has many options (and, while off topic, a new "encryption" one) – Déjà vu Sep 23 '16 at 01:51

2 Answers2

5

gsutil has an rsync command (introduced starting in version 4). You can use that to synchronize data from your bucket to a local disk, or to S3.

Mike Schwartz
  • 261
  • 1
  • 4
  • So obvious. I could have sworn I looked for it several times and couldn't find it. Thanks a lot! – Remko Jul 20 '15 at 14:49
1

Remko,

You can use https://github.com/minio/mc . Minio Client aka mc is written in Golang, released under Apache License Version 2. You can try "mc mirror" operation to do this.

$ mc mirror localDir s3/RemoteDir gcs/RemoteDir

localDir: Local directory
RemoteDir: Your bucket on S3  
s3 alias https://s3.amazonaws.com with signature version support "S3v4"
gcs alias https://storage.googleapis.com with signature version support "S3v2"
RemoteDir: Your bucket on google cloud storage

I hope this helps & patch/contribution to minio project is always welcome.:)

koolhead17
  • 401
  • 3
  • 6