Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify b3d_pull to use rsync #94

Closed
wants to merge 3 commits into from
Closed

Modify b3d_pull to use rsync #94

wants to merge 3 commits into from

Conversation

sritchie
Copy link
Contributor

@sritchie sritchie commented Jul 31, 2024

This cleans up the errors and makes the command run faster (instant on a second run!)

This approach would make b3d_push faster too, though I didn't address that in this PR.

@sritchie sritchie requested a review from nishadgothoskar July 31, 2024 20:15
@sritchie
Copy link
Contributor Author

First and second run:

\ [130/130 files][ 28.2 GiB/ 28.2 GiB] 100% Done  67.2 MiB/s ETA 00:00:00
Operation completed over 130 objects/28.2 GiB.

Success: Downloaded all contents from https://console.cloud.google.com/storage/browser/b3d_bucket.

real	1m48.090s
user	6m52.650s
sys	3m50.464s
sritchie@sam-b3d-repo:~/b3d$ time b3d_pull
B3D Downloading data from gs://b3d_bucket to /home/sritchie/b3d/assets/shared_data_bucket.
===============================================
Downloading all contents from gs://b3d_bucket into /home/sritchie/b3d/assets/shared_data_bucket...
(overwrite=False)
===============================================
Building synchronization state...
Starting synchronization...

Success: Downloaded all contents from https://console.cloud.google.com/storage/browser/b3d_bucket.

real	0m8.733s
user	0m12.942s
sys	0m4.672s

@sritchie sritchie requested a review from tiffanyluong July 31, 2024 20:39
"-n",
"--recursive",
GCLOUD_BUCKET_NAME + "/*",
flags = [] if overwrite else ["-u"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this -u flag will cause the command to NOT update a local file if its timestamp is newer. Without this flag, the remote version, if different, will always win.

@sritchie sritchie closed this Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant