How to backup Docker compose containers - Nextcloud, Nginx, OnlyOffice, MariaDB

I have NC13.0 installed in Docker with OnlyOffice, Nginx and MariaDB using docker compose. Before upgrading to 13.1 I want to backup so I can restore if anything goes wrong. I am not familiar with the Docker technique. I have not found any clear and practical information about how to backup and eventually restore a Docker applicance (including the data-volume)