juju-db.mongodump snap gets permission denied when backup-dir is changed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Performing a backup after changing the backup-dir config fails with a permission denied from juju-db.mongodump:
$ juju create-backup --no-download
WARNING downloading backup archives is recommended; backups stored remotely are not guaranteed to be available.
ERROR while creating backup archive: while dumping juju state database: error dumping databases: error executing "/snap/
This is caused because juju-db snap confinement is strict, so the command fails even if triggered manually:
$ juju-db.mongodump --ssl --sslAllowInval
2022-02-
I was able to fix this by changing the confinement mode to classic and re-creating the snap. This can be upstreamed, but I'm not sure of the consequences of this.