We faced this issue again today. And it appeared that there is a more straightforward workaround available - just rerun this command couple of times and it works. And Bootstack team has used this approach successfully for some time. We got this output today
```
$juju create-backup
ERROR while creating backup archive: while dumping juju state database: error dumping databases: error executing "/usr/bin/mongodump": 2022-11-16T13:50:06.601+0000 writing admin.system.users to ; 2022-11-16T13:50:06.602+0000 done dumping admin.system.users (4 documents); 2022-11-16T13:50:06.603+0000 writing admin.system.version to ; 2022-11-16T13:50:06.604+0000 done dumping admin.system.version (2 documents); 2022-11-16T13:50:06.605+0000 writing juju.statuseshistory to ; 2022-11-16T13:50:06.605+0000 writing logs.logs.d8f110a4-7bdd-48b8-8231-72af1152f2a8 to ; 2022-11-16T13:50:06.606+0000 writing logs.logs.667d1c03-b40a-4836-8a09-645f5b83da44 to ; 2022-11-16T13:50:06.606+0000 writing juju.txns.log to ; 2022-11-16T13:50:07.465+0000 done dumping logs.logs.d8f110a4-7bdd-48b8-8231-72af1152f2a8 (78230 documents); 2022-11-16T13:50:07.465+0000 writing logs.logs.1d5c3328-ea4a-4fda-830c-6d25724e8140 to ; 2022-11-16T13:50:07.697+0000 Failed: error writing data for collection `juju.txns.log` 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(39255325);
```
And after that we tried a couple more times to run `$ juju create-backup` and it worked.
Hi,
We faced this issue again today. And it appeared that there is a more straightforward workaround available - just rerun this command couple of times and it works. And Bootstack team has used this approach successfully for some time. We got this output today mongodump" : 2022-11- 16T13:50: 06.601+ 0000 writing admin.system.users to ; 2022-11- 16T13:50: 06.602+ 0000 done dumping admin.system.users (4 documents); 2022-11- 16T13:50: 06.603+ 0000 writing admin.system. version to ; 2022-11- 16T13:50: 06.604+ 0000 done dumping admin.system. version (2 documents); 2022-11- 16T13:50: 06.605+ 0000 writing juju.statuseshi story to ; 2022-11- 16T13:50: 06.605+ 0000 writing logs.logs. d8f110a4- 7bdd-48b8- 8231-72af1152f2 a8 to ; 2022-11- 16T13:50: 06.606+ 0000 writing logs.logs. 667d1c03- b40a-4836- 8a09-645f5b83da 44 to ; 2022-11- 16T13:50: 06.606+ 0000 writing juju.txns.log to ; 2022-11- 16T13:50: 07.465+ 0000 done dumping logs.logs. d8f110a4- 7bdd-48b8- 8231-72af1152f2 a8 (78230 documents); 2022-11- 16T13:50: 07.465+ 0000 writing logs.logs. 1d5c3328- ea4a-4fda- 830c-6d25724e81 40 to ; 2022-11- 16T13:50: 07.697+ 0000 Failed: error writing data for collection `juju.txns.log` 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(39255325);
```
$juju create-backup
ERROR while creating backup archive: while dumping juju state database: error dumping databases: error executing "/usr/bin/
```
And after that we tried a couple more times to run `$ juju create-backup` and it worked.