Restic Newbie with ssh/sftp question

Hi all,
I’m new in the restic world that i found on happenstance.
I’ve installed restic and save my local home on my kubuntu desktop PC to my NAS.
It’s running fine.

But I’ve also an webserver and need to save this data also on my NAS.
The sftp parameter works only for the respository, not for the source, right?
Yes, I read the doc but couldn’t find anything about what I want.
I need only one repository on my NAS.

Or is the way backup the web server (no root account possibly) on the server and then transfer the repository from there to my NAS via sftp?

Sorry, I’ve no ideas for that.

Many thanks for any hints.

Regards,
Kuno

PS: In past I’ve use an TAR-Script in server an in second step I transfer this backup on my NAS. May be is restic more efficiently?

I presume you mean the -r sftp:.. option where you specify where the repository is stored. If so, yes, this is something you specify for the repository and not the source of the files you back up.

Simply run restic on the server, backing up the files/folders you want, to the repository you want. That repository can be the same as your PC, but if they don’t share a lot of files I don’t see much reason to use the same repository. I’d use one repository for the PC and one for the server.

No, simply back up the files/folders you want using restic.

Yes, I mean that. My question is, can I backup a remote server to a local location / repository via ssh/sftp?

Sorry, I didn’t say it clearly enough. I did not mean the same Resporitory but the NAS as a target. Of course, each server/desktop gets its own backup environment.

You can give restic a local file path to back up, but you cannot ask restic to back up some remote thing, no. You could of course mount some remote filesystem at /mnt/foo and then back up /mnt/foo, if you want to.

1 Like

Thanks for the hint. That helps me.

1 Like