It all depends on how you are running n8n adn which database you are using. One option could be to use the CLI to export the workflows and save them to Git and export the credentials and store them somewhere else. You could also use the API to export the workflows and save them to git or other locations similar to the examples in the workflow templates.
To answer your question though… The n8n config and n8n database will be in the container under /home/node/.n8n which you may be using a bind / volume for depending on how you configured n8n.