Hi,
I managed to have a working backup using Kopia repository server’s feature. I’m on a Debian 9. Here is what I did. If you see something wrong, feel free to comment and/or correct. Once doc is ok, I’ll add it to website
-
Install kopia on server using the appropriate method
-
Create a user on the server (kopia)
useradd kopia
- Change user’s homedir to a partition with space if your /home doesn’t have enough (could be /opt, /var, etc.)
usermod -d /opt/kopia kopia
- Create a kopia_conf dir
cd /opt/kopia
mkdir kopia_conf
- Create a storage directory
mkdir datas
- Create service (https://forum.frank-mankel.org/topic/848/kopia-http-s-server/3)
vi /etc/systemd/service/kopia.service
[Unit]
Description=Kopia Server
After=syslog.target
After=network.target
[Service]
Type=simple
User=kopia
Group=kopia
ExecStart=/usr/bin/kopia server --htpasswd-file full_path/kopia_conf/kopia_auth --tls-cert-file full_path/kopia_conf/kopia.cert --tls-key-file full_path/kopia_conf/kopia.key --address <server IPv4>:51515
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
# and adjust paths
- Configure kopia (Based on this page https://kopia.io/docs/repository-server/)
Create user(s) account(s)
cd kopia_conf
htpasswd -c kopia_auth user1@host1
# !!! (Lowercase client host)
- Start server to generate keys
kopia server start --htpasswd-file full_path/kopia_conf/kopia_auth --tls-generate-cert --tls-cert-file full_path/kopia_conf/kopia.cert --tls-key-file full_path/kopia_conf/kopia.key --address <server IPv4>:51515
# !!! Write down the hash SERVER CERT SHA256
-
Configure repository
Connect to web interface https://<server_ip>:51515 with credentials created earlier
Create a local storage Dir : “datas” -
Stop server and start service
Stop server ()
start kopia service
systemctl start kopia.service
- Connect with client (kopiaUI)
- Start KopiaUI, fill the fields with according informations
- enter server address : https://<server_ip>:51515
- use SERVER CERT SHA256 generated earlier
- use password created earlier
- add directories to backup
- create snapshots