You could use the --drop parameter of mongorestore:
Before restoring the collections from the dumped backup, drops the collections from the target database. –drop does not drop collections that are not in the backup.
You could use the --drop parameter of mongorestore:
Before restoring the collections from the dumped backup, drops the collections from the target database. –drop does not drop collections that are not in the backup.