I've dug deeper and realized that there is a problem in the importer, that will show up only in special circumstances. Vbulletin allows to use the same fileid (one physically uploaded photo) in more than one album photos and comments are assigned to fileid and not to the album representation of a file. For example I have a single album with two separate instances of the same mediafile (filedataid = 210390, attachmentid = 210,416, 210420). One comment (commentid = 12) is "shared" between them and displayed twice, under both photos. During the import the process tries to insert two comments with the same commentid which is not possible.
I want to retain original ids as much as possible for the content where it is important (albums and photos - because of urls for example), but I don't really care for comment ids, because they don't really matter for me.
Has anyone encountered the same problem? What is the best solution?