You need to add the books to your calibre library from the device, and then fetch the collections using the Kobo Utilities plugin. Someone asked a
similar question in the Kobo forum recently. Have a look at that and come back and ask any questions you need to clear up.
For getting the collections into calibre, my Kobo Utilities plugin has a function to fetch the collections into a column in calibre. You can then use that column with the collection management options in the KoboTouch or KoboTouchExtended driver to set the collections on the new device.