question

MahmoudElsayed-5211 avatar image
0 Votes"
MahmoudElsayed-5211 asked NavtejSaini-MSFT commented

can't use mongorestore command to restore from a given path

[root@dockermg-01 db01]# mongorestore --writeConcern {w:0} mongodb://mongodbtest01:somepassword@mongodbtest01.mongo.cosmos.azure.com:10255/?ssl=true&retrywrites=false&replicaSet=globaldb&maxIdleTimeMS=120000&appName=@mongodbtest01@ /Backup/mongodb/backups/mongodbtest01.mongo.cosmos.azure.com.db01.mongodb.20210523000709/db01/collection01.bson.gz
[1] 4644
[2] 4645
[3] 4646
[4] 4647
bash: /Backup/mongodb/backups/mongodbtest01.mongo.cosmos.azure.com.db01.mongodb.20210523000709/db01/collection01.bson.gz: cannot execute binary file: Exec format error
[2] Done retrywrites=false
[3]- Done replicaSet=globaldb
[4]+ Done maxIdleTimeMS=120000
[root@dockermg-01 db01]# 2021-05-27T14:36:49.595+0000 using default 'dump' directory
2021-05-27T14:36:49.596+0000 try 'mongorestore --help' for more information
2021-05-27T14:36:49.596+0000 Failed: mongorestore target 'dump' invalid: stat dump: no such file or directory

azure-cosmos-db
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MahmoudElsayed-5211 We are checking this and will get back to you. Can you confirm if this is still an issue for you.

0 Votes 0 ·

yes, please
it is still an issue

0 Votes 0 ·

@MahmoudElsayed-5211

Can you please give details to your environment as well. OS and images used and size of database and all the other info that you can provide.

Regards
Navtej S

0 Votes 0 ·

i'm using Red Hat Enterprise Linux release 8.1 (Ootpa)
database is a testing database that i just created to test these commands (monogrestore and mongodump)
i'm trying to test a simple dump process and a full database restore from that dump

0 Votes 0 ·

@MahmoudElsayed-5211

Our team has conveyed that this appears to be issue with the backup file itself, which is not created by Cosmos DB. Can you confirm the same sequence of commands works in native MongoDB?

Please convey to take this forward.

Regards
Navtej S

0 Votes 0 ·

@MahmoudElsayed-5211 Were you able to check this further,

0 Votes 0 ·

0 Answers