i am running cron job every 4 hour to create mongodbbackup but when i am trying to restore backup inside mongodb running container, it throwing below error.
error restoring from archive '<path to file>': reading bson input: error demultiplexing archive; archive io error
I am using below command to restore it:
docker exec mongodb sh -c 'mongorestore --authenticationDatabase admin
-u <username>
-p <password>
--nsFrom "<file.*>"
--nsTo "<file.*>"
--gzip --archive=<path to file>'
but if i am creating backup without cron job and restoring it error is not there. can you please help me what can be the reason for this error