This is where some extra information is needed, before much help can be provided. Which database do you use and how you plan to do a data refresh will have an impact on how you back up the menu and udc tables. Also whether or not you have changed where the menu and udc tables live to be different from the normal control tables data source and where that would be. In short, you installation configuration.
With your question as is, the answer would be something like: Create copies of the appropriate tables and put them where they will not be overwritten by the data refresh.