Remote SD Backups

Hi all, does anyone implement remote backups whilse their feeder is still running, say backing up full SD card over network to a NAS or windows share folder in the form of an image should the need arise to replace a corrupt card.

Yup, this:

My feeders back up to my NAS on a weekly basis, I’ve not had to restore them but I’ve restored other Raspberry Pis and it’s worked perfectly.

/edited for clarity.

3 Likes

Thanks @keithma will have a look at that, do you need to stop any services or will it do it with everything running live?

1 Like

I don’t stop any services.

I have an entry in crontab that mounts my Synology NAS and then a couple of minutes later, the backup starts, I’ve got it configured to run “Backup with dd and restore on Windows” and also to compress the backup.

I don’t use Windows but that means it creates a compressed .img.gz file that I can unzip and push back out to an SD card if needed. It works really well.

2 Likes

Thanks keith, will look into whats needed to backup to my dlink NAS

I’d note that just dd-ing a copy of the partition with no sort of device snapshot (as this script appears to do in that mode) is… well, it’ll probably work most of the time; if that’s all you need, great :slight_smile: But I wouldn’t entrust anything too valuable to it.

(The problem is that if you’ve got a live system, then there might be arbitrary changes being made to the filesystem while you’re copying it out a block at a time, which in the backup image will look like you lost some unpredictable selection of the writes that were happening during the backup. ext4 is not expecting this to happen. Whole-system backups are hard to get right! Usually, if you’re going to take a raw copy of the whole filesystem, then you’d use LVM or similar to take an atomic logical snapshot of the filesystem’s device, then back up from the snapshot)

So it dosnt look like I can use raspibackup following option 1 (with NAS location) what I later found on the net, that @abcd567 wrote = Cloning Booted RPi’s microSD card on Windows PC through Network - Flightradar24 Forum, as my NAS is using SMB1 but got an error saying now using SMB 2.1

@abcd567 on your tutorial for doing backups where you have the options ( -a : -o : -m detailed) are these on the raspibackup webpage, as I cannot find any reference to them anywhere as I want to change from dd to tar as I only want to create an image of the size in use not a full 32gb SD image, but dont know what the option to change to is.

@Jonseyt23 I have posted this how-to here in Flightaware forum also. Maybe you will find more details in discussions which followed my how-to.

Cloning Booted RPi’s microSD card on Windows PC through Network

 

So I finally got something working after installing it on a laptop running desktop pi with samba installed as backup location as I cant use my NAS

I did a ddz backup of a test sd I have installed in a spare raspberry and that came out at 1.1gb from a 16gb card

But tried to do a tgz & normal tar backup after changing the conf file, but it failed on both runs, also do I need to be concerned about the locale error?

I deleted my post above on backing up using dd. It’s not a safe method for backing up a live system as obj has said. More on this subject is here:

Even though it has worked satisfactorily for me, that doesn’t prove the point.

Pray tell you have a small, one-off network, Keith, right? Right?

Not sure what you mean?

I have a home network, probably 60-70 devices connected in total. Lots of Raspberry Pis.

2 Likes

“… probably 60-70 devices connected in total.”

Apologies, no confusion, @keithma.

I have one node and one router. I think I get it.

:grinning:

73

1 Like