alve89
(Stefan)
January 23, 2025, 6:45am
1
Hi guys,
I’m running HA in a LXC-container on my PVE. I installed it via Proxmox VE Helper-Scripts . It worked like charme.
Now I wanted to move my HA installation from this to docker compose
, so I did the following:
cp -r /var/lib/docker/volumes/hass_config/_data/* /mnt/nfs-backups/hass41/config/
chown -R 1000:1000 /mnt/nfs-backups/hass41/config
docker compose up -d
This is my docker-compose.yml
:
services:
homeassistant:
container_name: "homeassistant_temp"
entrypoint:
- "/init"
hostname: "hass41"
image: "ghcr.io/home-assistant/home-assistant:2024.1.4"
logging:
driver: "journald"
options: {}
network_mode: "host"
privileged: true
restart: "unless-stopped"
security_opt:
- "label=disable"
volumes:
- "/dev:/dev"
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
- "/mnt/nfs-backups/hass41/config:/config"
working_dir: "/config"
What I get is:
I used the old image version because the old installation was the same version.
What did I miss?
tmjpugh
(Tmjpugh)
January 23, 2025, 7:41am
2
cp misses hidden folder
Rsync is better
Your missing .storage folder from config folder
Also, look into macvlan. I prefer to host networking
1 Like
alve89
(Stefan)
January 23, 2025, 8:46am
3
Actually .storage
exists:
root@hass41:/usr/local/bin# ls -al /mnt/nfs-backups/hass41/config
total 108641
drwxr-xr-x 12 1000 1000 42 Jan 23 07:32 .
drwxr-xr-x 3 nobody nogroup 3 Jan 23 07:22 ..
-rw-r--r-- 1 1000 1000 8 Jan 23 07:27 .HA_VERSION
drwxr-xr-x 2 1000 1000 2 Jan 23 06:49 .cloud
drwxr-xr-x 2 1000 1000 15 Jan 23 09:32 .storage
-rw-r--r-- 1 1000 1000 18766 Jan 23 07:26 automations.yaml
drwxr-xr-x 4 1000 1000 4 Jan 23 06:49 blueprints
-rw-r--r-- 1 1000 1000 4687 Jan 23 07:26 configuration.yaml
-rw------- 1 1000 1000 3488 Jan 23 07:26 configuration.yaml.save
-rw-r--r-- 1 1000 1000 3488 Jan 23 07:26 configuration.yaml.save.1
-rw------- 1 1000 1000 4205 Jan 23 07:26 configuration.yaml.save.2
-rw-r--r-- 1 1000 1000 4205 Jan 23 07:26 configuration.yaml.save.3
-rw------- 1 1000 1000 4196 Jan 23 07:26 configuration.yaml.save.4
-rw-r--r-- 1 1000 1000 4196 Jan 23 07:26 configuration.yaml.save.5
-rw------- 1 1000 1000 4203 Jan 23 07:26 configuration.yaml.save.6
-rw-r--r-- 1 1000 1000 4203 Jan 23 07:26 configuration.yaml.save.7
drwxr-xr-x 8 1000 1000 8 Jan 23 07:26 custom_components
drwxr-xr-x 2 1000 1000 2 Jan 23 07:26 deps
-rw-r--r-- 1 1000 1000 0 Jan 23 07:26 groups.yaml
-rw-r--r-- 1 nobody nogroup 4462 Jan 23 09:00 home-assistant.log
-rw-r--r-- 1 1000 1000 3957 Jan 23 07:27 home-assistant.log.1
-rw-r--r-- 1 nobody nogroup 0 Jan 23 07:32 home-assistant.log.fault
-rw-r--r-- 1 1000 1000 63815680 Jan 23 07:32 home-assistant_v2.db
-rw-r--r-- 1 1000 1000 32768 Jan 23 09:45 home-assistant_v2.db-shm
-rw-r--r-- 1 1000 1000 196608 Jan 23 07:26 home-assistant_v2.db-shm.corrupt.2024-10-16T02:12:01.228255+00:00
-rw-r--r-- 1 1000 1000 720896 Jan 23 07:26 home-assistant_v2.db-shm.corrupt.2024-10-18T02:12:00.373175+00:00
-rw-r--r-- 1 1000 1000 2369032 Jan 23 09:46 home-assistant_v2.db-wal
-rw-r--r-- 1 1000 1000 86944392 Jan 23 07:26 home-assistant_v2.db-wal.corrupt.2024-10-16T02:12:01.228255+00:00
-rw-r--r-- 1 1000 1000 368200312 Jan 23 07:26 home-assistant_v2.db-wal.corrupt.2024-10-18T02:12:00.373175+00:00
-rw-r--r-- 1 1000 1000 76419072 Jan 23 07:27 home-assistant_v2.db.corrupt.2024-10-16T02:12:01.228255+00:00
-rw-r--r-- 1 1000 1000 10256384 Jan 23 07:27 home-assistant_v2.db.corrupt.2024-10-18T02:12:00.373175+00:00
-rw-r--r-- 1 1000 1000 5111808 Jan 23 07:27 home-assistant_v2.db.corrupt.2024-10-19T02:12:00.359534+00:00
drwxr-xr-x 7 1000 1000 7 Jan 23 07:27 image
drwxr-xr-x 2 1000 1000 3 Jan 23 07:27 media
-rwxr--r-- 1 1000 1000 11599872 Jan 23 07:27 rtsp2webrtc_v5_armv7
-rw-r--r-- 1 1000 1000 0 Jan 23 07:27 scenes.yaml
-rw-r--r-- 1 1000 1000 396 Jan 23 07:27 scripts.yaml
-rw-r--r-- 1 1000 1000 161 Jan 23 07:27 secrets.yaml
drwxr-xr-x 2 1000 1000 3 Jan 23 07:27 share
drwxr-xr-x 2 1000 1000 2 Jan 23 06:49 tts
drwxr-xr-x 3 1000 1000 7 Jan 23 07:27 www
-rw-r--r-- 1 1000 1000 577536 Jan 23 07:27 zigbee.db
EDIT:
But you are right, it worked with rsync
… Thank you!
tmjpugh
(Tmjpugh)
January 23, 2025, 2:06pm
4
Rsync also copies permissions and user/group
That was other possible issue