Skip to content

Commit

Permalink
adicionado dica para backup do mongo, no docker
Browse files Browse the repository at this point in the history
  • Loading branch information
cleytonferrari committed Jul 3, 2021
1 parent 0c271b4 commit cde231a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
container_name: mongodbvacina
restart: unless-stopped
volumes:
- 'mongodata:/data/db'
- 'mongodata:/data'
ports:
- '27017:27017'
networks:
Expand All @@ -32,3 +32,9 @@ volumes:
type: none
device: ./database #mkdir -pv database
o: bind

##### Para fazer backup e restore do banco Vacina no MongoDb
## backup ( será salvo no volume mongodata, que esta mapeado para ./database )
#> docker exec -it mongodbvacina mongodump --db Vacina --out /data/backups
## restore
#> docker exec -it mongodbvacina mongorestore /data/backups --drop

0 comments on commit cde231a

Please sign in to comment.