# How to adopt existing repository?

**URL:** <https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433>\
**Category:** Support\
**Created:** [November 16, 2023, 4:07pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433 "2023-11-16T16:07:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ab03](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@ab03](https://kopia.discourse.group/u/ab03)\
**Post date:** [November 16, 2023, 4:07pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433/1 "2023-11-16T16:07:47Z")

</div>

I’ve reinstalled the VM which had my KopiaUI install. The setup was mounting folders from the host system as shared folders inside VMware.

My problem comes from not being able to make a snapshot to add to the existing repository snapshots, I only have the “New Snapshot” button. I’ve made sure that the folder paths are the same as in the old VM.

Could the problem be that the owner is a different computer name? And if so, what can I do to fix it?

To be able to see the repository, I need to change from “Local Snapshots” to “All Snapshots”, it’s the same for the config file.

At last, when I get it to work, how can I be sure that the new default policy won’t affect the existing repository and the snapshots? In the old VM I had set it up so snapshots never expire and I can’t risk losing the data.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [November 16, 2023, 4:11pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433/2 "2023-11-16T16:11:00Z")

</div>

> [@ab03](#):
>
> Could the problem be that the owner is a different computer name? And if so, what can I do to fix it?

> **[snapshot move-history](https://kopia.io/docs/reference/command-line/common/snapshot-move-history/)**
>
> $ kopia snapshot move-history \[destination\] Performs a move of the history of snapshots from another user or host. This command will move snapshot manifests of the specified source to the respective destination. This is typically used when renaming...

---

<div class="post-metadata">

**Author:** ![ab03](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@ab03](https://kopia.discourse.group/u/ab03)\
**Post date:** [November 16, 2023, 4:21pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433/3 "2023-11-16T16:21:41Z")

</div>

Thank you that worked, would there be a similar command to move over the config too? It just applied the default config to the repository.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [November 16, 2023, 4:30pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433/4 "2023-11-16T16:30:00Z")

</div>

Not aware of any easy way.

I would list old policies and based on it create new ones for new user:host

It would be easier from the start just connect to old repo using old username and host. No need to migrate anything.

So maybe move everything back and just reconnect.

But any actions like this I would try first on some test data. It is easy to mess up everything without any way back…

---

<div class="post-metadata">

**Author:** ![ab03](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@ab03](https://kopia.discourse.group/u/ab03)\
**Post date:** [November 16, 2023, 4:36pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433/5 "2023-11-16T16:36:53Z")

</div>

The old username and host doesn’t exist anymore as it’s a brand new VM.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [November 16, 2023, 4:39pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433/6 "2023-11-16T16:39:37Z")

</div>

As I understand it does not matter - what matters is what user:host you use for `kopia connect` - which by default is read from your environment but can be set explicitly.

Also in UI:

 ![image](https://global.discourse-cdn.com/free1/uploads/kopia/original/1X/0f594b58dd09e8cd96776e79c610d0fa06e9ced7.jpeg)

---

<div class="post-metadata">

**Author:** ![ab03](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@ab03](https://kopia.discourse.group/u/ab03)\
**Post date:** [November 16, 2023, 4:40pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433/7 "2023-11-16T16:40:52Z")

</div>

It seems after having restarted KopiaUI a few times, it now reflects the proper policy.

Thank you for the help.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [November 16, 2023, 4:42pm UTC](https://kopia.discourse.group/t/how-to-adopt-existing-repository/2433/8 "2023-11-16T16:42:18Z")

</div>

Good to know if I have to do the same one day:)
