Migrating to a new server that has a new DB and new S3 buckets for backup and uploads

Hi,

I am currently in the process of migrating our server from an existing Bitnami based deployment (quite an old version) to the officially supported install in AWS using the latest Discourse release. This new install has an external Elasticache and RDS instance and also will use S3 for backups and uploads.

I have 2 questions:

  1. The old Discourse server is on a pretty old version - by doing the backup/restore in the new Discourse server will that just run all the relevant upgrade commands?
  2. If I copy the backup file into the new Discourse docker container on the new server and initiate the restore on the command line, will the new bucket values I set in my config be overwritten as part of the restore or will my new values be used? I assume my new DB is populated from the backup and then when I exist the container and run ./launcher rebuild app my new S3 values will be used.

If my assumptions are correct, then before I perform the restore I assume I should copy the contents of the old S3 buckets to the new ones?

Are there any other gotchas for doing this type of migration with a backup?

Thanks in advance.

Maybe I am missing something but, why are you establishing new buckets? A new backup bucket with appropriate lifecycle rules seems ok to do but if your existing Discourse instance is using S3 upload bucket you will have some problems.

1 Like

2 reasons we need new buckets:

  1. I am not 100% sure the migration from Bitnami will work without a hitch so we don’t want to impact any existing data incase we need to abort the migration
  2. We changed our bucket naming so thought it easier to have 2 brand new buckets for this

Point 1 is the one that worries me so just being extra careful.

What issues do you envisage with the new uploads bucket? The old Discourse server will be put into read only mode. The plan is once the new server is up and validated we will stop our old server, change the DNS to the new server and then purge the cache in the CDN (Cloudfront) and then open it up to the public.

I missed that you were going to copy over the data from the old buckets. Took a look at AWS, looks to be straight forward. If it were me I would not muck with changing buckets before moving to AWS or a new server elsewhere.

Officially supported?? Not so sure about that.

Strongly suggest you get Discourse updated before the move to a new server.
On the old instance, suggest you move the S3 config to the app.yml if not there already before moving.

This is something you can easily test without affecting production.

Personally I would do everything I could to avoid doing these two things at the same moment.

  1. see if you can avoid moving buckets at all
  2. if you can’t, do it after the migration from Bitnami
1 Like

I am very curious about how doing this type of install is a value added proposition.
From the numerous posts around unsupported installs it seems more trouble than benefit unless folks are doing them for learning/experimentation.