Intended path to migrate S3 to local

So to recap for anyone else that runs into this issue, heres what I was able to get working to both migrate from S3 and move to different hardware.

  1. Put your server in read only, and enable the hidden site setting to backup S3 (and local) uploads, detailed here

  2. Do a backup with S3 uploads enabled in your site settings. You will need enough local storage to download them all or else the backup task will fail.

  3. Pull the latest version of discourse from github, and copy over your app.yml.

  4. Rebuild with your app.yml and verify you get the discourse setup page.

  5. Extract the dump.sql from the backup you made, and modify it similar to what is said here.

  6. Recompress the dump.sql db into the backup and put the backup in /var/discourse/shared/standalone/backups/default with the same name it had when you made the backup. (this name is important, so do not truncate)

  7. Run the restore process as shown here


if you are simply trying to migrate from S3 without changing hardware I believe the process is mostly the same but you would skip steps 3&4.

1 Like