Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URI for mongorestore #254

Open
Mark24Slides opened this issue Sep 21, 2023 · 0 comments
Open

URI for mongorestore #254

Mark24Slides opened this issue Sep 21, 2023 · 0 comments

Comments

@Mark24Slides
Copy link

Mark24Slides commented Sep 21, 2023

Description of the feature
We have possibility to use uri parameter for mongodump, but not for mongorestore

Benftits of feature
${MONGO_CUSTOM_URI} for mongodump

Additional context
In usr/local/bin/restore add:

if [ -n "${MONGO_CUSTOM_URI}" ] ; then
    mongo_backup_parameter="--uri=${MONGO_CUSTOM_URI}"
else
    mongo_backup_parameter="-d=${r_dbname} -h=${r_dbhost} --port=${r_dbport} ${mongo_user} ${mongo_pass}"
fi

In usr/local/bin/restore change:

mongorestore ${mongo_compression} -d=${r_dbname} -h=${r_dbhost} --port=${r_dbport} ${mongo_user} ${mongo_pass} --archive=${r_filename}

--->

mongorestore ${mongo_compression} ${mongo_backup_parameter} --archive=${r_filename}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant