By balaji10504
Hi Team, Myself balaji,
I tried to backup the mongodb database to s3 bucket, everything went well and good and the backup file stored in the s3 bucket also(security: disabled). But when i tried to backup the database by enabling the security in the mongod.conf file, am getting an error as mentioned below:
MongoDB server version: 4.2.9 { “ok” : 0, “errmsg” : “command fsync requires authentication”, “code” : 13, “codeName” : “Unauthorized” } please let me know where i did the mistake tq.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi Balaji,
To be able to use the fsync command with security enabled, you need to the hostManager role which comes with the admin user https://docs.mongodb.com/manual/reference/built-in-roles/#hostManager.
Run the fsync command while logged in as the admin user or another user with the admin role https://stackoverflow.com/a/57877333/4763270
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.