#How do I get the .unison folder to be persisted in "SSH & Web Terminal"?

1 messages · Page 1 of 1 (latest)

austere axle
#

I am using Unison to sync my backups folder between a server and my Home Assistant system. However, it creates a .unison folder in /root and this folder is lost at times. I see that the persistent stuff is all symlinked. How do I get this folder added to the symlinking?

open orchid
austere axle
#

Can I setup an SSH network share?

#

I don't have SAMBA or NFS setup on the server I want to backup to.

#

I see if I can configure the environment variable UNSION to a different path, that will let me set where it saves it. I just need to figure out how to make sure that persists.

open orchid
#

is webdav an option? there is an integration for that

austere axle
#

No

open orchid
#

how are you running Unison currently? as an addon?

austere axle
#

apk add unison

#

on the terminal in HA.

#

It seems to get uninstalled too.

open orchid
#

yeah any updates will break stuff added like that

austere axle
#

I'm just adding ssh root@ha apk add unison before it runs unison on the server side.

#

I'm trying to pull the files rather than push them.

open orchid
#

you could try writing a script that copies the backup files to your target system via ssh then execute that script from within HA.

#

there is the syncthing addon too which i think has alot of options for stuff like this too. you could try that as a different method?

austere axle
#

just need to also issue a symlink command, I guess.

#

Sorted with:
ssh root@homehost apk add unison ssh root@homehost ln -s /data/.unison /root/.unison unison ha.prf -auto -batch

#

That is the backup script.

#

Solved, but not pretty.

open orchid
# austere axle Solved, but not pretty.

yeah, i would agree with that, but hey if it works for now then it works. i do suggest looking out for a backup target that can work for you. like the ssh one when it makes it in and moving to that when you can.

remember haos is "just enough os" to run HA so adding stuff is unsupported and can easily break

austere axle
#

Yeah. I look forward to ssh as a backup target. Not sure why it wasn't there sooner.

open orchid
#

the reworked backup system is new and still getting new targets. i agree that having ssh earlieer would have been nice. but sometimes things just end up taking longer than hoped.