I got the 0.8.0-beta1 and ran benchmark on it. The new Blake3 hashing is way better than Blake2 on my hardware. It was introduced in 0.7.1, after I’ve created most of my repositories. I would imagine Kopia will keep introducing new algorithms in the future, so is there a way to “upgrade” repositories to use them?
I understand crypto and splitter could be tied to repository, so to “change” them I’d have to create a new one. So how would I create a new repository with all the policies and snapshotted directories copied over from the old repository? It can be very tedious task to manually copy and paste each policy.
Could Kopia allow changing the algorithms if user deletes all snapshots but keep all the configurations?
Also, I’d imagine one day some algorithms will become outdated or having security risk to use so Kopia would obsolete and eventually remove them. What will be the migration path for that scenario?
Hi CrendKing, Would you be able to document the steps you took to achieve this? I am reading snapshot migrate | Kopia and unsure what the right structure would be and/or steps of operations.
In example, do I have to create the repo first? - I assume yes.
Do I have to put the same parameters, same passwords/encryption key? - I assume yes, but your post seems to indicate that you can use different parameters, i.e. encryption / splitter and the migrate feature will work.
How does the decrypt/re-encrypt work, is it downloading everything from the first repo, does it stuff, then uploads the new chunks to the new repo?
How does the --sources work? Does it asks for Path? Hostnames? can I select specific an individual snapshot other than the “latest” or do I have to migrate fully?
I’d like to see & understand your end to end scenario to understand how I can re-use pieces for mine.
Snapshot migration works against destination repository (which must be connected and generally empty but that’s not strictly required).
You need to provide the configuration file for the old repository.
Typical usage is:
# connect to old repository
$ kopia repo connect —config-file=/tmp/old.config …
# create new repository in another location
$ kopia repo create …
# start the migration
$ kopia snapshot migrate —all —source-config=/tmp/old.config
# now manually delete data from old repository location
This will use old repository as if it were a file system and perform regular snapshots of all data and migrate all snapshot manifests and policies. It uses configuration for the new repository to determine which hash/encryption/splitter to use.
Awesome! Thanks for providing this content. It seems a little counter intuitive that kopia snapshot migrate only requires the “source” and not the destination… Especially if you have several connected repositories, it seemed unclear to me what destination would apply.
I will disconnect everything I have connected right now, and use your approach. Thanks again.
Thanks Jarek - would you be able to document the --source flag? Does it work by hostname? by snapshot ID? manifest? Please clarify how this can be used. Ideally, I’d like to move things only when necessary, i.e. one host at a time.
I’ve followed this instructions to try to migrate data encrypted using AES to a new repo using Chacha.
So I connected kopia to the AES-encrypted repo
[thib@ergaster ~]$ kopia repository connect s3 \
--bucket=my-bucket \
--access-key=REDACTED \
--secret-access-key=redacted \
--endpoint="s3.fr-par.scw.cloud" \
--config-file=/home/thib/old.config
Enter password to open repository:
Connected to repository.
NOTICE: Kopia will check for updates on GitHub every 7 days, starting 24 hours after first use.
To disable this behavior, set environment variable KOPIA_CHECK_FOR_UPDATES=false
Alternatively you can remove the file "/home/thib/old.config.update-info.json".
I then created a filesystem repo with the crypto parameters I needed
[thib@ergaster ~]$ kopia repo create filesystem \
--block-hash=BLAKE2B-256-128 \
--encryption=CHACHA20-POLY1305-HMAC-SHA256 \
--path=/home/thib/kopia_chacha
Enter password to create new repository:
Re-enter password for verification:
Initializing repository with:
block hash: BLAKE2B-256-128
encryption: CHACHA20-POLY1305-HMAC-SHA256
key derivation: scrypt-65536-8-1
splitter: DYNAMIC-4M-BUZHASH
Connected to repository.
And then I attempted to migrate the data from my old repo to the new one