# How to recover from aborted/stuck/crashed backup run?

**URL:** <https://forum.duplicati.com/t/how-to-recover-from-aborted-stuck-crashed-backup-run/17818>\
**Category:** Support\
**Created:** [April 26, 2024, 11:03am UTC](https://forum.duplicati.com/t/how-to-recover-from-aborted-stuck-crashed-backup-run/17818 "2024-04-26T11:03:17Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [April 29, 2024, 11:47am UTC](https://forum.duplicati.com/t/how-to-recover-from-aborted-stuck-crashed-backup-run/17818/15 "2024-04-29T11:47:34Z")

</div>

> [@redusr](#):
>
> For each of those backup runs, there is only one instance in which both messages do not appear in the same second (but about 5 seconds delayed).

It’s good to hear that the huge unexplainable gap isn’t common. I’m not enough of an expert dev to guess at where your hours of delay came from, although if it comes back again, you have new things you can check.

> [@redusr](#):
>
> Regarding the PRAGMA, I hope I will not need to use it but it could be a feature request to add an option in the Duplicati Web GUI to run it (maybe alternatively to a full repair?) or to do it even automatically if Duplicati can detect it has quit inproperly.

The forum is not a good issue tracker, but you can certainly see if it’s in GitHub [Issues](https://github.com/duplicati/duplicati/issues). If not, you can open.  
The way PRAGMA optimize is explained, it sounds like it’s very fast if it doesn’t actually have to run analyze. Running one at database opens might be quick, although there’s still a question of how well optimize works.

> [@redusr](#):
>
> Does that mean that also in case of an inproperly quit Duplicati, log entries up to that point should exist? Or are they affected by the rollback when restarting Duplicati?

The change makes some things that used to go only into the hard-to-find server log also go to usual job log, however I think the job log can still be lost in transaction rollback. Exact commit points are not documented.

> [@redusr](#):
>
> In the latter case, submitting log entries over a second connection and immediately committing them could maybe help?

SQLite only allows one writer at a time, I think, although I’m not sure when it’s enforced. Maybe at connect?

Also, wouldn’t commit apply to the whole database, including other changes which aren’t ready to commit?

This is something that worries me currently. Lots of concurrency, and each part commits as it feels a need. What happens if a good time for part A is a bad time for part B? Still looking at how the design handles that.

> [@redusr](#):
>
> in the GUI progress bar / status the currently performed step

The status bar is already too crowded for what it tries to show, so it has to use a variable display sequence. Posting specific internals details of SQL and such seems way too much to show, or to be comprehensible.

> [@redusr](#):
>
> could be a new/extended entry in About → System info that indicates more accurately then currently where the process is stuck.

This is where I thought the details could be hidden. Your idea of a combination approach might be workable, however it would be up to some developer (and they are scarce) to figure out what might be implemented…

> <https://github.com/duplicati/duplicati/issues/1174>
>
> This is a feature request for Duplicati 2.
> 
> Currently the backup status only sho…ws something like "137957 files (39.25 GB) to go". I would love to see what it's currently doing, e.g. archiving, encrypting, gartheting changes, uploading, downloading signatures, etc. Basically same sort of information that was available in Duplicati 1.
> 
> Currently, the only way to deduce the current status is by reading live logs, but they are too short (too few messages into the past) and hardly user-friendly.
> \## 
> 
> 
> \<bountysource-plugin\>
> 
> \---
> Want to back this issue? \*\*\[Post a bounty on it!\](https://www.bountysource.com/issues/5714406-duplicati-2-display-current-task-in-status?utm\_campaign=plugin&utm\_content=tracker%2F4870652&utm\_medium=issues&utm\_source=github)\*\* We accept bounties via \[Bountysource\](https://www.bountysource.com/?utm\_campaign=plugin&utm\_content=tracker%2F4870652&utm\_medium=issues&utm\_source=github).
> \</bountysource-plugin\>

shows some early thinking, although the bar of “a moment” or “a second” seems way too sensitive for large backups. The idea of “what it’s currently doing” is also old, as [2.0.3.6\_canary\_2018-04-23](https://github.com/duplicati/duplicati/releases/tag/v2.0.3.6-2.0.3.6_canary_2018-04-23) went concurrent.

> [@Channel Pipeline](https://forum.duplicati.com/t/channel-pipeline/11466):
>
> I’ve been trying to wrap my head around the pipeline that performs a backup. Partially to better understand how it decides what files to process and to look at ways to improve the abstract file IO setup since different parts of the app enumerate files differently. I’ve also noticed a significant number of exceptions related to trying to handle a directory as a file which just gets swept under the rug. The other thing that bugs me is this duplicate file enumeration in the pipeline to count files…

I’m still wishing there was a design document on concurrency, with transaction design that fits in properly.

Lacking that, I tried expanding my thinking in the channel pipeline topic into some pipelines. Main might be:

> FileEnumerationProcess.cs → SourcePaths → MetadataPreProcess.cs → ProcessedFiles → FilePreFilterProcess.cs → AcceptedChangedFile → FileBlockProcessor.cs → StreamBlock → StreamBlockSplitter.cs → OutputBlocks → DataBlockProcessor.cs → BackendRequest

and several of those (but not yet charted) are doing database actions and occasional commits-as-seen-fit.

---

_[View the full topic](https://forum.duplicati.com/t/how-to-recover-from-aborted-stuck-crashed-backup-run/17818)._
