i tried to configure maintanance at docker compose file, but got error with any command.
kopia | kopia: error: unknown long flag '--enable-quick true', try --help
kopia | kopia: error: unknown long flag '--quick-interval', try --help
documentation say nothing about docker, so i use keys same way as for CLI.
command:
- server
- start
- --insecure
- --disable-csrf-token-checks
- --address=0.0.0.0:51515
- --server-username=
- --server-password=
- --enable-quick true
- --enable-full true
- --quick-interval=2h
- --full-interval=24h
don’t tried another customisation keys yet, did they should work? sharding for expample.
dimejo
March 3, 2023, 12:08pm
2
As the error message implies --enable-quick
and --quick-interval
aren’t valid flags in context of kopia server start
. Check kopia server start --help
to see which flags are supported.
You need to run kopia maintenance set --enable-quick=true --enable-full=true --quick-interval=2h --full-interval=24h
after the server has started. But --enable-quick=true
, --enable-full=true
and --full-interval=24h
are default anyways if i recall correctly.
1 Like
thanks, i got the idea.
but container fall with error.
compose
command:
- server
- start
- --insecure
- --disable-csrf-token-checks
- --address=0.0.0.0:51515
- --server-username=
- --server-password=
- kopia maintenance set --enable-quick=true --enable-full=true --quick-interval=2h --full-interval=24h
[+] Running 1/0
â ż Container kopia Created 0.1s
Attaching to kopia
kopia | kopia: error: unexpected kopia maintenance set --enable-quick=true --enable-full=true --quick-interval=2h --full-interval=24h, try --help
kopia exited with code 0
dimejo
March 3, 2023, 1:33pm
4
kopia maintenance set --enable-quick=true --enable-full=true --quick-interval=2h --full-interval=24h
This should not be part of your start command. You need to run it separately - something like this:
docker exec $CONTAINERNAME kopia maintenance set --enable-quick=true --enable-full=true --quick-interval=2h --full-interval=24h
ChrisA
March 12, 2023, 6:45am
5
For anyone that might setup kopia (with tls), here is my docker-compose
version: '3.7'
services:
kopia:
user: ${UID}:${GID}
image: kopia/kopia:latest
hostname: machine
container_name: kopia-server
restart: unless-stopped
networks:
- kopia
ports:
- 51515:51515
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
devices:
- /dev/fuse:/dev/fuse:rwm
command:
- server
- start
- --disable-csrf-token-checks
- --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
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:shared
# Mount path for restoring snaphots
- /volume1/backups/restore:/tmp:shared
# Mount paths for certificates
- /usr/syno/etc/certificate/_archive/XiNQp0/fullchain.pem:/certs/fullchain.pem:ro
- /usr/syno/etc/certificate/_archive/XiNQp0/privkey.pem:/certs/privkey.pem:ro
networks:
kopia:
name: kopia
Its running on a synology nas. The variables are defined in a separate file “.env”.
REPOSITORY_PWD="abc"
SERVER_USR="kopia@machine"
SERVER_PWD="abc"
SERVER_CTRL_PWD="abc"
SERVER_CTRL_USER="kopia-admin"
#Root
UID=0
#Kopia group
GID=65543
Cheers,
1 Like