Backing up DietPi to NAS drive

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Crake
Posts: 16
Joined: Mon Apr 13, 2020 7:01 pm

Re: Backing up DietPi to NAS drive

Post by Crake »

Joulinar wrote: Sun Dec 27, 2020 4:11 pm That is what this solution is about. To have a NFS share mounted
Already created on My Qnap NAS, gave all the permissions, but...tried everything bu i simply can-t Access/Mount it on Drive Manager!
So annoying...
Any other ideas, please?
User avatar
Joulinar
Posts: 3131
Joined: Sat Nov 16, 2019 12:49 am

Re: Backing up DietPi to NAS drive

Post by Joulinar »

on your Qnap NA, do you create a CIFS share or a NFS share? What option you use on dietpi-drive_manager to mount the network share?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Crake
Posts: 16
Joined: Mon Apr 13, 2020 7:01 pm

Re: Backing up DietPi to NAS drive

Post by Crake »

Joulinar wrote: Sun Dec 27, 2020 9:18 pm on your Qnap NA, do you create a CIFS share or a NFS share? What option you use on dietpi-drive_manager to mount the network share?
On Qnap i have created a NFS share folder, named it "DietPi" and like i told you before, gave all the permissions.
On drive manager i chose "Add network drive" and then "NFS".
Next gave the ip address/share folder.

Any thoughts what can be wrong?

Btw, no matter what, i thank you very much🙏
User avatar
Joulinar
Posts: 3131
Joined: Sat Nov 16, 2019 12:49 am

Re: Backing up DietPi to NAS drive

Post by Joulinar »

can you try to mount the NFS export manually

Code: Select all

mount <nfs_server_ip>:/server/export /mnt/nfs_client
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Crake
Posts: 16
Joined: Mon Apr 13, 2020 7:01 pm

Re: Backing up DietPi to NAS drive

Post by Crake »

Joulinar wrote: Sun Dec 27, 2020 11:27 pm can you try to mount the NFS export manually

Code: Select all

mount <nfs_server_ip>:/server/export /mnt/nfs_client
I guess no...
Watch the print screen
Attachments
IMG_20201228_134108.jpg
User avatar
Joulinar
Posts: 3131
Joined: Sat Nov 16, 2019 12:49 am

Re: Backing up DietPi to NAS drive

Post by Joulinar »

well your mount command seems to be wrong. Looks like you are trying to have /mnt/Backup as target directory. But it is not existing. Pls ensure to have the directory created before.

As well server/export was just an example for an exported NFS directory. It would need to be replaced by your own folder you have exported on your NAS.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Crake
Posts: 16
Joined: Mon Apr 13, 2020 7:01 pm

Re: Backing up DietPi to NAS drive

Post by Crake »

Joulinar wrote: Mon Dec 28, 2020 5:00 pm well your mount command seems to be wrong. Looks like you are trying to have /mnt/Backup as target directory. But it is not existing. Pls ensure to have the directory created before.

As well server/export was just an example for an exported NFS directory. It would need to be replaced by your own folder you have exported on your NAS.
Ok, sorry but i can't follow your thoughts!

I have a NFS folder created on My NAS and named it "DietPi". My NAS ip is 192.168.31.8.
Here, on dietpi machine i wat to name the NFS mounted as "Backup", so what am i supposed to do?

I tried this:
mount 192.168.31.8/DietPi /mnt/Backup

But didn't work again!
User avatar
Joulinar
Posts: 3131
Joined: Sat Nov 16, 2019 12:49 am

Re: Backing up DietPi to NAS drive

Post by Joulinar »

first you would need to create the Backup directory on DietPi (oif not already done)

Code: Select all

mkdir /mnt/Backup
and the mount should looks like this

Code: Select all

mount 192.168.31.8:/DietPi /mnt/Backup
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Crake
Posts: 16
Joined: Mon Apr 13, 2020 7:01 pm

Re: Backing up DietPi to NAS drive

Post by Crake »

Joulinar wrote: Mon Dec 28, 2020 10:58 pm first you would need to create the Backup directory on DietPi (oif not already done)

Code: Select all

mkdir /mnt/Backup
and the mount should looks like this

Code: Select all

mount 192.168.31.8:/DietPi /mnt/Backup
Joulinar, i really don't know how can i thank you enough!
It worked Man!!! Finally...Amazing!
You are the best.
Now i just need to search/learn how to schedule automatic backups to the NAS.
Thanks a lot, seriously. ;)

Update:
Didn't work:
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/lib/zlib_deflate" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/lib/zstd" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/mm" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net/6lowpan" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net/802" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net/8021q" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net/9p" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net/appletalk" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net/atm" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net/ax25" failed: Operation not permitted (1)
rsync: chown "/mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/net/batman-adv" failed: Operation not permitted (1)

It is very strange because it copied all the tree, created all the directories, but somehow there were files that gave these errors...
User avatar
Joulinar
Posts: 3131
Joined: Sat Nov 16, 2019 12:49 am

Re: Backing up DietPi to NAS drive

Post by Joulinar »

hmm looks like permission issues. You would need to compare source and target file system

Code: Select all

ls -la /lib/modules/5.4.79+/kernel/
ls -la /mnt/Backup/dietpi-backup/data/lib/modules/5.4.79+/kernel/
Which user you used to run dietpi-backup ?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply