scline / docker-cacti

Cacti version 1+ under Docker
113 stars 57 forks source link

Persistent storage option for rras? #39

Closed SoulGit closed 6 years ago

SoulGit commented 6 years ago

Does it make sense to store the RRAs in a persistent location so as to not have to rely on a backup scripts? If so, is the current storage location simply /cacti/rra?

scline commented 6 years ago

Yes, the default location for this installation would be /cacti/rra and is configurable from within the cacti GUI or via direct MySQL edit to the settings table.

For persistence I personally have been utilizing dockers volumes functions to mount this (and plugins) directory to the local host so during a restart or update they are not lost.

For docker-compose it would look something like:

version: '2'
services:
  cacti-master:
    image: "smcline06/cacti"
    ports:
      - "80:80"
      - "443:443"
    environment:
      - DB_NAME=cacti_master
      - DB_USER=cactiuser
      - DB_PASS=cactipassword
      - DB_HOST=db-master
      - DB_PORT=3306
      - DB_ROOT_PASS=rootpassword
      - INITIALIZE_DB=1
      - TZ=UTC
    volume:
      - cacti-rra-volume:/cacti/rra
      - cacti-plugins-volume:/cacti/plugins

https://docs.docker.com/compose/compose-file/compose-file-v2/#volumes

Does this answer you question correctly?

scline commented 6 years ago

Hey @SoulGit I have not herd back from you if this issue is solved by using docker volumes or not. If there is more to this please feel free to re-open.

Closing this issue for now.