How migrate from Discourse to another platform of community?

Hello! I intend to move my community, which is on Discourse, to another platform. How can I export the contents and users in an SQL file?

Hi :slight_smile:
Just do a backup from your admin panel. Everything’s in it.

5 Likes

Out of curiosity, are you willing to share why you’re moving out from Discourse?

5 Likes

@Canapin Thank you so much for your help! Just to confirm the way: in admin panel, I open the backup section and just do the download of the last day, right?

1 Like

Yes, exactly. The archive should contain the SQL dump as well as the uploads.

3 Likes

To be on the safe side, you can also make a backup first, then download the most recent backup

4 Likes

Hey @Gabriel_Fernando_Mar,

After looking more carefully at your screenshot, it appears they contain only the database, not the uploads. We can see that with the sql.gz filename part.

You may want to enable the site setting backup with uploads before creating a new backup whose filename ends with .tar.gz.

Example:

Sorry for my previous reply, which was misleading!

2 Likes

Hello, @Canapin! I hope you are doing well :slight_smile:

Unfortunately we are having some problems in migrating the contents that are in the Discourse. Previously we had sent the backup file in SQL to the new tool and one of the errors they identified was the following:

  1. There are a good amount of missing attachments. My engineers found this when processing topics that were referencing attachments, but said attachments were unavailable in the exports you provided. Our suspicion is that these attachments are saved somewhere else in Discourse (a separate database, for example). Could you check again to see if there are additional attachments that you could locate and provide to us.

After your guidance here in the topic, I’ve selected the option to include the uploads and generated a new file in .tar format, but they still showed an error (image bellow).
Is it possible the images and other media are not included in the migration file, even select the “upload” option in the backup setting? What could be happening?
It looks like there are still over 8,100 missing files.

Were they missing before the migration?

You should use the url path from the uploads table to determine the location of the files.
You will then probably find that these files are being stored on S3. Those are not included in your backup. Your import script can retrieve them from S3 when you need them (or leave them there and just reference them).

3 Likes

To expand on my question, there’s multiple situations you could be in:

  • none of the uploads are in your backup file
  • some of the uploads are in your backup file
  • all of the (available) uploads are in your backup file

and unfortunately there’s no way for us to tell which of these cases is what you’re experiencing.

rake posts:missing_uploads might help.

I sure understand you may not want to talk about the subject, but please let me tell you I would also be very interested by the rationale of the move, as @Canapin asked. Others would probably like to know too :+1: They’re just more polite than me :laughing: Thanks!

1 Like

@supermathie @RGJ @Canapin Thanks for your answers! I’m going to put here the steps we performed to generate the backup file. Please let me know if you find any misconfiguration.

Backup Settings:
The backup location is on S3. Is correct or we should select the other option? The other option is “local storage” in free translate. What is it mean?


After we’ve done this settings, we’ve just downloaded the file in .tar and send to the other platform team.

Did we make a mistake? Do we need to tweak anything in the backup settings? Or does the other platform team need some access or another file?

Sorry for the questions but I don’t have much technical knowledge in migrations and scripts. We thought it was easy to export natively from Discourse.

Hi, @Mevo! The main reason is the user interface and experience.
Our community is growing and we needed a more user-friendly and intuitive platform.
Also some user engagement issues: we’ve looked to gamification, e-mails campaigns and other features.

4 Likes

Thank you! And what have you decided to move to?

2 Likes

Nothing is wrong with your backup file.

You should simply instruct the “other platform team” to look for the files on the S3 bucket by inspecting the url column in the uploads table, instead of trying to find them in the backup file.

Exporting is easy, importing into another system is not…

9 Likes

If you want the S3 files included in the backup you’ll need to enable include_s3_uploads_in_backups.

By default this is not on as pulling down all of the uploads from S3 only to package them in a tarball and send them back up can be very time-consuming and potentially expensive.

3 Likes

@supermathie @RGJ @Canapin Hi! Hope you’re doing well! I still have some problems with the migration of images. Below are the screenshot of the currenting backup settings and the answers of the Insided platform team:


Here are additional notes from their engineers:

  • In the file you provided on 05/17 (.tar format), the files themselves are not included.

  • For example, the url column has a value that’s : /uploads/db0693/original/2X/9/9fedfd520d43a0e03281fc4a6e636ad2116a99a3.gif. They can then locate the file in the data they provided by following the path (uploads/db0693/etc). So this file isn’t in the Missing-Files.txt document.

  • Another entry has the following url://upload-forum-blip.s3.dualstack.us-east-1.amazonaws.com/uploads/db0693/original/2X/d/da4a7824e7a48d73c0cb8724225e5dddc111ed63.jpeg. Here, they also tried to find the physical file by following the path in the datadump to (uploads/db0693/etc). But this file isn’t a part of the delivered files and therefore it’s in the list.

  • Based on the answers in the community thread you linked to, we suspect that you will need to navigate to your s3 bucket (upload-forum-blip.s3.dualstack.us-east-1.amazonaws.com) and download the upload folder (and subfolders) on there manually, in addition to the files they get when exporting the backup.

This notes make sense? Is possible someone of support team contact me to export this files?
Thanks!

1 Like

:face_with_raised_eyebrow: So this file is simply located at the URL they have found (here)

are you seriously telling me that these engineers are incapable of a) downloading a file from within their import script and/or b) using a tool like S3browser or Cyberduck to download those files?

You seem to be hosted with Communiteq, we usually stay away from S3 buckets that are self-managed by our customers but let’s get this over with. Just open a ticket with Communiteq support so we have your permission logged and I’ll make sure you get a download of these files.

But you might need to think twice about moving there if this is the “support” you’re getting from them.

3 Likes

Did you enable include_s3_uploads_in_backups as recommended?

Also, the S3 credentials are right there and could be used to download the files.

1 Like