I'm trying to figure out how to backup the users, roles, and what permissions they have on a SQL Server instance. I need to be able to restore the users, roles, and permissions without changing anything else (so backing up the entire database is out). I'm not trying to figure out what permissions are required to be able to make a backup, or restore one.
The reason I'm looking into this:
I need my QA environment to retain its current users, roles, and permissions. I also need to refresh the QA instance (data and objects) based on my prod instance. Our QA team has some elevated permissions that we don't want them to lose after the QA environment is refreshed. The elevated permissions are not documented, and the person who granted them is no longer with the organization. Nobody is confident that we know what they all are.