NAS and backup solutions

Hey! Not sure if this is the 100% correct place for this, but it’s the closest I could think of. I’ve been brainstorming backup solutions for some of my stuff (particularly my Wafrn and other things I may host in the future) and one thing I was considering is a NAS. Ideally, I would want the NAS only reachable on the local network with the capability to log in to my (remote) server and mirror the desired files, rather than the other way around, as I’d like the backups to be protected by the firewall.

Is this something a NAS can do? If so, what sort of software could achieve this (my thought was cron and rsync but it seems like NAS may have their own operating systems) and do you have any recommendations for NAS?

1 Like

Unless you open up ports on your router, your NAS won’t be accessible to the outside world. In order to get your remote server to access you probably need to set up some sort of SSH tunneling (Cloudflare) or VPN (Wireguard/Tailscale) to another local machine with access to the NAS.

1 Like

I would want the NAS to be the one connecting to the server (initiating the connection) rather than the server connecting to the NAS, and I would want the connection to only last as long as it takes to copy the backups. I’m asking if having a NAS that makes a scheduled outbound (preferably SSH) connection to mirror a specific set of files on a remote server (and onto the NAS) is possible, because most of what I see online is tutorials for what you’ve described, and that’s not what I’m looking for. And if it is possible, what would be good options and if they come with software that already provides solutions like this.

I take things very literally sometimes and tend to get stuck on details, so if this has a super obvious answer, I apologize! :sweat_smile:

I will admit, I am not fully following on your requirements, but I’ll add what I can.

Fundamentally, a NAS is just a computer with a whole bunch of storage and a network connection. Nine times out of ten it is a Linux machine. (Every commercially available one and DIY one I know of is Linux, but I am sure someone can find an exception)

So if you can do it in Linux, you can do it on a NAS

I can’t see any reason why you can’t set up a cron job to SSH and do whatever (assuming you have the knowhow)

1 Like

Some NASes (NASs? NASi?), such as Synology, have task schedulers i.e. cron jobs.

Then you could use secure copy scp command to connect and copy the files from your server

Just need to write a little shell script first.

Hope that helps.

2 Likes

That’s what I was looking for. Thank you guys. I think I was getting stuck on details and confusing myself.

I would just add that a NAS is only one part of a proper 3-2-1 backup. For normal people, one of the risks you are trying to prevent is loss of the stuff you have at home due to disaster/theft, so you probably also want an offsite backup, which could take the form of another NAS at someone else’s house (that you then tailscale etc. into), or encrypted backups to a commercial service like Backblaze.

2 Likes

Thanks for mentioning this, that “1” part is something that I need to figure out a better solution for myself.

Has anyone used RClone to facilitate their offsite backup? I would consider client side encryption to be mandatory, and this tool appears to make that pretty seamless.

Or, any other recommendations for solving that problem with a (hopefully arbitrary) Cloud provider?

I’ve written a blog post about this actually, although my solution is admittedly much more manual than any out of the box solution.

Hehe I actually remembered that we talked about this post in your welcome thread! I read it again this morning, which is what sent me off searching for a provider that could work with GCS or AWS Glacier. Cold storage really does make a ton of sense for this kind of backup solution.

My current “NAS” solution is simple but seems to work well enough. I have an old PC with two beefy disks of the same size. One is exposed as a samba share and rsyncs to the other disk on a cron schedule.

I was thinking if I could mount cloud storage as another disk and get the client side encryption to be transparent, that this would be an easy and cheap way to make what I’ve already got a good bit more robust.

Or maybe that’s a dumb plan, I don’t know. What do you think?

Ditto! That’s exactly how I do it too, its super practical.

All of the methods that encrypt individual files client side I know about end up exposing your directory structure to the provider. If hiding that directory structure is important to you (it is to me), then using a hot storage provider with a crontab job to handle the syncing/encryption of your NAS is probably the better route, depending on how much you need backed up and you internet speed of course.

If hiding the directory structure is not important to you, and just encrypting the path/file names is good enough, then it looks like rclone supports that. You just need to make sure that rclone doesn’t use a checksum to read the file contents to generate a checksum during a sync, as those reads will cost you with a cold storage provider.

1 Like