Page 1 of 1

Backup server for my windows machine?

Posted: Fri Mar 16, 2018 11:01 am
by Bartfliet
Hello everybody,

I've only just started to look into the world of Raspberry's and Linux so I thought I'd turn here for some help. :)
I'm looking to setup a backup server on the Pi. I've already bought a rpi 3 and also a powered USB hub and 2, 2TB USB HDD.

So, what I would like to do is have my windows computer do a weekly full system backup to the HDD's. Now I've got "backupper" software on my Windows PC installed, so I would just need to create a shared folder on the rpi to allow the "backupper" software to write the backup to.

I would preferably have the 2 HDD be in RAID 1 so I have redundancy.

I've tried using Openmediavault, but for some reason it won't allow me to put my 2 HDD in RAID...

Anyway, I'm looking for some much needed help and any and all tips are welcome :)

Re: Backup server for my windows machine?

Posted: Fri Mar 16, 2018 1:34 pm
by thagrol
You'll get better performance with the drives directly connected to your PC: full USB speed rather than 100Mb ethernet over a shared USB bus at the Pi end.

That said, here's what I suggest you investigate.
  • Software raid. Linux can do RAID in software, hit google for tutorials.
  • Go for a raspbian lite (no desktop) install and run samba. Share your software RAID 1 arrary over that.
Some stuff to watch out for:
  • Once you'ce added your drives to /etc/fstab you may have trouble booting the pi if a drive is not present or has not spun up. Adding ".nofail" to the mount options should help with that.
  • How the drives/RAID array have been formatted can affect whether and who can write to them. Get this working as desired before you start worrying about remote access.

Re: Backup server for my windows machine?

Posted: Fri Mar 16, 2018 4:23 pm
by Bartfliet
thagrol wrote:
Fri Mar 16, 2018 1:34 pm
You'll get better performance with the drives directly connected to your PC: full USB speed rather than 100Mb ethernet over a shared USB bus at the Pi end.
Yeah, I know. But I'd prefer it to be on a different machine. This (putting my backups on the raspberry) would be the safest should my windows machine ever get infected with ransomeware or whatever, no?

Re: Backup server for my windows machine?

Posted: Fri Mar 16, 2018 5:20 pm
by thagrol
Bartfliet wrote:
Fri Mar 16, 2018 4:23 pm
thagrol wrote:
Fri Mar 16, 2018 1:34 pm
You'll get better performance with the drives directly connected to your PC: full USB speed rather than 100Mb ethernet over a shared USB bus at the Pi end.
Yeah, I know. But I'd prefer it to be on a different machine. This (putting my backups on the raspberry) would be the safest should my windows machine ever get infected with ransomeware or whatever, no?
Not really. If your windows machine can write to a network share it can encrypt the files on it, infect them with a virus, delete them, etc. Windows malware won't run on the Pi but it doesn't have to. If you've mapped the network share to a drive letter the malware doesn't even have to be network aware.

If I was feeling paranoid, I'd do the backup like this:
  • (Re)boot my PC to linux
  • Mount my windows partitions read only
  • Connect to the network share over nfs (not samba)
  • Back up
  • Reboot to windows.
I'd also be keeping multiple generations of the backed up data. How many depends on how often the backup runs and how long you think it will take you to notice any malware problems, undesired changes/deletions, etc.

I wouldn't be running samba on the server either. Out of the box windows doesn't support nfs, so it's an extra hoop for any malware to jump through.

Edit:
This isn't a foolproff solution, any corrupted/infected files will still be broken and linux isn't free of malware. It should prevent any windows malware from running during the backup though.