NAS Bckup

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
g7kse
Posts: 9
Joined: Fri May 28, 2021 5:31 pm

NAS Bckup

Post by g7kse »

I'm getting myself in a right mess and can't work out what the problem is......

My dietpi server is spot on.Runs everything I need perfectly. But....I just can't seem to sort out a backup. I managed it before but I think when things changed it stopped working and for some reason I just can't seem to replicate /renew the settings. So here is the setup.

DietPi on RPi4
NAS is an older WD MyClou (slooooow but pretty robust)

Both connected to same network. NAS IP is 192.168.1.65
Folder to backup is...'Backup'

I can mount the drive using drive manager as a samba share but this is cifs and there are numerous references to this not working as a backup method. I can confirm it doesn't work :-)

Attempt to mount as nfs using driver manager. Put in IP address - 192.168.1.65 and mount name of Backup.I get standard message about NFSv3

Code: Select all

Your NFS server appears to support NFSv3 only. Mounting NFSv3 shares         │
│ requires the shares path server side to be entered.                          │
│                                                                              │
│ Please enter the absolute path to the share on the NFS server (eg:           │
│ /mnt/nfs_share). 
This is the bit I don't think I'm doing right....I put in many combinations of /mnt/Backup 192.168.1.65/mnt/Backup and allsorts of things but I think I'm not getting it as I always get a similar message of:

Error message is

Code: Select all

[FAILED] NFS mount failed with the following error output:
│ 
│ mount.nfs: mount(2): Protocol not supported
│ mount.nfs: mount(2): Protocol not supported
│ mount.nfs: mount(2): Protocol not supported
│ mount.nfs: trying 192.168.1.65 prog 100003 vers 3 prot TCP port 2049
│ mount.nfs: trying 192.168.1.65 prog 100005 vers 3 prot UDP port 41179
│ mount.nfs: mount(2): Permission denied
│ mount.nfs: access denied by server while mounting 192.168.1.65:/
│ mount.nfs: timeout set for Thu Oct  7 19:55:02 2021
│ mount.nfs: trying text-based options
│ 'port=2049,vers=4.2,addr=192.168.1.65,clientaddr=192.168.1.128'
│ mount.nfs: trying text-based options
│ 'port=2049,vers=4.1,addr=192.168.1.65,clientaddr=192.168.1.128'
│ mount.nfs: trying text-based options
│ 'port=2049,vers=4.0,addr=192.168.1.65,clientaddr=192.168.1.128'
│ mount.nfs: trying text-based options 'port=2049,addr=192.168.1.65'
│ mount.nfs: prog 100003, trying vers=3, prot=6
I'm sure its the last step that is the bit I'm just not getting. A frustrating evening last night with lots of googling ended with nowt.

Please put my out of my misery :-)
User avatar
Joulinar
Posts: 5998
Joined: Sat Nov 16, 2019 12:49 am

Re: NAS Bckup

Post by Joulinar »

Question, On your NAS WD MyClou you have activated NFS and you are sure it's correctly exported by your NAS? As well you have set correct permission for your DietPi device to allow the mount? Because you have permission issues

Code: Select all

│ mount.nfs: mount(2): Permission denied
│ mount.nfs: access denied by server while mounting 192.168.1.65:/
You could verify the NFS export as follow

Code: Select all

showmount -e <ip_of_your_nas>
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
g7kse
Posts: 9
Joined: Fri May 28, 2021 5:31 pm

Re: NAS Bckup

Post by g7kse »

That was the bit that really confused me as the folder is public

output from

Code: Select all

showmount -e
is

Code: Select all

/nfs/Public*
User avatar
Joulinar
Posts: 5998
Joined: Sat Nov 16, 2019 12:49 am

Re: NAS Bckup

Post by Joulinar »

Are you sure the NFS export has a star (*) at the end of the export name? /nfs/Public*

could you try following

Code: Select all

mkdir -p /mnt/nfs/public
mount -t nfs -o soft <ip_of_your_nas>:/nfs/Public* /mnt/nfs/public
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
g7kse
Posts: 9
Joined: Fri May 28, 2021 5:31 pm

Re: NAS Bckup

Post by g7kse »

Yeah it had a space
Screenshot from 2021-10-07 20-56-29.png
Screenshot from 2021-10-07 20-56-29.png (9.37 KiB) Viewed 88 times
I used the commands you listed but removed the * and it appears in the drive manager. I'll run a backup and make sure it is fine

Once again...you're a superstar. Ta
User avatar
Joulinar
Posts: 5998
Joined: Sat Nov 16, 2019 12:49 am

Re: NAS Bckup

Post by Joulinar »

ensure your NFS mount is shown in /etc/fstab file

The issue is drive manager is actually not able to handle sub path on NFS server exports. :roll:
Something we need to add still... ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
g7kse
Posts: 9
Joined: Fri May 28, 2021 5:31 pm

Re: NAS Bckup

Post by g7kse »

Ah ok.

Its not in there, just the previous cifs one

Code: Select all

//192.168.1.65/Public /mnt/WD cifs cred=/var/lib/dietpi/dietpi-drive_manager/mnt-WD.cred,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=3.1.1,nofail,noauto,x-systemd.automount
I assume I'll just append something like

Code: Select all

//192.168.1.65/Public /mnt/nfs nfs cred=/var/lib/dietpi/dietpi-drive_manager/mnt-WD.cred,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=3.1.1,nofail,noauto,x-systemd.automount
User avatar
Joulinar
Posts: 5998
Joined: Sat Nov 16, 2019 12:49 am

Re: NAS Bckup

Post by Joulinar »

nope, it should be following for NFS

Code: Select all

192.168.1.65:/nfs/Public /mnt/nfs nfs nofail,noauto,x-systemd.automount
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply