Page 1 of 1

Docker automatic backup error - SOLVED

Posted: Tuesday 07 January 2025 22:28
by barry44
Version: 2024.7
Platform: Docker in bookworm raspian
Plugin/Hardware: Raspberry 4
Description:
Hello

I've recently migrated my domoticz to docker.
Everything is working fine, except automatic backup.
When the daily (or monthly or yearly) folder is empty, the file is created
But when the file already exists (for example backup-hour-16-Domoticz.db) , I get an error in log " Error: Error writing automatic hourly backup file"

My docker compose is standard one with a volume

Code: Select all

./config:/opt/domoticz/userdata
And the config file has thoses rights

Code: Select all

drwxr-xr-x  6 pi pi 4096  7 janv. 20:16 config
Am I missing something ? I think there is a right problem, but no idea where to search.

Thank's for your help

Re: Docker automatic backup error

Posted: Tuesday 07 January 2025 23:16
by waltervl
Did you install docker following the instructions here https://wiki.domoticz.com/Docker#Instal ... nux_system

Especially the command for permissions:

Code: Select all

sudo usermod -aG docker ${USER}

Re: Docker automatic backup error

Posted: Tuesday 07 January 2025 23:37
by barry44
Hello

Yes, I follow this guide.
I can't really remember if I run this command. But I think so.

Code: Select all

pi@xxxxx:~ $ sudo echo ${USER}
pi
pi@xxxxx:~ $ id
uid=1000(pi) gid=1000(pi) groupes=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),107(render),109(netdev),995(docker),997(gpio),998(i2c),999(spi
pi@xxxxx:~ $ getent group docker
docker:x:995:pi
And I have PUID and PGID set to my pi user (=1000) in docker-compose environment.

Re: Docker automatic backup error

Posted: Friday 17 January 2025 20:51
by barry44
Finally, I have solved it by deleting daily/weekly/yearly folder, and let domoticz to recreate them

Now it works normally.

I don't understand why, the permissions seem to be the same. But it works.