I've found that juju-backup-all seems to fail on some clouds unless the --exclude-controller-backup flag is provided. The reason for this is because of capped collections.
Here is some example log output demonstrating what I mean:
2022-02-28 22:39:23,882 INFO jujubackupall.backup [foundations-maas] Attempt #1 for controller backup.
2022-02-28 22:39:25,635 WARNING jujubackupall.backup [foundations-maas] Attempt #1 Encountered controller backup error: while creating backup archive: while dumping juju state database: error dumping databases: error executing "/usr/bin/mongodump": 2022-02-28T22:39:24.635+0000 writing admin.system.users to ; 2022-02-28T22:39:24.636+0000 done dumping admin.system.users (4 documents); 2022-02-28T22:39:24.636+0000 writing admin.system.version to ; 2022-02-28T22:39:24.637+0000 done dumping admin.system.version (2 documents); 2022-02-28T22:39:24.639+0000 writing juju.statuseshistory to ; 2022-02-28T22:39:24.639+0000 writing juju.txns.log to ; 2022-02-28T22:39:24.639+0000 writing logs.logs.ef862f25-5b40-498c-84f3-eb1351e3ca41 to ; 2022-02-28T22:39:24.639+0000 writing logs.logs.b77c7406-5dfa-42fc-8968-e69608a00f9c to ; 2022-02-28T22:39:25.084+0000 done dumping juju.txns.log (77363 documents); 2022-02-28T22:39:25.085+0000 writing logs.logs.fdc2418f-364b-4098-80ab-4514d33d842a to ; 2022-02-28T22:39:25.236+0000 done dumping logs.logs.ef862f25-5b40-498c-84f3-eb1351e3ca41 (72964 documents); 2022-02-28T22:39:25.236+0000 writing juju.txns.prune to ; 2022-02-28T22:39:25.287+0000 done dumping juju.txns.prune (9010 documents); 2022-02-28T22:39:25.287+0000 writing juju.settings to ; 2022-02-28T22:39:25.431+0000 done dumping juju.settings (4791 documents); 2022-02-28T22:39:25.431+0000 writing juju.linklayerdevices to ; 2022-02-28T22:39:25.481+0000 done dumping juju.linklayerdevices (4172 documents); 2022-02-28T22:39:25.481+0000 writing juju.linklayerdevicesrefs to ; 2022-02-28T22:39:25.520+0000 done dumping juju.linklayerdevicesrefs (4172 documents); 2022-02-28T22:39:25.520+0000 writing juju.statuses to ; 2022-02-28T22:39:25.554+0000 done dumping juju.statuses (3484 documents); 2022-02-28T22:39:25.554+0000 writing juju.relationscopes to ; 2022-02-28T22:39:25.591+0000 done dumping juju.relationscopes (3432 documents); 2022-02-28T22:39:25.591+0000 writing blobstore.blobstore.chunks to ; 2022-02-28T22:39:25.627+0000 Failed: error writing data for collection logs.logs.b77c7406-5dfa-42fc-8968-e69608a00f9c to disk: error reading collection: Executor error during find command: CappedPositionLost: CollectionScan died due to position in capped collection being deleted. Last seen record id: RecordId(2350072969);
I've found that juju-backup-all seems to fail on some clouds unless the --exclude-controller-backup flag is provided. The reason for this is because of capped collections.
Here is some example log output demonstrating what I mean:
2022-02-28 22:39:23,882 INFO jujubackupall.backup [foundations-maas] Attempt #1 for controller backup. 2022-02-28 22:39:25,635 WARNING jujubackupall.backup [foundations-maas] Attempt #1 Encountered controller backup error: while creating backup archive: while dumping juju state database: error dumping databases: error executing "/usr/bin/mongodump": 2022-02-28T22:39:24.635+0000 writing admin.system.users to ; 2022-02-28T22:39:24.636+0000 done dumping admin.system.users (4 documents); 2022-02-28T22:39:24.636+0000 writing admin.system.version to ; 2022-02-28T22:39:24.637+0000 done dumping admin.system.version (2 documents); 2022-02-28T22:39:24.639+0000 writing juju.statuseshistory to ; 2022-02-28T22:39:24.639+0000 writing juju.txns.log to ; 2022-02-28T22:39:24.639+0000 writing logs.logs.ef862f25-5b40-498c-84f3-eb1351e3ca41 to ; 2022-02-28T22:39:24.639+0000 writing logs.logs.b77c7406-5dfa-42fc-8968-e69608a00f9c to ; 2022-02-28T22:39:25.084+0000 done dumping juju.txns.log (77363 documents); 2022-02-28T22:39:25.085+0000 writing logs.logs.fdc2418f-364b-4098-80ab-4514d33d842a to ; 2022-02-28T22:39:25.236+0000 done dumping logs.logs.ef862f25-5b40-498c-84f3-eb1351e3ca41 (72964 documents); 2022-02-28T22:39:25.236+0000 writing juju.txns.prune to ; 2022-02-28T22:39:25.287+0000 done dumping juju.txns.prune (9010 documents); 2022-02-28T22:39:25.287+0000 writing juju.settings to ; 2022-02-28T22:39:25.431+0000 done dumping juju.settings (4791 documents); 2022-02-28T22:39:25.431+0000 writing juju.linklayerdevices to ; 2022-02-28T22:39:25.481+0000 done dumping juju.linklayerdevices (4172 documents); 2022-02-28T22:39:25.481+0000 writing juju.linklayerdevicesrefs to ; 2022-02-28T22:39:25.520+0000 done dumping juju.linklayerdevicesrefs (4172 documents); 2022-02-28T22:39:25.520+0000 writing juju.statuses to ; 2022-02-28T22:39:25.554+0000 done dumping juju.statuses (3484 documents); 2022-02-28T22:39:25.554+0000 writing juju.relationscopes to ; 2022-02-28T22:39:25.591+0000 done dumping juju.relationscopes (3432 documents); 2022-02-28T22:39:25.591+0000 writing blobstore.blobstore.chunks to ; 2022-02-28T22:39:25.627+0000 Failed: error writing data for collection
logs.logs.b77c7406-5dfa-42fc-8968-e69608a00f9c
to disk: error reading collection: Executor error during find command: CappedPositionLost: CollectionScan died due to position in capped collection being deleted. Last seen record id: RecordId(2350072969);Imported from Launchpad using lp2gh.
date created: 2022-02-28T22:44:39Z
owner: vultaire
assignee: None
the launchpad url