title: Moving a very large MongoDB database
body: <p>Trying to move a MongoDB database with a little over 100 million documents. Moving it from server in AWS to server in GCP. Tried <code>mongodump</code> - which worked, but <code>mongorestore</code> keeps breaking with an error -</p>
  
  <pre><code>error running create command: 24: Too many open files
  </code></pre>
  
  <p>How can this be done?</p>
  
  <p>Don't want to transfer by creating a script on AWS server to fetch each document and push to an API endpoint on GCP server because it will take too long.</p>
  
  <p>Edit (adding more details)
  Already tried setting <code>ulimit -n</code> to unlimited. Doesn't work as GCP has a hardcoded limit that cannot be modified.</p>