Trouble renaming a repository

I’ve been running Duplicacy in the configuration for several years now. It’s been rock-solid and ultra-reliable. I love it and wouldn’t dream of using anything else. Why doesn’t everybody!? Anyway, when setting up, I made a mistake and I used the same string for repository-id and storage-id. And in this string, I embedded the storage type. Let’s say s3-rob-documents or something.

I’m now adding a second storage location for some of my backups, and my CDO is preventing me from using that repository-id for storage on an entirely different storage provider. Silly, I know, but it does.

I have two questions:

  1. I’m aware that a rename does not exist. I can’t seem to find any threads outlining the steps to go through to get it sorted.
  2. My setup has a FILE at .duplicacy which contains a single line that points to /opt/duplicacy/repository-id, which is a directory. But it seems sometimes a directory is expected at that .duplicacy instead. It all works just fine though. Ran into errors as I was trying to figure out the renaming.

Would appreciate any comments that could help me figure this out.
Thanks very much!

I don’t think I understand the question. If you are adding another storage to backup existing repository to, you are specifying another snapshot ID to be used on that storage:

And yes, you cannot rename existing snapshot ID if the storage is encrypted.

My understanding is:

  1. Repository ID is a label used to identify a specific source directory. In the preferences JSON, this is listed under “name” (I think, as, oddly, the “repository” field is empty for all my backup jobs).
  2. Snapshot ID is a label used to identify a backup job, so that a storage destination can store multiple backup jobs. In the preferences JSON, this is listed under “id”.
  3. Storage ID is a label for a configured storage configuration, including method and specific destination information such as login details, maybe destination buckets, whatever. In the preferences JSON, this is under “storage”.
  4. A backup job means you “back up a $repository on $storage as $snapshot”
  5. A backup job must contain only one repository.
  6. A backup job can be to multiple storage backends.
  7. A backup job can use either the same snapshot ID across multiple storage backends, or a different snapshot ID for each storage backend.

Lack of knowledge when setting up Duplicacy several years ago, had me set the “id” and “name” to something that includes the storage backend.

Let’s say this was “s3-rob-importantdata”. And now I’m adding a second storage location, I could make a new snapshot id “b2-rob-importantdata” to store on BackBlaze servers. I could, but I believe there are benefits to using the same snapshot id across multiple storage locations. So perhaps I would want to change the snapshot id to something more generic like “snapshot-rob-importantdata” or whatever? But you said this is not possible if the storage is encrypted.

Also, the repository id is, say, “s3-rob-importantdata”. And I would like to rename that to something like “repo-rob-importantdata” or whatever. I’m not sure this is at all possible.

So I think perhaps my conclusion should be: just remove all the configurations and start from scratch?

  1. “Repository” key defines a directory that is to be used as repository; useful if you want to initialize a repository somewhere else, as opposed to in the current directory
  2. Right.
  3. “storage” in preferences json is connection string to the storage. s3 URL, or path to a netwrok drive. Application refers to it by “name”, unless the name is "default’, in which case it can be omitted. This name is only meaninfgul in this preferences file.
  4. Backup job only exists in the context of web uil.
  5. By definitlion, yes, it backs up one repository to one storage with one snaphsot id (which is the value with key “id” in that file)
  6. No, backup job sends one repositoru to one destination as one snapshotID
  7. Yes

Right, the add command wants you to pick snapshot id:

NAME:
   duplicacy add - Add an additional storage to be used for the existing repository

USAGE:
   duplicacy add [command options] <storage name> <snapshot id> <storage url>

Maybe. But since your storage is encrypted, you cannot change its snapshot ID. So your options are only use the same, even though its meaing as read by a human would be misleading, or use different one, and lose benefits of copying the version histories between storages. You can still copy most of the data, and it will be deduplciated, so you will have separate histories – which is actually preferrable, to avoid three way copy confusion. If you backup to both from the same machine – you dont’ really need to copy between storages to begin with, so you can use diffent snapshot IDs.

Repository ID (i.le. “name” in the preferences file) is only used to refer to this blob of data when you tell duplciacy do do somthing. For example,. backup command needs -storage <storage name>

   -storage <storage name> 		backup to the specified storage instead of the default one

You can name it whatever you want, and use that whatever in your commands, Or name is “defautl” and omit -storage parameter. It is not use anywhere else.

Only snapshot ID is embedded into chunks, everythign else is only meaninfull locadlly.

No. I would create the storage on another provider with the same snapshot ID and not worry about what it says. it’s just a string. My snapshot IDs are “a”, “b”, “c”… because they are meaningless, and I can’t be arseed to come up with meaninful names.