Skip to content

Instantly share code, notes, and snippets.

@BRELID
Last active July 31, 2019 09:15
Show Gist options
  • Save BRELID/b05df5dbd6ba5faf10ae7cf224468a6d to your computer and use it in GitHub Desktop.
Save BRELID/b05df5dbd6ba5faf10ae7cf224468a6d to your computer and use it in GitHub Desktop.
Command for dump database in mongodb / Commande pour extraire une base de donnée dans mongodb
// Command for dump database in mongodb
// Commande pour extraire une base de donnée dans mongodb
mongodump -d <YOUR_BASE> -o <WHERE_YOU_WANT_EXTRACT_YOUR_BASE>
ex:
mongodump -d customers -o ./backup
// Extract customers database in the backup folder
// Extrait la base de donnée customers dans le dossier backup
Flags:
-d, -db:<database-name> : database to use / la base de donnée à utiliser
-o, --out:<directory-path> : output directory / dossier où l'on extrait la base
--gizp : get a compress archive / pour avoir une archive compressée
// For watch others flags / Pour voir les autres drapeaux:
mongodump --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment