#all i did was scp my ha dir over to new

1 messages · Page 1 of 1 (latest)

rancid sigil
#

You missed the hidden files and folders, particularly .storage/ but there are others

timber dragon
#

thanks for the reply, Tinkerer. i even tried scp/rsync with privs but it still left things behind. i ended up using taking a backup and manually extracting the contents to the new/empty config dir on the new server. guess you have to do it that way in a container setup.

rancid sigil
#

Nah, but you do have to get the sync to include hidden files, which is easy enough to do, and well documented

timber dragon
#

this was after a transfer:

$ ll -la data/home-assistant/config/
total 1009884
...
-rw-r--r-- 1 root root 1718 Jun 20 22:07 automations.yaml
drwxr-xr-x 2 root root 4096 Sep 19 17:20 backups/
drwxr-xr-x 4 root root 4096 Jul 6 2021 blueprints/
drwxr-xr-x 2 root root 4096 Jul 6 2021 .cloud/
-rw-r--r-- 1 kinghat kinghat 1366 Jul 18 17:41 configuration.yaml
drwxr-xr-x 3 root root 4096 Sep 15 03:57 custom_components/
drwxr-xr-x 2 root root 4096 Jul 6 2021 deps/
-rw-r--r-- 1 kinghat kinghat 0 Jul 6 2021 groups.yaml
-rw-r--r-- 1 root root 8 Sep 26 19:15 .HA_VERSION
-rw-r--r-- 1 root root 2068 Sep 29 00:20 home-assistant.log
-rw-r--r-- 1 root root 54856 Sep 28 23:25 home-assistant.log.1
-rw-r--r-- 1 root root 1033994240 Sep 29 01:30 home-assistant_v2.db
drwxr-xr-x 3 root root 4096 May 11 16:51 image/
-rw-r--r-- 1 kinghat kinghat 0 Jul 6 2021 scenes.yaml
-rw-r--r-- 1 kinghat kinghat 475 Dec 11 2021 scripts.yaml
drwxr-xr-x 3 root root 4096 Sep 29 01:30 .storage/
drwxr-xr-x 2 root root 4096 Jul 6 2021 tts/
drwxr-xr-x 3 root root 4096 Jun 15 18:13 www/

#

$ sudo rsync -av --progress /mnt/tyler/data/containers/home-assistant /home/kinghat/containers/data/ | grep -i error
rsync: [sender] send_files failed to open "/mnt/tyler/data/containers/home-assistant/config/nohup.out": Permission denied (13)
rsync: [sender] send_files failed to open "/mnt/tyler/data/containers/home-assistant/config/secrets.yaml": Permission denied (13)
rsync: [sender] send_files failed to open "/mnt/tyler/data/containers/home-assistant/config/.storage/auth": Permission denied (13)
rsync: [sender] send_files failed to open "/mnt/tyler/data/containers/home-assistant/config/.storage/auth_provider.homeassistant": Permission denied (13)
rsync: [sender] send_files failed to open "/mnt/tyler/data/containers/home-assistant/config/.storage/core.config": Permission denied (13)
rsync: [sender] send_files failed to open "/mnt/tyler/data/containers/home-assistant/config/.storage/core.uuid": Permission denied (13)
rsync: [sender] send_files failed to open "/mnt/tyler/data/containers/home-assistant/config/.storage/onboarding": Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]

rancid sigil
#

Well, you've got a permissions issue there, very clearly

#

If you'd fixed that, you'd have been fine

timber dragon
#

its whatever the container configured them as 🤷‍♂️ sorry for being dense about this but are you saying that i should have recursively chowned the ha config dir before copying?

rancid sigil
#

Well, you needed to run it as a user that had access to the files

#

The other option would have been to tar the folder, and then untar it in the destination

timber dragon
rancid sigil
#

No

#

The problem is that it couldn't read/write some of those files, as the user you ran it as

#

I'm guessing that /mnt/tyler is a remote mount

#

So, way you mounted that, and that you never checked the logs, is why you had issues

timber dragon
#

i tried copying via scp/rsync as user and root over ssh and that sshfs mount and same thing each time.

#

i also tried doing the same from the source end to dest and same thing.

rancid sigil
#

How did you mount /mnt/tyler

timber dragon
#

sshfs

#

fstab

rancid sigil
#

Right, so ... the permissions there are part of your issue

#

However, you can rsync over SSH, which is the right way of doing this IMO

timber dragon
#

i did that initially, not using that mount but ssh, and same thing.