Recovering data from an old version - with a difference

(Philip Rhoades) #1


I have an old Discourse PG dump - the header lines are:

– Dumped from database version 9.3.5
– Dumped by pg_dump version 9.3.5
– Started on 2016-03-18 03:00:01 AEDT

This was a failed exercise in setting up a “Life Extension, Science and Technology Party” (LESTp) that was started in 2014 - nominally in time for the Australian Federal Election in 2016. However the health of both of my parent’s immediately took a turn for the worst and I could never put any serious effort into the project.

Now, I have created a new Discourse installation for ALL of my projects, and, for historical posterity reasons I would like to recover the info from the old LESTp Discourse DB and put it in a new LESTp category in the new Discourse. There were only 15 users, 6 post categories and 61 posts but is there a way, say, of adding 100 to the old user IDs and importing all of the posts into the new, single, Discourse LESTp category? I would like to preserve all of the dates, times and users on the posts.


(Michael - #2

I think moving all the six categories into a single category and then using the existing export/import tool would work here?

(Philip Rhoades) #3

You mean do that by editing the DB directly?

Wouldn’t I still have the problem of different user IDs conflicting? - I will have a look at that link.


(Michael - #4

Given the very low amount of posts you could do this by moving each individual topic by clicking the pencil next to the topic title in each topic.

/admin/users/list/active.json Error code: 500 Internal Server Error
(Philip Rhoades) #5

The problem is, I realise, after looking at the import/export tool, is that you need a running Rails system - I only have the SQL dumped data . . I will go looking for a backup of the Rails app from the time but if I can’t find one I guess it will have to be a SQL exercise by hand . .