Skip to content

Commit 4f842a9

Browse files
authored
Add dbOwner role for _restore database to mongo-init.sh script
When restoring an installation from backup, the unifi network application tries to drop the `${MONGODB_DBNAME}_restore` database, which fails because the user used to authenticate with MonboDB doesn't have the permissions to do so.
1 parent baf10c1 commit 4f842a9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

readme-vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ app_setup_block: |
7979
roles: [
8080
{ db: "${MONGO_DBNAME}", role: "dbOwner" },
8181
{ db: "${MONGO_DBNAME}_stat", role: "dbOwner" },
82-
{ db: "${MONGO_DBNAME}_audit", role: "dbOwner" }
82+
{ db: "${MONGO_DBNAME}_audit", role: "dbOwner" },
83+
{ db: "${MONGO_DBNAME}_restore", role: "dbOwner" }
8384
]
8485
})
8586
EOF

0 commit comments

Comments
 (0)