I don't have SmartThings, but do have Google, so here is half an answer.
Comments above from me and Prashanth to SmartThings forum(*) discussions (here, and here) indicate that backup / restore is not available to the casual user.
However, the SmartThings developer documentation (which seems quite extensive), give information about overall preferences and settings here and here.
And this discussion on the forum appear to show how to programmatically set preferences, which is half of your question answered (and, of course, of little use if you can’t read the preferences to back them up).
I would suggest reading the copious documentation and, if necessary, asking on the SmartThiungs forum, to discover how to backup preferences and settings.
(*) which might be the best place to ask, rather than here. Great as we are, here on SO, I would always recommend asking in a dedicated forum first, for any subject, before asking here.