Recently i ran into a problem with wpml-media. I actually executed wpml-media admin area twice, ran into an error and restartet it (i believed i did something similar when testing wpml-media without any problem, this time though, on my production server & database i generated 10 duplicates for each entry. Holy moly! There was actually no problem on the client side, everything was still working, but going from 2.5K media entries to 20K was not an option at all.
At the same time, people where adding new data already, so using a complete backup was no option as well. What i did in the end was the following:
media data dump of my backup data
mysqldump DATABASE_NAME -u DATABASE_USER -p wp_posts --where="post_type = 'attachment'" --no-create-info > data_dump.sql
mysql -u DATABASE_USER -p < data_dump.sql
This way, i lost only media entries recently created. But all posts, events and other stuff is still there. After looking into wp-uploads, in only found five created images. So i recreated them manually and now i’m looking again at 2.5K media entries. Looks better to me