Thoughts on Backup when using a RPI

Hello, because of the fear, the SD-card or the USB-Stick might break every now and then I tried with a SSD. But the SSD costs a lot and needs more power (I have to put an extra DC-Jack to my RPI), so this is not the best (I think).
Here, the RPI boots the bootloader from SD and the OS from a USB-Stick. There are more USB-Slots empty.
My idea now is to run a script (by cron every week or so) which shuts down every service but the dd command, and then copys (by DD) the whole “working” Stick (partition) to the backup-ones. Or, mount the second stick and make a Image of the “working” stick on a partion on the second stick. These images could be used to make a working copy of the “working”-stick (even with windows). After that restarts the RPI.
The backup-stick then would be a working, second version of the “working”-one. Because of the size of the actual sticks, there could be even more than one backup at a time on the Backup-stick. Let’s say before starting to change something on the system, make a backup during the night before. The backup stick would remain then in the RPI an would be manually exchanged in the case the working one would go down.
My linux knowledge is, let’s say “limited”. Is there anybody out there who has done something like that?
Is the idea O.K., or is it bullshit?
I’m missing esspecialy the commands to shut down everything but the dd command.

See this post.
With this setup, you wouldn’t need to have a USB stick. It’s just as unreliable as are SD cards anyway.
Get a USB card writer and raw-copy your running Pi’s card to the backup card in the card writer.

I’ve been fortunate and never had an SD card failure with the two Raspberry Pis I run as servers (over years of continuous operation) . However, I recently upgraded one of the servers with a 250GB WD PiDrive (< $30 USD) and that’s been working well too. It’s not much extra power consumption and shouldn’t be an issue unless you’re running on battery power. Western Digital also have inexpensive cases that hold both the Pi and drive.

For backups, I use raspiBackup to copy the hard drive content to a NAS.

1 Like

Thanks!
I will have a look on raspiBackup. Seems, that’s it what I was looking for :wink: