xirixiz / dsmr-reader-docker

DSMR Reader in Docker.
https://hub.docker.com/r/xirixiz/dsmr-reader-docker
114 stars 33 forks source link

dsmr docker 2.5GB when exporting #295

Closed hemant5400z closed 2 years ago

hemant5400z commented 2 years ago

Support guidelines

I've found an issue and checked that ...

Description

Hi,

Im moving my docker to another server hence exporting both dsmr and dsmrdb. I noticed that dsmr docker is almost 2.5 GB. Expected the dsmrdb to be large as it contians the database but is uses the volume mapping to store the DB.

What I don't understand why the dsmr docker is that large as it does not contain any data only the configs. I also deleted the backupdir contents to be sure the issues was not there but still the dsmr docker is 2.5 GB not sure what it storing there.

Can someone help me to understand /cleanup this docker?

Expected behaviour

dsmr should be small similar approx 300-400 MB.

Actual behaviour

The dsmr docker has grown to a huge beast 2.5 GB when exporting.

Steps to reproduce

Export docker from Synology docker panel.

Docker info

Server:
 Containers: 10
  Running: 7
  Paused: 0
  Stopped: 3
 Images: 17
 Server Version: 20.10.3
 Storage Driver: btrfs
  Build Version: Btrfs v4.0
  Library Version: 101
 Logging Driver: db
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs db fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b1dc45ec561bd867c4805eee786caab7cc83acae
 runc version: 89783e1862a2cc04647ab15b6e88a0af3d66fac3
 init version: 12b6a20 (expected: de40ad0)
 Security Options:
  apparmor
 Kernel Version: 3.10.105
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 1.961GiB
 Name: HAGPAZ1-S-05
 ID: WYNU:4ZHT:AUDS:DN5A:G7N6:NVZS:TJCN:4NUF:GKWI:MU73:4AYY:THNS
 Docker Root Dir: /volume1/@docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Version

Docker compose

not sure if this is relevant

Container logs

not sure if this is relevant

Additional info

No response

xirixiz commented 2 years ago

Hi, do you run a db cleanup regulary? I run it each time the container starts (enabled it by default). You can find more in the "features" section: https://github.com/xirixiz/dsmr-reader-docker#features

Depending on old and unused data, this process might take some time.

xirixiz commented 2 years ago

Sorry, didn't read properly. There's actually nothing interesting to backup from the dsmr container. See the backup/restore options in the section: https://github.com/xirixiz/dsmr-reader-docker#features.

The reason dsmr data is big is that dsmr also creates db backups on a scheduled base (for each day of the week one backup if I`m not mistaken). You can find it as the mounted volume in you docker-compose file for the dsmr container, it most probably contains the word "backup" :)

hemant5400z commented 2 years ago

Hi,

I know there is a backup volume, however when exporting a container, the volume data is not exported ( I assume) but so be sure I deleted all the backups in the volume but still the container was claiming 2.5 gb export data.

Hemant

xirixiz commented 2 years ago

Hi,

I need to have some more details on this in order to help out.

I noticed you're using the Synology UI to export a container. I`m not sure what's happening in the background then. Perhaps you can export it manually and see if there's a difference in size.

docker export dsmr > dsmr.tar. When I export the image like that, the size doesn't exceed 100mb.

-rw-r--r-- 1 root root 99M Aug 29 08:52 dsmr.tar

Maybe you can also share your settings for spinning up a container (docker-compose.yml?)?

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.