Backing up DietPi to NAS drive

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Jimbroze
Posts: 4
Joined: Wed May 15, 2019 9:23 pm

Backing up DietPi to NAS drive

Post by Jimbroze »

I have a few machines running DietPi, one of which has an external drive attached. While that machine has no problem backing up to the attached drive, I've realised that dietpi-backup does not work over samba.

Can anyone tell me the easiest way to backup all DietPi machines to the same ext4 NAS drive? I assume one of the cloud/backup packages but could anyone recommend one? I'm not looking for anything fancy, just a lightweight package that can perform a regular scheduled backups from multiple servers.

Many thanks,
Jim
User avatar
MichaIng
Site Admin
Posts: 2418
Joined: Sat Nov 18, 2017 6:21 pm

Re: Backing up DietPi to NAS drive

Post by MichaIng »

@Jimbroze
Mount the samba share as drive to e.g. /mnt/samba. You can do that e.g. via dietpi-drive_manager > network drives.

Then start dietpi-backup and select /mnt/samba or some sub directory as target. That should work. Since rsync has some internal mechanism to sync to network resources directly, we plan to implement this to dietpi-backup in the future, so it would then be not required to mount the share.
Jimbroze
Posts: 4
Joined: Wed May 15, 2019 9:23 pm

Re: Backing up DietPi to NAS drive

Post by Jimbroze »

Thanks @MichaIng.
I tried that but it produces an error as the file system is listed as CIFS through the Samba share rather than EXT4. Could this be due to Samba settings?
User avatar
MichaIng
Site Admin
Posts: 2418
Joined: Sat Nov 18, 2017 6:21 pm

Re: Backing up DietPi to NAS drive

Post by MichaIng »

@Jimbroze
Ah sorry, forgot that of course dietpi-backup checks if the target file system supports UNIX permissions. Without backing up permissions, recovering the backup would lead to a broken system.

CIFS does not support permissions, that's indeed the problem. AFAIK with NFS it would be possible as long as the NFS server file system, where the share points to, supports UNIX permissions as well: ext4, F2FS, BTRFS and such.
Jimbroze
Posts: 4
Joined: Wed May 15, 2019 9:23 pm

Re: Backing up DietPi to NAS drive

Post by Jimbroze »

@MichaIng
After a bit of a hiatus I'm trying to achieve this again. NFS (using the dietpi-software NFS client and drive_manager) doesn't seem to work as it mounts the filesystem as "Web". Does it need to be mounted a different way?
User avatar
trendy
Posts: 142
Joined: Tue Feb 25, 2020 2:54 pm

Re: Backing up DietPi to NAS drive

Post by trendy »

I am doing the same among my dietpi devices.
Install NFS server and edit /etc/exports

Code: Select all

/mnt/backup/odroid 192.168.1.123(rw,async,no_root_squash,fsid=0,crossmnt,no_subtree_check)
Then on the client just mount from drive_manager with nfs client and use the path as a backup point.
Post Reply