How to manually migrate s3 files to local?

I searched some topic related to my question and looks like cannot use rake uploads:migrate_from_s3 anymore.

So what should be the safe way to do it?

Download all uploads from s3 and upload to my local server.

Then do some remapping?

It’s super helpful if anyone can tell me the remapping stuff…

First, Enable hidden setting to include S3 uploads in the backups

Then make a backup. Then restore it. I recommend restoring it on a fresh server. You can use your existing yml file, but delete USE_S3, the upload bucket and the stuff that uploads assets to S3.

You Move a Discourse site to another VPS with rsync so that you’ll have your SSL certificates. I’d `–exclude postgres_*".

Then you can Restore a backup from the command line.

4 Likes

I believe this could be accomplished with a single line of code. Adding it to the roadmap might be a good idea. It should be possible to switch between local to S3 and S3 to local with ease using just one line of code. I understand you are quite busy, but I think it could be beneficial in the future if you add it to the list.

1 Like