This is a fresh install of Kopia on a Raspberry Pi 5 running latest Bookworm. Kopia runs in a docker container. This installation is just temporary just to get the feel of it; a later one will be more secure. Here is the compose file:
services:
kopia:
image: kopia/kopia:latest
container_name: kopia
hostname: kopia
#user: "0:0"
restart: unless-stopped
privileged: true
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
devices:
- /dev/fuse:/dev/fuse:rwm
command:
- server
- start
- --disable-csrf-token-checks
#- --tls-cert-file=/data/home/XXX/ssl-certs/fullchain.pem
#- --tls-key-file=/data/home/XXX/ssl-certs/privkey.pem
- --insecure
- --address=0.0.0.0:51515
- --server-username=kopia # just for testing
- --server-password=kopia # just for testing
environment:
USER: xxxxxxxxxxx
KOPIA_PASSWORD: xxxxxxxxxxx
TZ: Europe/London
ports:
# int:ext
- 51515:51515
networks:
- pi_net
volumes:
# /path/on/host:/path/in/container
- ../../volumes/kopia/tmp:/tmp:shared
- ../../volumes/kopia/config:/app/config
- ../../volumes/kopia/cache:/app/cache
- ../../volumes/kopia/logs:/app/logs
- ../../volumes/kopia/data:/data:ro
# originalas for reference
#- /mnt/kopia:/tmp:shared
#- /home/XXX/docker/Kopia-Ubuntu/config:/app/config
#- /home/XXX/docker/Kopia-Ubuntu/cache:/app/cache
#- /home/XXX/docker/Kopia-Ubuntu/logs:/app/logs
#- /:/data:ro
networks:
pi_net:
external: true
Here’s the log after installing:
Server will allow connections from users whose accounts are stored in the repository.
User accounts can be added using 'kopia server user add'.
Repository not configured.
SERVER ADDRESS: http://[::]:51515
Open the address above in a web browser to use the UI.
Curiously, there is no <hostname>.local specified.
After logging in I get to the “storage Type” screen where I can select WebDav (this is for a Synology NAS on the same subnet). This points to the NAS filesystem:
http://<ipv4_address>:5005/raspberrypi/kopia
UserName: etc...
Password: etc...
After configuring the storage (aka Repository, if that’s correct?), I can move on to next screens, configuring the repository:
Connect as: root@kopia
Repository password: kopia (from compose.yaml, above)
Description: My Respository
Click: [Connect to Repository]
Next step is to configure a Policy. Next tab. There is one (global?) policy already there:
Username/Host/Path all asterisked and all options set in “defined”
For testing I want to backup everything in my directory (/home/<username>), so I enter /home/<username> to define a new policy (as a “Local path policy”) and click [Set Policy]
The next screen shows Directory: root@kopia:/home/<username>
Below that are various config options. For testing I choose every 10 mins for Snapshot Frequency and leave everything else at the defaults. Finally click [Save Policy].
In the tasks tab I get “Failed after 0.0s”
The log shows this:
upload triggered via API: root@kopia:/home
snapshot error: snapshot task: unable to create local filesystem: unable to determine entry type: lstat /home/<username>: no such file or directory
Yet this directory DOES exist (as shown by the contents of ls -la /home/username)
So I’m thinking this is probably a permissions issue?
…because the log now shows:
snapshot error: snapshot task: unable to create local filesystem: unable to determine entry type: lstat /home/<username>: no such file or directory
I’ve tried different users (1000:1000 and 0:0) with various errors logged.
Suggestions for next steps?
Thanks, Ric