Hi,
I’m new to kopia so apologies if my question is really obvious…
I run a debian-based, headless home-server. My files from various laptops are backed up to this server.
And I was planning to use kopia to then back up to cloud (Backblaze).
While I can use cli, I find gui’s easier. My question/confusion is whether the gui for kopia only works if installed on a desktop.
Or it can be installed on a headless debian, and then accessible by a web address? If yes, which version of kopia to use? I came across kopia being accessible via the web in server mode, though not sure if this correct, and unclear how server mode is initiated.
Additionally, for web/gui access, this would only be via my Lan, not externally.
Thanks.
This is almost exactly the setup I have, though in my case it’s Ubuntu. Headless server, using the web GUI.
The web GUI is part of the kopia
package, so you do not need kopia-ui
.
I was not able to find a way to do the initial repository creation via the web GUI, so I first created the repository via the CLI, but then from that point on, I was able to use the GUI for everything (setting up policies, monitoring snapshots, etc.).
To get it all up and running, you’ll need to install that kopia
package (I used the kopia apt
source, but you do you). Then you’ll have to set up users, permissions, etc., but you can find all that in the docs. Then you’ll need to run Kopia in server mode, and that I found isn’t very well documented. I found this issue on GitHub to be very useful in getting that set up and running: How to create a systemd service? [repository server] · Issue #2737 · kopia/kopia · GitHub
Good luck! Let me know if you have specific questions or issues along the way. I did all of this in June, so it’s still fairly fresh.
1 Like
Thanks for taking time out to reply
I’ll take a look and give it a go. I’ve heard many positive things about Kopia so keen to try it out.
I’m back…with some noob problems
I’ve created a repository on backblaze (via S3 credentials). And can connect to it on my homeserver machine (where kopia is installed).
Following the doc guidelines, I ran the commands to add a user and an auto-generated TLS certificate.
What I’m unclear about is, to access the server locally via http:// (or is it https://), I need to start it using the command (as formatted in the doc):
kopia repository connect server --url https://<address>:51515 \
--server-cert-fingerprint 48537cce585fed39fb26c639eb8ef38143592ba4b4e7677a84a31916398d40f7
The <address>
would be what my LAN homeserver is on? as I’ll only be accessing locally. And use the fingerprint generated previously.
And do I run this command on the homeserver? (In the doc, it mentions a client)
So I tried running above command on homeserver, and it says:
Connecting to server 'https://192.168.1.82:51515' as 'zed@homeserver'...
Enter password to open repository:
It’s not clear which password I should use? Is it for the zed user or the server-control-password or the repository on backblaze
I tried the various ones, but still get an error (below).
I’m clearly doing this wrong!
ERROR failed to open repository: unable to establish session for purpose=: error establishing session: Session(): rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 192.168.1.82:51515: connect: connection refused"
ERROR error connecting to API server: unable to establish session for purpose=: error establishing session: Session(): rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 192.168.1.82:51515: connect: connection refused"
In your original post, you mentioned:
My files from various laptops are backed up to this server.
And I was planning to use kopia to then back up to cloud (Backblaze).
So, given that, you don’t need the kopia repository connect
command. That would be if you had Kopia running on your local machine (e.g. a laptop) and wanted to use Kopia to back it up to your server, in which case your local (laptop) repository would connect to your Kopia server, as opposed to some other target (e.g. Backblaze). And that explains why the command isn’t working for you; there’s no Kopia server at the address you’re providing!
Instead, what you want to do is run kopia server start
on your server. That will start up the server, allowing it to run scheduled backups (snapshots), and will host the web GUI, allowing you to connect via the browser on your local machine (such as, again, your laptop).
I can’t tell you exactly what you’re going to need to put in that kopia server start
command, but here’s mine:
kopia server start --tls-cert-file ~/kopia.cert --tls-key-file ~/kopia.key --address [my server's ip]:51515 --server-username=[my username]
Here’s an important caveat: running that command just starts up the Kopia server process one time. It doesn’t register it as a daemon, so it won’t start up automatically with your server or restart if it crashes. So, I recommend checking out that GitHub link I shared above. Once you have your kopia server start
command working, use that link for some pointers on how to set it up as a daemon.