Dual redundant pi Raspberry on Piratebox?

Posted by josephchrzempiec 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Dual redundant pi Raspberry on Piratebox?
February 19, 2018 02:49AM
Hello is it possible to make a dual redundant Piratebox? What i mean is if my main Piratebox crashes or i lose a SD card I can have a backup to replace and not lose files?
Re: Dual redundant pi Raspberry on Piratebox?
February 19, 2018 07:51AM
I’m am not quite sure what you want to have.

You can create a backup of the SD Card and store it at home, and do that backup frequently manually.
Or do you think of a backup via WiFi?
Or within the same SD Card?

BTW: moving this to the raspberry forum

Best regards Matthias
Re: Dual redundant pi Raspberry on Piratebox?
February 19, 2018 08:31AM
Hello Matthias thank you for putting this post in the correct place. I didn't know where to post this at.

The simple question is it possible to automatically backup files from one SD card to another? What i mean Say i upload a file or image to my box. But also have it copied to the other SD card as a backup So really have two Pirateboxes linked together. In case one failed i can have all my settings and Themed and files/images and have it on the second SD card. Kind of like a clone of the first drive.

I hope that helps.
Re: Dual redundant pi Raspberry on Piratebox?
February 19, 2018 09:24AM
I'm sorry let me rephrase this. What i mean is like a redundant raid Sd card so if one dies i can have a type of backup. That can automatically copy from one SD card to another. So if the main SD card fails, Dies or something happens. The backup SD card can take over. Is this possible?


Joseph
Re: Dual redundant pi Raspberry on Piratebox?
February 19, 2018 09:27AM
without bigger modifications, it is not possible to setup something like a RAID 1.
It is also not easy to get an instant synchronization to the second SD Card. What is possible is to run a regular (every n minutes) program like "rsync" to mirror the latest changes to the other SD Card. You can do this for the complete filesystem, or only for /opt/piratebox (after doing an initial copy).

You can also do a replication using syncthing of the /opt/piratebox folder to a different computer connected to the piratebox.

Those are my first thoughts about that topic.

best regards Matthias
Re: Dual redundant pi Raspberry on Piratebox?
February 19, 2018 09:28AM
Ups, saw that 2nd post to late. You can create a 1:1 copy using the dd command, but it is still hard to keep track of recent changes with that technique.
Re: Dual redundant pi Raspberry on Piratebox?
February 22, 2018 09:31AM
Hello Matthias can you help me to understand something. I'm not a Linux programmer I'm still learning about all these commands. But what does the dd command do on the piratebox?
Re: Dual redundant pi Raspberry on Piratebox?
February 22, 2018 12:48PM
you can memorize dd as "disk dump" , which you can use for creating 1:1 copies of disks (from or to a file or a disk). This is the common tool to write linux images to the SDCard.

best regards Matthias
Not an expert, Definately take Matthias' word on ANYTHING over mine, but if it was me I'd have a Chron job that runs Rsync (quick google search to "update a mirror") and have the second SD plugged into a usb port on the Pi.

Just my two cents. Should be quickest and easiest for a beginner this way. Justgoogle Chron, and Rsync Mirroring Folders.

Cheers!