Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Storage - rsync or cp for initial upload?

We're using GCS for our archive backup and I was curious what people thought was better for the initial update - rsync or cp?

I've gotten hung up twice (once on a non-unicode character and again on what seemed like a long path) and would like to be able to pick up where I left off.

Any advice would be appreciated! (and if this is a bad question, can someone tell me exactly why its bad or how to fix it? it seems I suck at asking questions here!)

like image 746
oweniverson Avatar asked May 24 '26 00:05

oweniverson


1 Answers

rsync is better suited for doing archives/backups, for the reason you hinted at - if you started uploading data and then encountered a problem partway through, restarting a cp would cause you to re-upload files that were already successfully uploaded, while rsync would only upload files that weren't uploaded (or that changed since the last upload). Moreover, if some of the source files were deleted since you last started uploading, rsync will remove them from the destination bucket, making the destination content match the source content.

like image 177
Mike Schwartz Avatar answered May 30 '26 03:05

Mike Schwartz