will docker containers survive factory reset?

  • Hi,

    I'm running LE10.0 on some old x86 celeron mini box. everything running great, but due to few years of usage, there is bunch of addons/repos and kodi crashes once per day, so I would like to give it a clean start by removing .kodi folder.

    I read on this forum that factory reset of LE is considered to be: delete .kodi, delete .cache, delete .config

    right?

    my question is: will my docker containers running on that machine survive this? I installed some docker addon from official repo and its running great.

    wouldn't like to lose them or troubleshoot what happened to them after removing these 3 folders...

    Will they continue to run without docker addon installed? if not - will they magically start working after docker addon is again installed (after clean .kodi folder is created again)?

    thanks!

  • The answer is simple: YOUR DOCKER CONTAINERS WILL NOT SURVIVE THE FACTORY RESET.

    You have a major problem. The strategy that I use from the beginning of using docker is:

    1.- Saving everything related to docker in /storage/.config/dockers:

    • Always use the SSH command line to launch new containers. This command line is saved in a script. For example: my launch command for docker tvheadend was saved in /storage/.config/dockers/9981-tvheadend.sh
    • Forgetting to use kodi addons to launch new containers.
    • All settings for each of my containers are in /storage/.config/dockers. For example: my tvheadend settings are in /storage/.config/dockers/tvheadend.

    2.- Every three days I do an automated backup using cron on a different drive from the LibreELEC boot disk, deleting the backups older than 14 days (my old memory only remembers what I did yesterday and the day before yesterday). On the first day of each month I make an additional backup deleting the oldest ones of 3 months.

    In this way I have no problem in recovering all or part of the system after a factory reset.

    There are no magic solutions for your problem, perhaps saving the data directories of your containers before doing the factory reset may be the solution. Go thinking about using another method, good luck!

    Edited 2 times, last by elonesna (October 18, 2021 at 12:45 PM).

  • Hi,

    I have configured containers from ssh, so i configured them to have disk (where they keep databases etc) and scripts outside of userdata folder.

    But still, docker root_data is inside .kodi/ -

    Docker Root Dir: /storage/.kodi/userdata/addon_data/service.system.docker/docker

    so, you configured docker root dir to be in custom location? did you use a procedure such as this:

    How to move docker data directory to another location on Ubuntu
    Docker is a popular container management platform that can dramatically speed up your development workflow. It is available as a package on major Linux distrib
    www.guguweb.com

    ?

  • you configured docker root dir to be in custom location?

    Docker location is not important to me because I only use containers in which I am not interested in their location but only the location of the working directories that I define myself, and avoid specific docker volumes and networks. I can't avoid images but I don't use solitary images either and they are always associated with containers that create these images if necessary.

    Can you live without knowing where the 'tar' command is? I do.

    Edited 3 times, last by elonesna (October 19, 2021 at 4:05 PM).

  • OK, i managed to keep the dockers, factory reset done, dockers alive.

    i just moved data-root dir to another place outside of kodi folder, and told newly installed docker addon where is it (under /storage/.kodi/userdata/addon_data/service.system.docker/config/ - edit the yml or json here, not sure which one is it

    for future reference if someone finds this thread. but keep in mind I already moved docker permanent volumes for data outside of kodi folder.