Can't reuse a backup folder after delete

Hi everyone!

After I’ve done an encrypted local backup I delete the local directory with sudo rm -r <encrypted_backup_dir> . The problem is if I try to reuse the same path to save another backup, it fails.

What is the proper way to delete a backup? I tried purge option, but it didn’t work. I am using Duplicati from cli on a linux system.

Thanks!

Welcome to the forums i014n.

You need to make a new backup job, you can reuse the same folder but all of the .dblock, .dlist and .dindex files need to be removed from that folder prior to setting up the new job.

Fails how? Message?

No GUI used for any part of that? Entirely hand-made command line? Do you give a –dbpath?

If no dbpath, the database path is implied by the destination URL, so would object to leftovers.

GUI makes it easy. You can delete a backup, its database, and the destination data all at once.
For CLI, you deleted destination, but should delete either your --dbpath database, or find it in
~/.config/Duplicati/dbconfig.json which is a text file if you prefer to edit things carefully.

Another option is to bypass the lookup, abandon the old database, and set your own --dbpath.
Regardless, destination file contents and the local database that describes it must be matching.

It tell me that I need to run repair option.

Yes, I am using it entirely from cli. And about the argument --dbpath, I wasn’t using it.

Thank you, I’ll look in the database configuration and modify it.

Thank, but it wasn’t the answer I was expected for.

If your goal is to “start over” with a backup, I think you only missed one step. After deleting all the remote files, you simply need to delete the local job sqlite database. The next time you run the job, Duplicati will see there is no local job database or any files on the remote side, so it will behave as if it’s the first backup.

But why would you want to have Duplicati doing a first backup every time? Pretty much defeats the purpose and most of the benefits of using Duplicati if these are just one off file copies.

This does not seem like typical usage for Duplicati, why are you deleting the folders?