https://teguhth.blogspot.com/2024/04/backup-restore-database-mongodb-using.html
1. console admin
mongosh -u admin -p admin --authenticationDatabase admin
[root@teguhth-all ~]# mongosh -u admin -p admin --authenticationDatabase admin
Current Mongosh Log ID: 69f05c29e551710562d805da
Connecting to: mongodb://<credentials>@127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&authSource=admin&appName=mongosh+2.8.1
Using MongoDB: 8.0.20
Using Mongosh: 2.8.1
mongosh 2.8.2 is available for download: https://www.mongodb.com/try/download/shell
For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
------
The server generated these startup warnings when booting
2026-04-28T14:01:22.306+07:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
2026-04-28T14:01:22.306+07:00: We suggest setting the contents of sysfsFile to 0.
2026-04-28T14:01:22.306+07:00: We suggest setting swappiness to 0 or 1, as swapping can cause performance problems.
------
test>
1. console admin
mongosh -u admin -p admin --authenticationDatabase admin
[root@teguhth-all ~]# mongosh -u admin -p admin --authenticationDatabase admin
Current Mongosh Log ID: 69f05c29e551710562d805da
Connecting to: mongodb://<credentials>@127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&authSource=admin&appName=mongosh+2.8.1
Using MongoDB: 8.0.20
Using Mongosh: 2.8.1
mongosh 2.8.2 is available for download: https://www.mongodb.com/try/download/shell
For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/
------
The server generated these startup warnings when booting
2026-04-28T14:01:22.306+07:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile
2026-04-28T14:01:22.306+07:00: We suggest setting the contents of sysfsFile to 0.
2026-04-28T14:01:22.306+07:00: We suggest setting swappiness to 0 or 1, as swapping can cause performance problems.
------
test>


















