Score:0

How can I sync two S3-compliant buckets which have different credentials?

br flag

I've got a MinIO bucket (which uses the S3 API for access) and I want to copy all its data into an AWS S3 bucket. They both use the same API, but the I can't find a tool that lets me copy directly from one bucket to another using two sets of credentials.

The only way I can think of is to use s3cmd to download the files one at a time using the MinIO credentials, then use the AWD CLI to upload them to S3.

Does anyone know of a better way?

Score:2
pt flag

You can use the minio client to copy content from one bucket to another. If I configure two aliases in minio:

mc alias set source https://minio-server... minio_access_key minio_secret_key
mc alias set destination https://s3.amazonaws.com/ aws_access_key aws_secret_key

Then I can copy from source to destination like this:

mc cp source/bucket/path/to/file destination/bucket/path/to/file

I would argue that, in general, the minio client is probably the best s3 cli available. There's no point to using s3cmd for one operation, the aws cli for another, etc. Just use mc.

Mourndark avatar
br flag
Amazing, I didn't realise it could do that! `mc mirror --watch` looks like exactly what I need, thanks
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.