# Elasticsearch register backup repository with different UID and GID

**URL:** <https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [June 28, 2021, 11:30am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212 "2021-06-28T11:30:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![KA3AXCTAH](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@KA3AXCTAH](https://discuss.elastic.co/u/KA3AXCTAH)\
**Post date:** [June 28, 2021, 11:30am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212/1 "2021-06-28T11:30:16Z")

</div>

I have 2 Elasticsearch clusters they are backed up to the same NFS share, but in different directories and the elasticsearch user on these VMs has different UIDs and GIDs For example, for the corn project, the elasticsearch user has the following id `elasticsearch: x: 1000: 1000` and for the project a bald pubis is `elasticsearch: x: 997: 993`

and I have a separate Elasticsearch cluster that I use to check recovery from backups, on it the Elasticsearch user has the following id `elasticsearch: x: 1000: 1000` and when registering a snapshot of the repository for the corn project there are no problems (because UID and GID are similar), but when registering a snapshot of the repository for the bald pubic project, there are problems, permission denied (Since the UID and GID are different)

Now I have a question, is it possible to somehow fix this without changing the GID and UID on the clusters?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 29, 2021, 4:14am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212/2 "2021-06-29T04:14:13Z")

</div>

Can you add both users into the common `elasticsearch` user group?

---

<div class="post-metadata">

**Author:** ![KA3AXCTAH](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@KA3AXCTAH](https://discuss.elastic.co/u/KA3AXCTAH)\
**Post date:** [June 29, 2021, 5:02am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212/3 "2021-06-29T05:02:22Z")

</div>

but the elasticsearch group already exists on both clusters

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 29, 2021, 5:55am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212/4 "2021-06-29T05:55:27Z")

</div>

Yes but can you make sure both of your Elasticsearch IDs are in that group that runs the NFS mount?

---

<div class="post-metadata">

**Author:** ![KA3AXCTAH](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@KA3AXCTAH](https://discuss.elastic.co/u/KA3AXCTAH)\
**Post date:** [June 29, 2021, 6:27am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212/5 "2021-06-29T06:27:41Z")

</div>

yeah, because elasticsearch user adds in elasticsearch group in installation process

---

<div class="post-metadata">

**Author:** ![KA3AXCTAH](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@KA3AXCTAH](https://discuss.elastic.co/u/KA3AXCTAH)\
**Post date:** [July 2, 2021, 4:09am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212/6 "2021-07-02T04:09:40Z")

</div>

is there any way to do this?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 2, 2021, 8:18am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212/7 "2021-07-02T08:18:18Z")

</div>

Yes, NFS lets you configure a [mapping for IDs](https://man7.org/linux/man-pages/man5/nfsidmap.5.html) so they can vary between the server and the various clients. I'm not familiar with the details of how to do this, nor do I know of any great docs on the subject, I just know that it's possible. I'd suggest trying to do that and maybe asking on a more NFS-focussed forum if you get stuck. Elasticsearch isn't doing anything magical with the repository, it's just reading and writing files, so the problems you're facing seem to be elsewhere in your system and the folks with the expertise to help you solve them might not visit this forum much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 30, 2021, 8:51am UTC](https://discuss.elastic.co/t/elasticsearch-register-backup-repository-with-different-uid-and-gid/277212/9 "2021-07-30T08:51:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
