create-backup not working with default backup-dir
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Ian Booth |
Bug Description
juju create-backup
ERROR while creating backup archive: while dumping juju state database: rename /tmp/snap.
ERROR while creating backup archive: while dumping juju state database: rename /tmp/snap.
I found a workaround in https:/
Apparmor prevents the usage of /tmp
changing the backup-dir as suggested in 1959705 helps.
The purpose of this bug report is to promote a better default. e.g. backup-
Controller Version: 2.9.37
OS: jammy
Cloud/region: localhost/localhost
Changed in juju: | |
milestone: | 3.0.3 → 2.9.38 |
assignee: | nobody → Ian Booth (wallyworld) |
Changed in juju: | |
status: | Fix Committed → Fix Released |
The issue is that the juju-db snap doesn't have the right to access /tmp on the controller machine, so we should be staging the backup somewhere else, possibly /var/lib/ juju/backups, or something along those lines. Either that, or we should be giving juju-db access to tmp in the snap definition.