title: How to export the database of the mongodb with gzip file extension
body: <p>I'm using mongodb for saving the data for my application and I want to backup of that database in gzip file I searched for it and I found question posted by the other users</p>
  
  <p>link <code>https://stackoverflow.com/questions/24439068/tar-gzip-mongo-dump-like-mysql</code></p>
  
  <p>link <code>https://stackoverflow.com/questions/52540104/mongodump-failed-bad-option-can-only-dump-a-single-collection-to-stdout</code></p>
  
  <p>I used these commands but that will not me the expected output I want the command that will create my database gzip compress file and using extraction I will restore that database folder into the mongodb </p>
  
  <p>currently I'm using this below command 
  <code>mongodump --db Database --gzip --archive=pathDatabase.gz</code></p>
  
  <p>which will create a compression of <code>.gz</code> while I extract it it will show me nothing.</p>
  
  <p>Can you please give me a command that I will use it or any suggestions will appreciated.</p>