Automatically recreate database before backup job

Is it possible to automatically recreate the database if it is broken? Currently it’s necessary to manually start the repair task from the webinterface.

Terminology is confusing, but these two things ARE kind of mixed. Which button are you talking about?


The REPAIR command

Tries to repair the backup. If no local database is found or the database is empty, the database is re-created with data from the storage.

What sort of problems are you having? If the database is breaking a lot, it’d be better to try to avoid that, because repair in general is not capable of repairing every possible problem. Or is it covering all yours?

There’s also a subtle distinction between DB having internal issues versus disagreeing with the remote.

I try to find a way to backup to multiple USB drives. After the drive are changed the database is, of course, broken. So it needs to repaired. Therefore I search a solution to automatically trigger the repair and or recreate whatever leads to the desired behavior to start the backup automatically.

This won’t really work. A given Duplicati job is tied to a particular destination. It’s not just the database.


Incremental backups
Duplicati performs a full backup initially. Afterwards, Duplicati updates the initial backup by adding the changed data only.

What this means is that the unchanged data is expected to be in the backup, and it won’t be if you use a different drive. There are some forum posts from people who’ve tried to set up a USB drive rotation, but there’s still a need to have a backup per drive. One can create the near-clone by Export, Import, and edit.

Beyond that it becomes a question of how you want to schedule your multiple drives, and how to prevent accidents if you don’t rotate on schedule. You can search for forum posts on this. One example is below:

Backing up to multiple USB or external drives?