Page 1 of 1

moving out from docker

Posted: Fri Aug 07, 2020 8:16 pm
by fathom
i've been running under docker for a couple weeks. now i'm looking at moving to a direct install. i'd like to retain as much as possible from my docker zm settings (and zmes settings). any pointers? is there a way to "commit" a docker container in some way?

Re: moving out from docker

Posted: Fri Aug 07, 2020 11:32 pm
by burger
All settings are stored in the db. Events, however may be lost. You 'can' save events, but it's more trouble, so if you don't need them, then just backup and restore the db from docker.

Code: Select all

# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql

# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
NOTE: the above restore is for docker only. If you are restoring to a normal mysql installation, then see https://wiki.zoneminder.com/MySQL which says something like

Code: Select all

mysql -u root -p zm < dbbackup.sql 

Re: moving out from docker

Posted: Sat Aug 08, 2020 2:32 am
by fathom
oh cool. i guess the various ini's are accessible still so i can copy them around as needed.

i may still just stick with the docker image. i'm torn still. it's pretty convenient and it works great. my first install of zm was just normal install and i couldn't get event notifications to work, but they work great in this docker image...

the only reason i'm thinking of moving out of the docker environment is to experiment with compiling zm code. i'm thinking i might try compiling to the version in the docker file and replacing the components i'm working on. but it's good to know the config stuff is mostly self-contained.