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 22, 2019 in GCP by anonymous
• 19,610 points
4,675 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). 

Hope this helped!!

To know more about Google Cloud, It is recommended to go for Google Cloud Certification training today.

Thank you!

answered Nov 22, 2019 by Sirajul
• 59,230 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 24, 2019 in GCP by Sirajul
• 59,230 points
2,339 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
• 59,230 points
1,030 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
• 59,230 points
4,004 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
• 59,230 points
4,942 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP