OK to change prefix on existing backup?

If I change the ‘prefix’ setting on an existing backup, does duplicati start mixing in new-prefix files with the existing old ones? Eventually all the old ones would version out, but… no hurry.

Or is this something to set only on new backups?

It doesn’t seem very straight forward. There are a few threads in the forum about it. Here’s a post from the main developer: Changing `--prefix` on existing backup - #2 by kenkendk

Hope this helps!

OK I see what happened there. He changed the prefix from the default duplicati- to my_prefix- and the software started expecting ALLLLL the files to be called my_prefix-whatever.

So it seems that wisdom is on the side of setting a prefix when you create a new backup, and leaving it alone thereafter.

Yeah, may not be worth the trouble to try and change this setting on an existing backup.

But I think the best thing is to never use this option in the first place and store backups in separate folders. It may not be possible with some backends, I suppose, so the prefix option could be useful there.

1 Like

I do store backups in different folders anyway but I was just thinking, “What if somehow they all got mixed in together? Having different prefixes would sort them out.”

Also: sometimes I am running jobs to sync copies of backups to offsite destinations, etc. This would show me which backup it’s working on when I am tracking the output of such a task.

If it’s worth the trouble and some added risk, and the destination is one that allows bulk renames (maybe with appropriate tool), you can do bulk renames then either Repair database after renaming old one, or attempt an advanced maneuver that seemed to work when I tried it with DB Browser for SQLite, where a Remotevolume table search-and-replace made the DB Name columns match the renamed files. Test well.

Or just live with prefixes you have now. Changing folder names is simple. Changing prefix names is tricky. There’s no history of previously used prefixes for the backups. It’s one at a time, and DB must match files.

Sounds like the sync only shows the file names. If it showed more path information, you’d know the folder. Path names can be long, but depending on OS, tools, and scripting, are sometimes quite easy to shorten.

2 Likes