2 added 711 characters in body
source | link

I've setup a backup script on my Ubuntu box using mongodump. However this currently doesn't work because of an error when attempting to dump the built in config database:

enter image description here

(Apologies for the image, I couldn't copy paste from the terminal I used)

How can I fix this? I either need to add the right permissions to my user, or exclude the config database. Ideally I'd like mongodump to ignore errors on any particular database so I still get a useful backup.

Here is the user I'm using to login as, as defined in the admin database:

{
    "_id" : "admin.admin",
    "userId" : UUID("b1928c55-fbaa-4196-9e7c-93e9139501ed"),
    "user" : "admin",
    "db" : "admin",
    "roles" : [ 
        {
            "role" : "userAdminAnyDatabase",
            "db" : "admin"
        }, 
        {
            "role" : "dbAdminAnyDatabase",
            "db" : "admin"
        }, 
        {
            "role" : "readWriteAnyDatabase",
            "db" : "admin"
        }
    ],
    "mechanisms" : [ 
        "SCRAM-SHA-1", 
        "SCRAM-SHA-256"
    ]
}

I've setup a backup script on my Ubuntu box using mongodump. However this currently doesn't work because of an error when attempting to dump the built in config database:

enter image description here

(Apologies for the image, I couldn't copy paste from the terminal I used)

How can I fix this? I either need to add the right permissions to my user, or exclude the config database. Ideally I'd like mongodump to ignore errors on any particular database so I still get a useful backup.

I've setup a backup script on my Ubuntu box using mongodump. However this currently doesn't work because of an error when attempting to dump the built in config database:

enter image description here

(Apologies for the image, I couldn't copy paste from the terminal I used)

How can I fix this? I either need to add the right permissions to my user, or exclude the config database. Ideally I'd like mongodump to ignore errors on any particular database so I still get a useful backup.

Here is the user I'm using to login as, as defined in the admin database:

{
    "_id" : "admin.admin",
    "userId" : UUID("b1928c55-fbaa-4196-9e7c-93e9139501ed"),
    "user" : "admin",
    "db" : "admin",
    "roles" : [ 
        {
            "role" : "userAdminAnyDatabase",
            "db" : "admin"
        }, 
        {
            "role" : "dbAdminAnyDatabase",
            "db" : "admin"
        }, 
        {
            "role" : "readWriteAnyDatabase",
            "db" : "admin"
        }
    ],
    "mechanisms" : [ 
        "SCRAM-SHA-1", 
        "SCRAM-SHA-256"
    ]
}
1
source | link

Mongo: mongodump and the config database error

I've setup a backup script on my Ubuntu box using mongodump. However this currently doesn't work because of an error when attempting to dump the built in config database:

enter image description here

(Apologies for the image, I couldn't copy paste from the terminal I used)

How can I fix this? I either need to add the right permissions to my user, or exclude the config database. Ideally I'd like mongodump to ignore errors on any particular database so I still get a useful backup.