Looking for data backup and redundancy with a Raspberry Pi

  • I'm looking to backup all my photos and videos. I need to have redundancy, so I was thinking of having two hard drives, with the data mirrored on both hard drives. This way, I always have two copys of every file.

    What is the best way to acheive this with a Raspberry Pi 3B and two USB hard drivers?

  • The best way is to buy a powered dual bay case that supports raid1 directly. That way you minimize the cable mess.


    However, even better could be to skip redundancy and instead go for versioned backups.


    If you use raid1 you have NO PROTECTION against silly user errors. Using versioned backups you can , if needed, go back in time and restore files and folders as they were some time in the past.


    I use a bash script to create versioned rsync snapshots. The script also deletes old snapshots. OMV also has support for rsnapshot that does something similar.


    Here is my script: https://github.com/WikiBox/snapshot.sh

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • I like the look of that, but the Odroid seems hard to get hold of in the UK.


    I dont really want to buy any new hardware, but I could be pushed towards a Pi4 4GB. I've read they are good for home NAS setups with USB hard drives as it has 2x USB3 ports.

  • Why buy an Odroid? Use a RPi!


    The methods I suggests works equally fine on a RPi4. Currently I use my script on my Odroids, on a RPi4 and in my laptop.


    I agree that the RPi4 is great for a NAS. I currently use a 8GB RPi4 with OMV5. And a 4 bay external USB enclosure with 64 TB storage. Works great.


    The suggestion was to buy an external 2 bay USB enclosure.so you get less problems with cables. And connect that to the RPi. Then use a script or rsnapshot in OMV5 to backup files between the drives instead of trying to setup RAID over USB to get some form of redundancy. OMV does not support RAID over USB, for good reasons: It is not reliable.


    While the RPi4 has two USB3 ports, they share the bandwidth of one port.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited 2 times, last by Adoby ().

  • I currently use a 8GB RPi4 with OMV5. And a 4 bay external USB enclosure with 64 TB storage. Works great.

    Thanks for sharing what you use for your setup. I currently have a helios4 for my operational data and am considering the best (and most cost effective) way to have backups in a separate location.


    Your suggestion of using a Raspberry Pi and an external USB enclosure sounds like a really good option for me to use as a backup server. I had a couple of questions :):

    1. You mentioned that you have a RPi4 8GB. Was there a reason (i.e. experience) that you went 8GB over 4GB? I guess I'm wondering whether 8GB is needed and justifies the additional cost?
    2. There are a lot of external USB enclosures out there. Do you have any recommendations for what to look for? What to avoid? Or even a good brand to go with? There are some very expensive enclosures and I'm keen to have a good quality and robust setup, but the most expensive option is not always needed to achieve this. I probably only need a 2 bay enclosure at the moment. However, I would be open to getting a 4 bay if it wasn't going to break the bank.

    Thanks

  • I got a 8GB RPi4 because I could. I can't say I notice any great performance improvements. Or any at all. If you were running a lot of dockers I assume that you could perhaps notice a difference.


    I may swap out the 8GB RPi4 for a 4GB in the future, if I think I have more use for the 8GB in some other role.


    I don't know exactly what enclosure to recommend.


    Mine isn't optimal. It doesn't support UAS. ICY BOX IB-RD3640SU3. But it supports any size hdds and it is fast enough to saturate GbE during large file transfers.


    I also have a dual bay Startech S352BU33HR enclosure, it supports UAS but not 16TB hdds.


    You want an enclosure that supports UAS and any size hdds. I don't know any enclosure that does both. But I assume some do?

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • Two bay, 16TB disk limit, and USAP support. I don't know anything about it but was wondering if it would do what you are looking for.

    Rsync makes true backup and restoration stupid easy, and it's built right in to OMV. Use this command in a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-NAMEofSOURCEdisk/ /srv/dev-disk-by-label-NAMEofDESTINATIONdisk/
    OMV Version: Ver. 5 (current) - Hardware: NanoPi M4, running Nextcloud, Plex, & Heimdall - Acer Aspire T180, running backup - Odroid XU4, running Pi-Hole (DietPi) - Testing/Playing: Odroid HC2, Odroid XU4, Raspberry Pi 3B+, Odroid XU4, and HP dx2400.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!