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.
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.
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?
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.
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?
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?
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.
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.
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
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…