How can I ensure Portainer's configuration is retained?

How can I ensure Portainer's configuration is retained?