My data's been deleted

Hi. I used strapi transfer to move db data from staging to prod. And when I run strapi transfer, process for strapi files failed and somehow my data in s3 was deleted.

How it could happen?

This topic has been created from a Discord post (1220494507062202418) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

Do you have the same S3 config for both envrionments. It might be the case that when you started the import into production, that the production first cleared the s3 bucket for some reason. I remember this happening when I transfered a staging to local with having the same upload provider/s3 config as the server. <:this:822102797012566036>

Yeah, I had the same config for both

But when I read the docs about strapi transfer, there was nothing about that I have to have different environments

Also there is warning that Strapi will delete data in remote Strapi instance

But I couldn’t even think that it will also delete files on the cloud

I think the docs should be more clear on this matter

It’s very fortunate that we didn’t release our website to end users yet

Yeah the fact that it delete’s the whole folder is indeed weird, I never checked it out afterwards. But it would make more sense if if only delete the files that had a entry in the media library db table.

imho, it should not touch the s3 bucket at all.

Yeah I see your point their, but on the other hand I think S3 needs to configured per env using .env or config/env/files .

But still shouldn’t delete the whole bucket folder.

Indeed you shouldn’t be using the same S3 bucket for both environments