Static backup of discourse forum

Hey guys.

Iโ€™m an admin of a private discourse forum and I would like to scrape it to get a static backup of the site.

Why? In a few years, the forum might not exist and I would like to share with all its users a local copy so we can remember the good old times :slight_smile: .

I think a scraper(httrack/wget) can do it, but is there a better solution? If not, has anyone already used a scraper on discourse and could give me some pointers?

Thanks :wink:

2 Likes

I donโ€™t really understand your request. Why wouldnโ€™t you just grab the default backup zip file? You can extract and render that data in a variety of ways, all of which would probably be easier than figuring out a way to scrape the site.

1 Like

If we ever do this, I would want the export file to be a WARC archive. But the database backup should satisfy your needs for now.

2 Likes

@erlend_sh
I wanted a static copy, so everyone could have a copy and browse the old forum, without having to host discourse themselves.

Is there a way to convert the tar backup into a static copy?

That would be very difficult as Discourse is a JavaScript app, not a traditional website.

1 Like

Its doable with phantom js and some scripting, not trivial but can be done.

at least our URL scheme is non insane (unlike many other traditional forums) so you would have a much easier time creating file per page.

1 Like

This is on my wishlist as well, since my sites involve people in developing countries who do not always have access to the Internet. A way to put Discourse on a flash drive for offline access would be super valuable. Would love to be able to hand it out as swag!

If anyone wants to work on this and has great ideas on how it might be done let me know.

2 Likes