Change repository hostname?

How do I permanently change the repo hostname for a filesystem repository?

Kopia keeps wanting to use a different “Connect As” and “Hostname”, than the actual repo hostname that I created. This is a local filysystem repo.

Hi,

by default, kopia is using the hostname that is specified for this host. You either need to change the hostname or override it manually every time. Why do you want to use a different hostname?

Cheers,

How do I permanently change the hostname?

I’m not 100% sure what happened because I’m new, learning, and some days passed in between, but here’s some info of “why” I want to change the hostname: Kopia is the one that changed the current hostname, not me intentionally.

I run Kopia via docker container WebUI, local filesystem repo.
I ran a full backup/snapshot.
Something happened where the repo hostname and the container’s hostname are no longer the same.
Maybe it was an upgrade, maybe it was me learning and messing something up with a .config file or something else.

Whatever the cause/reason, the change in hostname was not done by me intentionally. So now I’m just trying to get the current hostname setback to the original hostname that my repos were originally assigned to.

Thank you.

1 Like

Extra Info:

Looks like my docker container ID was changed, and that’s why it doesn’t match the repository hostname.

I can’t remember exactly what happened. But the goal is to get the Kopia repository hostname to match the docker container hostname/container ID.

EDIT:
Also looks like I created the repository using version “buildVersion: 0.14.1”.
Now running v0.15.0.

So it looks like I did an upgrade, which may have contributed to this problem (it changed the docker container ID).

EDIT 2:
Confirmed:
Everytime I update the Kopia docker container, I get a new container id, and a new hostname.

Hi,

i thought you were running a local filesystem repository directly on the host :slight_smile:

You can override the hostname in your docker-compose file so it remains the same.
This is my docker-compose:

version: '3.7'
services:
    kopia:
        user: ${UID}:${GID}
        image: kopia/kopia:latest
        hostname: diskstation
        container_name: kopia-server
        restart: unless-stopped
        privileged: true
        networks:
            - kopia
        ports:
            - 8010:51515
        cap_add:
            - SYS_ADMIN
        security_opt:
            - apparmor:unconfined
        devices:
            - /dev/fuse:/dev/fuse:rwm
        command:
            - server
            - start
            - --disable-csrf-token-checks
            - --enable-actions
            - --tls-cert-file=/certs/fullchain.pem
            - --tls-key-file=/certs/privkey.pem
            - --address=0.0.0.0:51515
            - --server-username=${SERVER_USR}
            - --server-password=${SERVER_PWD}
            - --server-control-username=${SERVER_CTRL_USER}
            - --server-control-password=${SERVER_CTRL_PWD}
        environment:
            KOPIA_PASSWORD: ${REPOSITORY_PWD}
            TZ: Europe/Berlin
            USER: "nas"
        volumes:
            # Mount local folders needed by kopia
            - /volume1/docker/kopia-server/config:/app/config
            - /volume1/docker/kopia-server/cache:/app/cache
            - /volume1/docker/kopia-server/logs:/app/logs
            # Mount local folders to backup
            - /volume1/docker:/nas_docker:ro
            - /volume1/media:/nas_media:ro
            - /volume1/homes:/nas_homes:ro
            - /volume1/photo:/nas_photo:ro
            - /volume1/video:/nas_video:ro
            # Mount backup location
            - /volume1/backups/kopia-repo:/app/backup
            # Mount path for restoring snaphots
            - /volume1/backups/restore:/tmp
            # Mount paths for certificates
            - /usr/syno/etc/certificate/_archive/XiNQp0/fullchain.pem:/certs/ful                                                                                           lchain.pem:ro
            - /usr/syno/etc/certificate/_archive/XiNQp0/privkey.pem:/certs/privk                                                                                           ey.pem:ro
networks:
  kopia:
    name: kopia

Thanks!

I’m using Unraid, so I added the --hostname to the Extra Parameters in the template.

2 Likes