The DotNetLiguria website source code (ASP.NET Core)
The docker-compose.yaml
file pulls and generates the image needed to run MongoDB in container
From this folder run (it will run and stay
docker-compose up -d
After this, you can start the container from Docker desktop directly.
mongodump -u<mongodbUsername> -p<mongodbPassword> --archive=/tmp/backup.gz --gzip --db <mongodbDatabase>
unzip the backup copied
cd \tmp
tar xzfv backup.gz
Restore the database (dump is the folder with the unzipped data):
mongorestore --verbose -u root -p <password> --nsInclude="*" /tmp/dump/