# How are symlinks handled in Kopia?

**URL:** <https://kopia.discourse.group/t/how-are-symlinks-handled-in-kopia/1594>\
**Category:** Support\
**Created:** [December 1, 2022, 10:32pm UTC](https://kopia.discourse.group/t/how-are-symlinks-handled-in-kopia/1594 "2022-12-01T22:32:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![grace](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/grace/32/538_2.png) [@grace](https://kopia.discourse.group/u/grace)\
**Post date:** [December 1, 2022, 10:32pm UTC](https://kopia.discourse.group/t/how-are-symlinks-handled-in-kopia/1594/1 "2022-12-01T22:32:52Z")

</div>

I’m a little unclear about how Kopia handles symbolic links. Suppose I’m backing up my home directory, and the following symlinks exist:

- `~/a1 -> ~/a2`
- `~/b1 -> /nix/store/b2`

Will Kopia recognize that there is a symlink from `a1` to `a2`, and will that symlink be preserved on restore, or will `a1` be treated as another copy of `a2`?

How will `b1` be handled? Will `b2` (i.e. outside the home directory) be backed up, or will `b2` be stored as a dangling symlink to a path not in the backup? Does this change I have an ignore rule for `/nix`?

(My primary concern is that I use Nix as a build system, so there are a _lot_ of build outputs taking up lots of space I don’t want backed up. These outputs are all stored in directories in `/nix/store`, but there are symlinks to them scattered throughout my home directory with varying names).

Thanks!

---

<div class="post-metadata">

**Author:** ![stpr](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@stpr](https://kopia.discourse.group/u/stpr)\
**Post date:** [December 2, 2022, 9:56pm UTC](https://kopia.discourse.group/t/how-are-symlinks-handled-in-kopia/1594/2 "2022-12-02T21:56:29Z")

</div>

If I remember correctly, symlinks are not followed by default, so they are backed up as symlinks. They are restored while pointing to the original location (which may or may not exist).
