you need to: 1. install new farmOS in mysql/mariadb with all the same modules enabled 2. truncate all tables in the new database after the install is finished 3. import your pgsql dump into those empty tables