Description
Summary
I try to restore my mongodb from one of the backup files which are done by this tool. But the command can't pickup my DB_AUTH environment variable and can't add the authentication option to the mongorestore command.
Steps to reproduce
DB_AUTH=admin restore /data/db/mongodb/mongo_buldae_mongodb_${TARGET_FILE_DATE}-000003.archive.gz ${DB02_TYPE} ${DB02_HOST} ${DB02_NAME} ${DB02_USER} ${DB02_PASS} ${DB02_PORT}
2025-03-03T23:51:11.967+0900 error connecting to host: failed to connect to mongodb://mongodb:27017/: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
2025-03-03.23:51:11 [ERROR] ** [db-backup-restore] Restore reported errors
What is the expected correct behavior?
it should be able to restore Mongodb with one of the backup files.
Relevant logs and/or screenshots
Environment
- Image version / tag:
- Host OS: