简体   繁体   English

Refinerycms:将文件从一个AWS S3存储桶迁移到另一个后丢失的文件名

[英]Refinerycms: file names lost after migrating files from one AWS S3 bucket to another

This is how I encountered the problem: 这是我遇到问题的方式:

Uploaded files to S3 将文件上传到S3

Tried to download the file, it works ok 试图下载文件,可以正常工作

Migrated the files in that bucket to another bucket (under the same AWS account) 将该存储桶中的文件迁移到另一个存储桶(在同一AWS账户下)

Tried to download the file again, it works, the file is downloaded, but the name of the file is just "file", no extension. 试图再次下载文件,它可以工作,文件已下载,但是文件名只是“文件”,没有扩展名。

If I change the file name to add the extension, it still opens. 如果我更改文件名以添加扩展名,它仍然会打开。 So the content of the file is ok, but the file name is lost after migrating to another bucket. 因此该文件的内容还可以,但是文件名在迁移到另一个存储桶后会丢失。

Has anybody met this problem before? 有人遇到过这个问题吗? Or know any potential causes of this? 还是知道任何可能的原因?

Thanks 谢谢

I figured this out. 我想通了。

It is because the metadata was lost during the migration. 这是因为元数据在迁移过程中丢失了。

I was moving files from one bucket to another by downloading them to local machine first. 我是通过先将文件下载到本地计算机来将文件从一个存储桶移动到另一个存储桶的。

What I should have done is : 我应该做的是:

aws s3 cp s3://b1 s3://b2 --recursive aws s3 cp s3:// b1 s3:// b2-递归

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从Rails应用程序将文件从一个文件夹复制到同一AWS S3存储桶中的另一个文件夹? - How do I copy a file from one folder to another folder in same aws s3 bucket from a rails application? 从AWS S3存储桶检索图像 - Retrieving images from AWS S3 bucket 使用“ aws-sdk”保存后如何重命名S3存储桶上的文件? - How to Rename a file on S3 bucket after save using 'aws-sdk'? 如何使用aws-s3 gem或right_aws gem更改S3存储桶中所有文件的文件权限 - How to change file permission of all files in a S3 bucket using either aws-s3 gem or right_aws gem 如何使用 AWS SDK(Ruby on Rails)将文件从 S3 存储桶直接下载到浏览器? - How to download a file from S3 bucket directly to the browser using AWS SDK (Ruby on Rails)? 使用 Shrine 在文件夹之间移动 AWS S3 Bucket 上的文件 - Move file on AWS S3 Bucket between folders using Shrine 从AWS S3提取文件-AWS :: S3 :: NoConnectionEstablished - Fetching files from AWS S3 - AWS::S3::NoConnectionEstablished 使用指定的路径前缀将图像从一个S3存储桶复制到另一个存储桶 - Copy images from one S3 bucket to another with specified path prefixes 从 AWS S3 Bucket 获取数据文件并在 Rails 中解析? - Getting a datafile from AWS S3 Bucket and parse in Rails? AWS s3从Rails应用程序访问私有存储桶URL - AWS s3 access PRIVATE bucket url from rails app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM