# Rename hostname

**URL:** <https://kopia.discourse.group/t/rename-hostname/1431>\
**Category:** Support\
**Created:** [September 16, 2022, 5:48pm UTC](https://kopia.discourse.group/t/rename-hostname/1431 "2022-09-16T17:48:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![enboig](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@enboig](https://kopia.discourse.group/u/enboig)\
**Post date:** [September 16, 2022, 5:48pm UTC](https://kopia.discourse.group/t/rename-hostname/1431/1 "2022-09-16T17:48:37Z")

</div>

I have reinstalled my laptop and changed hostname; I connect it to a kopia server and I know I can manually change my login hostname to use the old one (and keep policies, etc…); but I would like to change the hostname used in the repo. Is there a way to do so?

Thanks

---

<div class="post-metadata">

**Author:** ![enboig](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@enboig](https://kopia.discourse.group/u/enboig)\
**Post date:** [September 16, 2022, 6:02pm UTC](https://kopia.discourse.group/t/rename-hostname/1431/2 "2022-09-16T18:02:32Z")

</div>

I just found [snapshot copy-history | Kopia](https://kopia.io/docs/reference/command-line/common/snapshot-copy-history/) but it is not clear if policy is also copied.

---

<div class="post-metadata">

**Author:** ![manfredlotz](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/manfredlotz/32/175_2.png) [@manfredlotz](https://kopia.discourse.group/u/manfredlotz)\
**Post date:** [September 20, 2022, 5:39pm UTC](https://kopia.discourse.group/t/rename-hostname/1431/3 "2022-09-20T17:39:40Z")

</div>

I think you can use: `kopia snapshot move-history <from-snapshot> <to-snapshot>` . Perhaps using `--dry-run` for a test first.

---

<div class="post-metadata">

**Author:** ![enboig](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@enboig](https://kopia.discourse.group/u/enboig)\
**Post date:** [November 14, 2022, 10:14am UTC](https://kopia.discourse.group/t/rename-hostname/1431/4 "2022-11-14T10:14:22Z")

</div>

I ended (long ago) copying history, and checking policies manually; just writing in case anybody ends here someday.

Thanks.
