How to import only last two years of topics and posts (phpbb3)


(Janno Liivak) #1

Hi! We’re in a process to make a move from phpbb3 to Discourse. We would like to not import older data and go for example with posts starting from year 2014 or 2015. How can this be done? Has anyone experience with such thing?


(Régis Hanol) #2

Either use a dump of your phpBB3 database where you removed all the old content or modify the import script to add a condition in the SQL queries to only retrieve new content.


(Janno Liivak) #3

I was hoping for more specific hint… preferably something simple and elegant and what works (something from personal experience maybe) :slight_smile:


(Régis Hanol) #4

Both these solutions work and are from my personal experience :wink:


(Janno Liivak) #5

but unfortunately too darn unspecific :stuck_out_tongue:


(Jay Pfaffman) #6

I have added code to several importers that does just that. Search the import scripts for IMPORT_AFTER for several examples.


(Janno Liivak) #7

What if we use “last_post_id” and set it to something from which we know is the last post we don’t want to import? Could it work?

Here: