How to import data from existing docker containers

Hi,

I would like to “import” some data from existing docker containers into “addons” running under Home Assistant.
In Portainer ,which is installed under HA ,I can see that those containers are using the path in the host file system under “/mnt/data/supervisor/addons/data/”. But when I am logged in via SSH I do not see these folders.

Where are those folders located?
Is direct copy of files into these folder the recommended way or should I use a different approach?

Sadly quite a bit (?) vague… please be specific so people can help. I have at least 5 topics on ‘import’
EDIT; you speak of docker containers…are these add-on containers or the non-HAOS ones, what and why do you want to move(is it move?)…
If it is purely getting access to your HAOS addons data ?

Ok. I will try to be more specific.

I have a paperless container running on docker under my current machine. The current machine has no home assistant OS. There the docker was created via a docker compose file.

Now I would like to move to a paperless HACS add-on which to my understanding is also a modified docker container and does not support docker compose.

After I installed paperless via HACS I do not see any possibility to mount folders.
So I do not know how to move the existing paperless data base to the paperless installation installed via HACS.

In a different addon it was possible to adjust the path where the data is stored. So everything was fine. But in the case of paperless I do not see this option.

HACS only provides the option to download custom_applications, /config/custom_applications/hacs-name I would be surprised if that would also have a container.
Add-on applies to HAOS and indeed are containers, managed through HAOS.

Assuming you mean the latter one, any mapping should be documented and the options are provided by the Add-on owner… so you would have to contact them so see if they would like to extend it. The question would be why you want this for that particular add-on, if data-exchange is part of that solution, it would already offer something I would guess. Providing details like a name of the add-on and what data and why you want this may help further understanding.

ok. Thanks. I thought that HACS was also using docker. Atleast the AppDaemon HACS installation seems to be a docker.

Another problem. I have tried to use tvheadend via addons. It is a docker but unfortunately it is pretty outdated and does not recognize my Sat->IP tuner.
So I tried to install the updated docker image using portainer (installation in HA).

But Portainer has not write access to any folders and I am getting

Failed to deploy a stack: Container tvheadend Creating tvheadend Published ports are discarded when using host network mode Container tvheadend Created Container tvheadend Starting Error response from daemon: error while creating mount source path '/config/mydockerdata/tvheadend': mkdir /config: read-only file system

HACS itself is just a transport mechanism, the custom app installed, whatever goes behind that downloaded app, is different each time. Note that Appdaemon is offered as an add-on for HAOS

donot understand, the addon should provide the update, if any… I donot have this addon but tinkering outside the addon means a risk to not be in line with the addon expected setup (as defined by the dev)

That has a reason :slight_smile:

btw, if it is not supported a lot (for your needs), then you could fork it and create your own version but I would just raise a ticket with them and see what happens first

Thanks for the answer.

Forking a docker is above my competence.

At the end of the day this all means that I am not able to run tvheadend on the machine running HASS.
Also it is not possible to import my paperless docker and there is no way to keep my existing paperless database on the HASS machine.

These are real showstoppers.

It seems that there are (maybe) two workarounds possible

  1. HASS in a VM
  2. two separate machines.

These options are not very desirable in my case. VM is too resource intensive for my server so I would have too purchase new hardware and two separate machines is not great.

But thanks for your reply anyway.
Think I will stay with my old homeautomation for the time being. Too sad because I could see some benefits of HASS.

I still donot get it. When you install HAOS with or without VM, then you have the option to install the add-on using HAOS. If the add-on does not do what you want it to do then you should either raise a bug (if working before) or a feature request with that add-on.
There is no need to dive into separate docker things for add-ons, it 99% sure won’t work with HAOS that way.

Alternative is that you use the docker-version of tvheadend…no clue if that covers your needs but then you need to find a way to integrate with HAOS, no clue if that works as I donot know this application.

Yes, I could try to report issues. But in the tvheadend case, the Addon was not updated for 2 years. So I guess it is not really maintained anymore but
I will give it a try.
In paperless it is a HACS addon and no docker, so I have no clue what to do. Maybe I could fiddle around with some paperless export import functions if such functions exisit.

this is the docker version and this is updated regularly
tvheadend/tvheadend: Tvheadend is the leading TV streaming server for Linux with ATSC, DVB-C/C2, DVB-S/S2, DVB-T/T2, IPTV, SAT>IP and unix pipe input sources (github.com)

I am aware of this repository. But how can I use it within HACS?

I am not sure if you mix up things or mistype. HACS is only for downloading custom_components and re-reading above I fear the first.
Let’s do one step back: I am assuming you installed HA as HAOS
The above repo can not be installed as part of HAOS, ixt would require a separate docker-environment next to HAOS, so if your installation and/or your server can handle that or you have a separate mahcine (e.g. a NAS) then you could use that and ‘integrate’ it using a panel / webcard. I cannot see any other integration functionality this quickly so assume it is only a webpage shown in a HA frame.
If you cannot install dockerenv next to HA then you have two choices

  • create your own fork for the addon and fix the issue you have
  • wait for the add-on to respond to your fix-request

btw, just checked the addon on github and it seems dead indeed, most issues were auto-closed as no one answered so seems unlikely that you will get what you need.
So you are probably left with setting up a separate docker-env for the main repo…if that indeed supports your IP tuner that is

EDIT: I tried the docker one but it is not working for my IPTV provider (or: I am not sure why it is not working). I also noticed that the add-on is useing the old version of thveadend and there are newer ones, cloning the addon and changing that version is not a lot of work (mostly wiaitng) so I can try to do that but I will not support that new version myself, i.e. if the version change works, that is the last I will do, if it does not change…you are again on your own. Can you at least doublecheck if the tvheadend.org supports your tunes?

EDIT2: you can also check existing forks, there are quite a few out there which seem to be more active
Forks · GauthamVarmaK/addon-tvheadend (github.com)