# Dietpi-backup failing when backing up to Netgear ReadyNAS Duo

**URL:** https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602
**Category:** Troubleshooting
**Created:** [16 January 2023 15:52 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602 "2023-01-16T15:52:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [16 January 2023 15:52 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/1 "2023-01-16T15:52:20Z")

</div>

### Creating a bug report/issue

I really want to create a backup of my dietpi installation to my NAS, but can’t.

#### Required Information

- DietPi version | `cat /boot/dietpi/.version`  
G\_DIETPI\_VERSION\_CORE=8  
G\_DIETPI\_VERSION\_SUB=13  
G\_DIETPI\_VERSION\_RC=2  
G\_GITBRANCH=‘master’  
G\_GITOWNER=‘MichaIng’  
G\_LIVE\_PATCH\_STATUS[0]=‘applied’

- Distro version | `echo $G_DISTRO_NAME $G_RASPBIAN`  
buster 0

- Kernel version | `uname -a`  
Linux avberry 5.10.103-v8+ #1529 SMP PREEMPT Tue Mar 8 12:26:46 GMT 2022 aarch64 GNU/Linux

- SBC model | `echo $G_HW_MODEL_NAME` or (EG: RPi3)  
RPi 4 Model B (aarch64)

- Power supply used | (EG: 5V 1A RAVpower)  
OKDO Raspberry Pi 4 Power Supply

- SD card used | (EG: SanDisk ultra)  
SanDisk 32 GB

#### Additional Information (if applicable)

#### Steps to reproduce

1. Create NFS mount on Netgear ReadyNAS Duo
2. Create dietpi-backup config using the NFS mount
3. Attempt to create back-up

#### Expected behaviour

Back-up completes

#### Actual behaviour

Back-up hangs forever.

#### Extra details

I want to use dietpi-backup to create a backup and then I’ll take that back-up and copy it to the cloud using rclone and b2.

My RPi4 does not have enough space (12GB left) for a back-up (rsync dry-run says 15GB needed). So I tried to back-up to a mounted NAS (Netgear ReadyNAS Duo), but dietpi-backup mandates NFS be used. I created a new NFS mount, which is recognised, but backup never completes.

There are some rsync errors, which it seems to get past and begins copying files before hanging.

rsync: chown [some file] failed: Operation not permitted (1)

I’ve tried to troubleshoot this, but with no success. Previously when using rsync no with dietpi these errors were ignored and the files all copied successfully.

Digging deeper I think there is a sync problem with NFS, but I don’t understand that.  
dmesg gives me this

[12568.797732] NFS: Server 192.168.1.2 reports our clientid is in use  
[12568.797766] NFS: state manager: lease expired failed on NFSv4 server 192.168.1.2 with error 1

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [16 January 2023 16:15 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/2 "2023-01-16T16:15:19Z")

</div>

Did you checked logs from NFS server side? Are there any? If found a couple if similar messages on the web. Most of them are talking about lost connections or NFS server reboots.

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [16 January 2023 16:16 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/3 "2023-01-16T16:16:48Z")

</div>

I’m not sure I can get access to the logs. There was a time I had SSH access to the NAS, but they close that loophole to get access and now I think I’m left with the Web UI.  
Let me see if that offers logs and/or if there is a network share with logs available.

---

<div class="post-metadata">

### Author: ![StephanStS](https://dietpi.com/forum/user_avatar/dietpi.com/stephansts/32/2522_2.png) [@StephanStS](https://dietpi.com/forum/u/StephanStS)
#### Post date: [16 January 2023 16:25 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/4 "2023-01-16T16:25:37Z")

</div>

Can you access the NAS via simple cp procedures from your Pi without problems?

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [16 January 2023 16:32 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/5 "2023-01-16T16:32:05Z")

</div>

These are all the logs I can access, there are no errors when I search each one for NFS only start up logging.

afp.log httpd\_access.log  
boot\_info.log httpd\_errors.log  
command.log hwmon\_info.log  
daemon.log itunes.log  
diagnostics.log kernel.log  
disk\_identify.log local\_commands.log  
disk\_smart.log mem\_info.log  
disk\_smart\_2022\_11\_13.log memory\_spd.log  
disk\_smart\_2022\_11\_20.log mounts.log  
disk\_smart\_2022\_11\_27.log msmtp.log  
disk\_smart\_2022\_12\_04.log network\_settings.log  
disk\_smart\_2022\_12\_11.log nmbd.log  
disk\_smart\_2022\_12\_18.log partition.log  
disk\_smart\_2022\_12\_25.log pci\_devices.log  
disk\_smart\_2023\_01\_01.log processes.log  
disk\_smart\_2023\_01\_08.log raid.conf  
disk\_smart\_2023\_01\_15.log raidiator\_version.log  
disk\_usage.log remote.log  
dmesg.log services.conf  
ecounter.log smbd.log  
ecounter\_2021\_05\_19\_2333.log spool.log  
ecounter\_2021\_07\_17\_1306.log spool\_error.log  
ecounter\_2022\_07\_02\_0810.log status-old.log  
ecounter\_2022\_10\_20\_2008.log system.log  
ecounter\_2023\_01\_16\_1220.log upnp-av.log  
enclosure.log usb\_devices.log  
etc-ls.log usb\_storage.conf  
fan\_setting\_last user.log  
fan\_setting\_min volume.log  
fs\_check.log xraid\_config.log

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [16 January 2023 16:35 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/6 "2023-01-16T16:35:05Z")

</div>

> [@StephanStS](#):
>
> Can you access the NAS via simple cp procedures from your Pi without problems?

I can copy files and access files on the NFS mount to the NAS fine although I’ve not tried to copy a huge file to stress test it.

There are some rsync errors, which it seems to get past and begins copying files before hanging.

rsync: chown [some file] failed: Operation not permitted (1)

I’ve tried to troubleshoot this, but with no success. Previously when using rsync (not with dietpi) these errors were ignored and the files all copied successfully.

When running dietpi-backup the rsync commands copy files across correctly and I can see them directly on the NAS, but then it hangs.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [16 January 2023 20:11 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/7 "2023-01-16T20:11:36Z")

</div>

> [@JohnnyM](#):
>
> rsync: chown [some file] failed: Operation not permitted (1)

hmm this usually happen if the NFS share was not correctly setup. Did you tried to create files and change the owner just for testing?

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [16 January 2023 20:41 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/8 "2023-01-16T20:41:52Z")

</div>

Whilst I can create files I have tried using chown myself. I will try this, thanks.

If you think the share wasn’t set up correctly perhaps I will also create a brand new share that is NFS only and try that.

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [16 January 2023 20:51 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/9 "2023-01-16T20:51:32Z")

</div>

I also can’t chown

dietpi@avberry:/mnt/readynas/work\_nfs $ chown dietpi dietpi-backup/  
chown: changing ownership of ‘dietpi-backup/’: Operation not permitted

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [16 January 2023 20:53 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/10 "2023-01-16T20:53:58Z")

</div>

Ensure you have setup the NFS share on server side with `root_squash` option.

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [16 January 2023 21:06 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/11 "2023-01-16T21:06:49Z")

</div>

I was [just reading about root\_squash](https://serverfault.com/questions/88114/cant-modify-or-chown-files-on-readynas-nfs-share).

I’m not sure if I’ll get any options when creating a new NFS share, but will look for them.

Would specifying in fstab uid and gid 0 be helpful if I can change things on the server. I only have a web UI to administer it.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [17 January 2023 07:22 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/12 "2023-01-17T07:22:32Z")

</div>

> [@JohnnyM](#):
>
> Would specifying in fstab uid and gid 0 be helpful

not sure if this will be helpful. Because you still need to have the possibility to change owner. rsync will need to copy all files with current permission and owner, as they are exist on the original source system.

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [17 January 2023 08:38 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/13 "2023-01-17T08:38:49Z")

</div>

> [@Joulinar](#):
>
> not sure if this will be helpful. Because you still need to have the possibility to change owner. rsync will need to copy all files with current permission and owner, as they are exist on the original source system.

Does rsync copy first and then change owner or can it do it in one?  
I wonder if not all users and groups with the same uid and gid exist on my NAS and if they did exist chown might not be needed. I can update the NAS with these if needed.  
You can tell my knowledge or rsync and NFS is minimal.

---

<div class="post-metadata">

### Author: ![StephanStS](https://dietpi.com/forum/user_avatar/dietpi.com/stephansts/32/2522_2.png) [@StephanStS](https://dietpi.com/forum/u/StephanStS)
#### Post date: [17 January 2023 09:30 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/14 "2023-01-17T09:30:30Z")

</div>

Could you post the contents of your exports file (on the NFS server) here?  
Could be /etc/exports or files within /etc/exports.d directory.

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [17 January 2023 10:25 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/15 "2023-01-17T10:25:20Z")

</div>

Thank, StephanStS

For those following, I have managed to gain access to the NFS server via ssh, which I could not do until today.

Here’s the exports file:

```auto
johnny:/etc# cat /etc/exports
"/nfs" *(insecure,insecure_locks,rw,async)
"/work" *(insecure,insecure_locks,rw,async)

```

/work was the original NFS share  
/nfs is a new share I created today to see if I could get things working with a freshly created NFS share

Both shares fail with dietpi-backup

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [17 January 2023 13:29 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/16 "2023-01-17T13:29:49Z")

</div>

> [@JohnnyM](#):
>
> `"/nfs" *(insecure,insecure_locks,rw,async)`

try to add `root_squash` as option to your export configuration and restart your NAS afterwards.

---

<div class="post-metadata">

### Author: ![StephanStS](https://dietpi.com/forum/user_avatar/dietpi.com/stephansts/32/2522_2.png) [@StephanStS](https://dietpi.com/forum/u/StephanStS)
#### Post date: [17 January 2023 14:32 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/17 "2023-01-17T14:32:04Z")

</div>

I am using  
`/mnt/raid *(rw,async,no_root_squash,fsid=0,crossmnt,no_subtree_check)`

I did not investigate further, whether a `(rw,async,root_squash,crossmnt,no_subtree_check)` would be better.

As far as I understand, your NFS setup is done via a GUI without editing the /etc/exports file directly.  
Maybe on your GUI you can select some of the options.

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [17 January 2023 14:48 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/18 "2023-01-17T14:48:30Z")

</div>

> [@Joulinar](#):
>
> > [@JohnnyM](#):
> >
> > `"/nfs" *(insecure,insecure_locks,rw,async)`
> 
> try to add `root_squash` as option to your export configuration and restart your NAS afterwards.

I was able to do that, but no change unfortunately.

> [@StephanStS](#):
>
> I am using  
> `/mnt/raid *(rw,async,no_root_squash,fsid=0,crossmnt,no_subtree_check)`
> 
> I did not investigate further, whether a `(rw,async,root_squash,crossmnt,no_subtree_check)` would be better.
> 
> As far as I understand, your NFS setup is done via a GUI without editing the /etc/exports file directly.  
> Maybe on your GUI you can select some of the options.

johnny:~# cat /etc/exports  
“/nfs” \*(root\_squash,insecure,insecure\_locks,rw,async)  
“/work” \*(insecure,insecure\_locks,rw,async)

@StephanStS I have now gained access to the /etc/exports file and made the change suggested above by @Joulinar (not success). You use no\_root\_squash and if I’m understanding correctly it’s root\_squash that’s causing my issue, so I will try with no\_root\_squash this time and perhaps later no\_all\_squash if that’s valid on my NFS instance.

---

<div class="post-metadata">

### Author: ![JohnnyM](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/j/91b2a8/32.png) [@JohnnyM](https://dietpi.com/forum/u/JohnnyM)
#### Post date: [17 January 2023 15:54 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/19 "2023-01-17T15:54:27Z")

</div>

Success! Thanks for being a great community and helping me work this out.

The root\_squash was the problem and I have now updated NFS to use no\_root\_squash.

johnny:/c/nfs# cat /etc/exports  
“/nfs” \*(no\_root\_squash,insecure,insecure\_locks,rw,async)  
“/work” \*(insecure,insecure\_locks,rw,async)

dietpi-backup now runs fine and all files are now with user=root and group=root.

I can now continue to back-up to the cloud and my RPi4 config is safer than it was.

---

<div class="post-metadata">

### Author: ![StephanStS](https://dietpi.com/forum/user_avatar/dietpi.com/stephansts/32/2522_2.png) [@StephanStS](https://dietpi.com/forum/u/StephanStS)
#### Post date: [17 January 2023 16:16 UTC](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602/20 "2023-01-17T16:16:47Z")

</div>

If you investigate on this issue a bit more to find a better solution without no\_root\_squash would be appreciated. As far as I know, no\_root\_squash is a bit more unsecure. The result could be a point which we could add to a documentation section “hardening NFS” (which we actually do not have, but I’d like to have it).

[Next page](https://dietpi.com/forum/t/dietpi-backup-failing-when-backing-up-to-netgear-readynas-duo/15602.md?page=2)
