question

wolferl avatar image
wolferl asked

Backup VenusOS while running on PI3

Hi all

I'm trying to backup my installation on a regular basis without removing the SD card from the pi.

Plan is, to have a cron job running and do it either to a network drive or a connectied USB key.


I found a promising post with a script to do that. Unfortunately, I would need gdisk installed. As there is no apt-get on VenusOS and I'm not really a pro on linux, does anyone have a clue how to install the gdisk package with OPKG?

To backup over the network NFS or SMB clients would be necessary as well, couldn't figure out how to install them either...

The script and description can be found here:

https://blog.networkprofile.org/backup-a-running-raspberry-pi-to-truenas-or-any-smb-share/

thank you

wolferl

Venus OSRaspberry Pi
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

4 Answers
mr-manuel avatar image
mr-manuel answered ·

I have a script for that on other Raspberries, but unfortunately it do now work completely on Venus OS since I'm not able to mount a CIFS share. If someone can help me with that, I can share the complete script here.

The relevant part should work for you, if you know how to mount a USB drive.

dd if=/dev/mmcblk0 of=/path/to/backup/folder/backup.img bs=1MB status=progress

gpart is not needed.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

deadrabbit avatar image deadrabbit commented ·
​HI @mr-manuel ,


i want to do a full backup of the sd card on a nfs share via VPN.


Therefore i changed your skript to mount a nfs share.


I have the problem, that dd leads to a reboot of the RPI. This also occours if i only use dd in the command line. Any hints?


0 Likes 0 ·
Show more comments
wolferl avatar image
wolferl answered ·

the challenge with dd is, that, at least from my perspective, it is not sure what happens, if services are running. Is the backup than ok or not...

did you ever restore a backup mad with dd?


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mr-manuel avatar image
mr-manuel answered ·

Hello,

I'm using dd now since over 5 years to backup my Raspberries (about 20 pieces) and did over 30 restores, all successful. Probably it also depens which applications are running on the Raspberry.

I optimized my script and published it on GitHub, if you want to try it out. It works on Venus OS and other Raspberry Linuxes.

https://github.com/mr-manuel/raspberry-pi-backup

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

wolferl avatar image wolferl commented ·
Had a look at your script and you're at the point where I was also a few days ago: mounting a CIFS share. So far I got no answer if or how this is possible on VenusOS...

I will give dd a try and see...

thank you

0 Likes 0 ·
mr-manuel avatar image mr-manuel wolferl commented ·
It is possibe, I already did some tests :)
0 Likes 0 ·
wolferl avatar image
wolferl answered ·

Hi mr-manuel

I just downloaded the script and installed. Saw on github, that you included mount.cifs.
where did you get it from? I'd like to use mount.nfs, but I did not find it as I'm not a unix pro...

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mr-manuel avatar image mr-manuel commented ·
I just copied it from the Raspian image. I uploaded the mount.nfs on my repository, so you can download it.
1 Like 1 ·
wolferl avatar image wolferl mr-manuel commented ·
Thank you!
1 Like 1 ·
wolferl avatar image wolferl wolferl commented ·
tried it out, does not work. When I start mount.nfs nothing happens.

Working with mount.smb works, but does not allow symlinks, which I would like to use :-(

0 Likes 0 ·