Restore database not starting restore process

Hi, I am trying to dump and restore a mongodb database (from version 5.0.10 to 4.4.14) running in docker container.

The mongodump works without a problem and I am getting a 1.1GB file:

docker exec -i mongodb-5 mongodump --ssl --sslAllowInvalidHostnames --port 12005 --gzip --db rocketchat -u root -p <mongodb pw für local user> --authenticationDatabase admin --host 127.0.0.1 --archive > .gz

When I try to restore (have tried with 4 and 5) I get only the output for starting the restore but there is no indicator starting (I have let it run for about 3h max) and there was also no additonal output in the logfile (I have copied the backupfile to the container):

docker exec -i mongodb-4 mongorestore -vvvv --ssl --tlsInsecure --port 12004 --gzip -u root -p <mongodb pw für local user> --authenticationDatabase admin --drop --host 127.0.0.1 --preserveUUID --convertLegacyIndexes --noIndexRestore --archive /opt/.gz

The output:

2022-08-21T19:53:32.158+0000	using write concern: &{0 false 0}
2022-08-21T19:53:32.173+0000	checking options
2022-08-21T19:53:32.173+0000		dumping with object check disabled
2022-08-21T19:53:32.173+0000	will listen for SIGTERM, SIGINT, and SIGKILL
2022-08-21T19:53:32.174+0000	connected to node type: replset

In the docker log I am getting this output:

{"t":{"$date":"2022-08-21T20:16:41.294+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1661113001:294663][1:0x7fe711343700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 484, snapshot max: 484 snapshot count: 0, oldest timestamp: (1661112996, 1) , meta checkpoint timestamp: (1661113001, 1) base write gen: 43869"}}
{"t":{"$date":"2022-08-21T20:17:08.490+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:57968","connectionId":14,"connectionCount":5}}
{"t":{"$date":"2022-08-21T20:17:08.490+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:57978","connectionId":15,"connectionCount":6}}
{"t":{"$date":"2022-08-21T20:17:08.493+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn15","msg":"client metadata","attr":{"remote":"127.0.0.1:57978","client":"conn15","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.0"},"os":{"type":"linux","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongorestore"}}}}
{"t":{"$date":"2022-08-21T20:17:08.494+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn14","msg":"client metadata","attr":{"remote":"127.0.0.1:57968","client":"conn14","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.0"},"os":{"type":"linux","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongorestore"}}}}
{"t":{"$date":"2022-08-21T20:17:08.495+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:57984","connectionId":16,"connectionCount":7}}
{"t":{"$date":"2022-08-21T20:17:08.496+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn16","msg":"client metadata","attr":{"remote":"127.0.0.1:57984","client":"conn16","doc":{"driver":{"name":"mongo-go-driver","version":"v1.10.0"},"os":{"type":"linux","architecture":"amd64"},"platform":"go1.17.10","application":{"name":"mongorestore"}}}}
{"t":{"$date":"2022-08-21T20:17:08.503+00:00"},"s":"I",  "c":"ACCESS",   "id":20250,   "ctx":"conn16","msg":"Authentication succeeded","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"root","authenticationDatabase":"admin","remote":"127.0.0.1:57984","extraInfo":{}}}
{"t":{"$date":"2022-08-21T20:17:41.299+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1661113061:299260][1:0x7fe711343700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 499, snapshot max: 499 snapshot count: 0, oldest timestamp: (1661113056, 1) , meta checkpoint timestamp: (1661113061, 1) base write gen: 43869"}}

I am new to mongodb, and would be grateful for any help.

Best
Robert

Did it dump successfully?
Any log from your terminal
You have give a name to archive file
Is the archive you are passing as input to your mongorestore correct?

Yes the dump was successful.
Only the messages shown, for the export it shows the progress of the dump.
Ah there is a formatting issue with the code, yes I have named the archive files.
No I have tested it multiple times, I will check the archive file.

the form is --archive=filename and you have --archive filename

Its waiting for stdin in your invocation.

2 Likes

Ah thank you that was the problem.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.