My group was running our Discourse on a temporary domain for two months until we agreed on our actual domain name. Yesterday I attempted to migrate all content from the old domain to the new one. All text content, user accounts, and even inter-thread links transferred correctly. But now:
- All past image embeds appear to be lost.
- No new images can be uploaded.
This was my process:
- Generated a new Discourse app on a new DigitalOcean droplet.
- Connected the new domain name to that new droplet.
- Confirmed both Discourse apps and all plugs were up to date with latest available software versions.
- Put the old Discourse into read-only mode, to prevent additions of any new content.
- Ran a backup of the old Discourse.
- Uploaded the backup to the new Discourse.
- Updated the Discourse email address from the old domain’s email to the new domain’s email.
- Ran a test of notifications, and they worked for the new Discourse.
- Clicked through all Discourse settings to update any mentions of old domain to new domain.
- Changed the old subdomain to redirect to its proper domain, and temporarily added a note and link to the new Discourse there.
As written above, most content appeared to transfer flawlessly. But now, a day later, we’ve noticed old image embeds are lost, and no new images can be uploaded. Only their “alt” content appears. Screenshot of an example follows.
In googling, it appears there are several lengthy threads about this, but I didn’t see one that includes a change in domain name and an inability to re-upload.
I’ve attempted just now to resolve this by:
- SSH into the machine.
- CD in the Discourse directory and enter the app.
- Run
rake posts:missing_uploads
. This reports:
Looking for missing uploads on: default
0 post uploads are missing.
- Run
rake uploads:missing
. This reports a long list:
/var/www/discourse/public/uploads/default/original/1X/bbc547e72f080561282be277749165709cbb0983.ico
/var/www/discourse/public/uploads/default/original/1X/0a421ccd1a08047895e2355f44c332f8b069107d.jpeg
/var/www/discourse/public/uploads/default/original/1X/034e0353b7558a26252c82982de53002fda0a33f.jpeg
[…]
/var/www/discourse/public/uploads/default/original/1X/f7a6164ffa55af4ee2706d2386227183ef6c2d61.png
96 of 281 uploads are missing
/var/www/discourse/public/uploads/default/optimized/1X/997bc5536763d84a8d035ff7becd98277a158680_2_45x45.png
[…]
/var/www/discourse/public/uploads/default/optimized/1X/8944afba36549c9050ef074b391625ef93d4d0e3_2_1035x582.jpeg
/var/www/discourse/public/uploads/default/optimized/1X/8944afba36549c9050ef074b391625ef93d4d0e3_2_10x10.png
247 of 761 optimized_images are missing
- Run
rake uploads:recover_from_tombstone
. This outputs nothing.
I admit I don’t know what those Rake commands are doing.
I can also see within the containers/app.yml
file that DISCOURSE_HOSTNAME
is the correct (new) subdomain and domain.
Running ./launcher rebuild app
appears to change nothing.
Can anyone help, please? Thank you.