Changing `--prefix` on existing backup

This isn’t anything critical - I’m just playing around with learning Duplicati and found that changing --prefix on an existing backup caused a Found # files that are missing from the remote storage, and no files with the backup prefix My_Test , but found the following backup prefixes: duplicati.

This wasn’t too unexpected so I went ahead and renamed all my backup files to start with My_Test instead of duplicati and this time I ended up getting an Found # remote files that are not recorded in local storage, please run repair error.

So I decided to run repair via the Commandline... GUI and got an error (which I’ve detailed here.

So my questions are:

  1. How stupid is it try and change --prefix on an existing backup? :wink:
  2. Is it something that should be supported?
  3. If not, should a message be added to the parameter field warning people it’s not set up for already existing backups?

Oh - and speaking of the --prefix field, I tried blanking the field and instead of the default duplicati value returning (as I expected) the value true appeared. So I guess that might be a legitimate “bug”.

Again, this is just me testing/playing so if this is all working as designed that’s a perfectly valid answer.

1 Like

The --prefix option is meant to support multiple backups in the same directory, but I’ve found that most people have a hard time keeping things separated, so I recommend that you do not use --prefix if you can avoid it.

The problem when changing the prefix like you did, is that the database stores each filename in the database to guard against changes on the destination. When you rename the files, you trigger this guarding operation.

You can use the repair command to recreate the database, and it will rebuild the local database using the filenames found on the remote destination.

Anything that confuses should be fixed, but I think we should stick to the “do not modify the remote destination” rule.

Yes, that really sounds like a bug, but I think it should not be possible to set an empty prefix as that makes it hard to parse the filenames reliably.

I agree on the “use folders, not prefix” being STRONGLY suggested, and for blanking the prefix I wasn’t actually trying to use a blank prefix, I just assumed the default “duplicati” (normally shown in grey text) would be re-filled in.

Either way, you’ve answered my question so I’ll go ahead and close this out. Thanks!