Can I synchronize a local folder with a cloud storage bucket?

0 votes
I want the contents of a local folder and that of my cloud storage bucket to be in sync. Is this possible? How can I synchronize the data in the two?
Nov 21, 2019 in GCP by anonymous
• 8,200 points
53 views

1 answer to this question.

0 votes

If you want to synchronize a local directory with a bucket or vice versa, you can do that with the gsutil rsync command. 

For example, to make gs://example-bucket match the contents of the local directory local-dir you can use:

gsutil -m rsync -r local-dir gs://example-bucket

If you use the rsync -d flag, it signals gsutil to delete files at the destination (gs://example-bucket in the command above) that aren't present at the source (local-dir). 

answered Nov 21, 2019 by Sirajul
• 45,960 points

Related Questions In GCP

0 votes
1 answer

Listing the contents of a cloud storage bucket folder.

Use the gsutil ls command to list the contents ...READ MORE

answered Oct 23, 2019 in GCP by Sirajul
• 45,960 points
30 views
0 votes
1 answer

Can I give a user access to cloud storage who doesn't have a GCP account?

Yes, you could certainly do this.  You can ...READ MORE

answered Nov 5, 2019 in GCP by Sirajul
• 45,960 points
50 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

GCP Error: 403: Access Denied

Check that your credentials are correct. For ...READ MORE

answered Oct 9, 2019 in GCP by Sirajul
• 45,960 points
61 views
0 votes
1 answer

Permissions issue with Google Cloud Storage Bucket.

You can regain access to the object by assigning an applicable role, like roles/storage.objectAdmin, to ...READ MORE

answered Oct 10, 2019 in GCP by Sirajul
• 45,960 points
214 views
0 votes
1 answer
0 votes
1 answer