NGG and Metaslider galleries empty with upgrade to Beaver Builder

After changing theme and gut-rehabbing our client’s site all the galleries created with NextGen and Metaslider are empty. What is the easiest way to restore them?