Synology Docker installation data gone / Ideas for backup?

I’ve set up Influxdb 2.0 with a synology docker installation. I can send data to it, I can export the data to grafana, everything seems to be working fine.

However, some time today my influxdb completely erased itself. I went to its address, and had to set up the entire database from scratch. All my data and other settings (org name, tokens, buckets, etc.) were gone. The docker logs don’t show anything. I didn’t do anything to my Synology system or influxdb. Note the only issue was that my data and settings are gone. The docker container still works.

Can anyone think of why this happened?

Alternatively, can anyone suggest a way to backup my data? I’ve looked into the official docs, but I can’t get it to work. Say I want to back up to the shared folder /volume1/aaa. If I do cd /volume1/aaa I can go to the right directory, and when I use set /volume1/aaa in my arguments for the backup command I get “backup complete” with no errors, but when I ls that directory nothing is there. I can set my directory to a non-existing /volume1/bbb and it will still say “backup complete” with no errors.

Where are my influxdb data stored on my synology drive? I’ve gone to all directories associated with my influxdb container that I can think of/find, but they either don’t exist or are empty.

@asfddsaafsad Welcome to the community! Could you provide me with the docker-compose / docker command you used to spin up InfluxDB. Best practises for storing persistent data is binding to localhost:

version: "3.9"
    image: influxdb:2.0.9
      # Mount for influxdb data directory and configuration
      - ./data:/var/lib/influxdb2:rw
      - "8086:8086"

With regards to your question around backups. They will reside in the containers directory structure. for example:

mkdir backups
influx backup /backups/backup_$(date '+%Y-%m-%d_%H-%M') -t xFbNXIBqVd5-hgvFufIyw1ExBUo9DBiN1HZlNave1ZAfFg_GvzPlOr5D70fvS41C1FWwhZ1CNmk--0824EJqfg==

I created a folder called backups within the docker container and then ran the influx backup command.

  • make sure you point to the directory that you created
  • Make sure to use the root token generated at InfluxDB spin up
  • I would also advise binding your backups folder to host
1 Like

Hi. Thanks for the response!

I don’t remember the command I used to set up the docker, but if I’ve attached my influxdb container settings json file at the bottom. I would upload it as a document but I don’t think uploading json is supported? I deleted the value of the “id” field, just in case that was something meant to be confidential.

But yes the docker compose file you provided works, and now I can find where my data is being stored. Thank you!

I’ll try out the backup command as well, just in case I ever need it.

Influxdb configuration json:
“cmd” : “influxd”,
“cpu_priority” : 0,
“enable_publish_all_ports” : false,
“enable_restart_policy” : true,
“enabled” : false,
“env_variables” : [
“key” : “PATH”,
“value” : “/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”
“key” : “GOSU_VER”,
“value” : “1.12”
“value” : “2.1.0”
“value” : “2.2.0”
“value” : “/etc/influxdb2/influx-configs”
“value” : “9999”
“value” : “600”
“value” : “default”
“exporting” : false,
“id” :
“image” : “influxdb:latest”,
“is_ddsm” : false,
“is_package” : false,
“links” : ,
“memory_limit” : 0,
“name” : “influxdb”,
“network” : [
“driver” : “host”,
“name” : “host”
“network_mode” : “host”,
“port_bindings” : [
“container_port” : 8086,
“host_port” : 8086,
“type” : “tcp”
“privileged” : false,
“shortcut” : {
“enable_shortcut” : false,
“enable_status_page” : false,
“enable_web_page” : false,
“web_page_url” : “”
“use_host_network” : true,
“volume_bindings” : [
“host_volume_file” : “/docker/influxdb”,
“mount_point” : “/var/lib/influxdb”,
“type” : “rw”