Backup local computer to restic running on NAS

Hey! I’ve been using restic (with the awesome backrest web UI) for a few days and its been great for backing up my NAS files. I’ve set up one local repo and another offsite repo, but now I wanted to check how I could backup also my computer into it.

My local computer doesn’t run restic/backrest, only my NAS, is it possible for my NAS to get the files directly from my computer? Or do I need to also install restic/backrest into my local computer as well?

In the case where I need to install it on my local computer, do I also need to create separate repos, or can I reuse the ones on my NAS?

Ideally, I guess it would be nice to have restic running on my local pc as well, and start the backup locally, but store it to the repo on my nas, this way if my computer is not turned on, it could start whenever I turn it back on (not sure if its possible, but would be nice)

Where is the local repo, is it on the NAS such that on the NAS you are backing up files on the NAS into a repo on the NAS?

Yes, I would just install restic on your computer as well and run separate backups from there to one or more of the other repositories. You can use the restic key add command to add another password to the repo that is only used on your computer, or you can just use the same password as on the NAS. You could also set up a different repo if you wanted to, instead of using the existing one(s).

Why not run restic on the computer directly and write to the NAS ?

If it happens to be a laptop, I use to run my backup tool every 15 minutes, which checks if a recent snapshot is already present. If so, it ends the run, if not, it will launch it’s backup.
This method allows to avoid fixed schedules, which on laptops is always a bad idea.

Yet better, if your NAS has S3 support, you could NAT it and backup virtually from anywhere.

1 Like

Backrest author jumping in here –

Yep! You’ll want two installations of Backrest and at the moment I recommend using different repos for different machines (this is the lowest risk way to configure things – elsewise it’s somewhat important to try to ensure that you don’t schedule concurrent prune operations though restic will do a pretty good job of locking repos to prevent concurrent changes even in this case).

If you do use a single shared repo, just make sure you configure health operations not to overlap (e.g. if you set a prune or check policy have those run on different days of the month OR consider only configuring prune / check to run on one of your hosts). There’s also some potential for forget operations to fail if running concurrently – but this is more of a minor annoyance and doesn’t cause any real issues to my understanding.