ioBroker.docker
ioBroker.docker copied to clipboard
Influxd not found - Add support for backing up remote InfluxDB with BackItUp adapter
Hi buanet,
thank you for the great work with the iobroker docker container.
I have an issue with the backup of my influxdb with backitup adapter after migrating my docker image to buanet/iobroker:v5.2.0. Can you add the influxd executable to your docker image again. With the previous version of your image (sorry i can't remember which version it was, because i used the latest-v5 tag) the backup works well. I don't want to install the complete influxdb server in my iobroker docker container, because i have an additional container only for influxdb server. Here is the error message:
influxDB: Error: Command failed: influxd backup -portable -database iobroker /opt/iobroker/backups/influxDB_2021_10_06-06_26_25_ioBrokerBackup_backupiobroker /bin/sh: 1: influxd: not found
Thank you
Br, Daniel
Are you sure that influxd was ever included? I would expect not ...
Hi Daniel, unfortunately backup and restore of external databases (redis, influxdb, mysql, postgresql) using backitup is not officially supported when running ioBroker inside a Docker container (and therefore should be grayed out in settings of new versions of the backitup adapter). We are actually doing some testing to determine what's possible and what's needed to make the backup routines for external databases run under Docker.
For me it's hard to imagine that backing up an external influxdb was working with earlier versions of the container "out of the box". Nevertheless the behavior might have changed because the containers base image in v5.2.0 changed from debian buster to debian bullseye slim... It might be possible that you can get it running again by just adding influxd to your container. But to be honest: I just don't know at this point. :)
Regards, André
Hi @buanet,
thank you for the fast response. I will check that with the older images and get in touch again.
Br, Daniel
Hi @buanet,
i found a solution which works for me. My influxdb (version 1.8.10) is running in docker. So i downloaded the influxd executable for version 1.8.10 (influxdb-1.8.10_linux_i386) and copied it to the /usr/bin folder of my iobroker docker container with the "userscript_everystart.sh".
The script looks like: ` echo ' ' echo "I'm your startscript userscript_everystart.sh. I will run on every startup of the container." echo ' '
echo "Copy Influxd to /usr/bin" cp -v /opt/userscripts/influxdb-1.8.10_linux_i386/usr/bin/influxd /usr/bin/influxd chmod +777 /usr/bin/influxd
exit 0 `
With this solution the backup is working again. I know that this is not the perfect solution, but it works.
I hope we can find a solution that works out of the box, but for now i can live with that.
Br,
Daniel
We are working on official support of influxdb backup with backitup. So this issue should stay open until the feature is available.
Regards, André
Influxdb 1.8 with backitup and this iobroker docker image was working perfectly fine on my side. I just put influxdb to the PACKAGES variable. But: Since I migrated to Influxdb 2, backup is greyed out in backitup adapter and I don't know how to install influxdb v2 using PACKAGES variable.
Looking forward to an official solution.
How you migrated to influxdb2? In fact backitup also need to be adjusted I think tobackup influxdb2 ... so also an issue needs to be created there ...
Backitup adapter has already an issue: https://github.com/simatec/ioBroker.backitup/issues/551
I described the steps of migration in the forum: https://forum.iobroker.net/topic/46098/test-adapter-influxdb-2-0/164?_=1640334257256
@Sputnik24 This has nothing to do with your migration to influxdb 2. Backing up external databases in a Docker environment is not supported at the moment. Therefore it is greyed out by the backitup adapter. I've planned to dive into this after the holidays. Testing environment is still ready. But changes in the Docker image as well as in the adapter have to be made. I'll post updates here when the feature comes to beta and is ready for testing.
Regards, André
@buanet Any update here? influxdb backup is meanwhile supported by backitup with 2.3.0. According to readme (https://github.com/simatec/ioBroker.backitup/wiki/ioBroker.backitup-Wiki-English), influxdb CLI must be installed on iobroker system for influxdb v2. So, I would assume, adding this package to container should be sufficient to enable influxdb v2 backup? Thank you.
Nope, no update. As I do not use Influx DB Backup by backitup the only thing I need to know is how to install Influxdb cli. Is this the only way?
Regards, André
Hi André,
sieht so aus. Bei mir läuft influxDB ebenfalls in Docker ^^. Die Anleitung für die aktuelle Version ist hier: https://docs.influxdata.com/influxdb/v2.3/tools/influx-cli/?t=Linux
Edit: So installiert der influxDB Docker Container die CLI: https://github.com/influxdata/influxdata-docker/blob/dcd031d0eb05e1f0e213f90324a6d8a3914aa525/influxdb/2.3/Dockerfile (ab Zeile 45)
VG Daniel
@Sputnik24 Danke für die Links.
Edit: So installiert der influxDB Docker Container die CLI: https://github.com/influxdata/influxdata-docker/blob/dcd031d0eb05e1f0e213f90324a6d8a3914aa525/influxdb/2.3/Dockerfile (ab Zeile 45)
Das ist allerdings Mist. Wir bieten das Docker Image auch für 32 bit arm devices an. Soweit ich das sehe gibt es aber für die influx cli in v2 keine 32bit Unterstützung mehr. Was machen wir da nu? Würde ungern die Images mit unterschiedlichen Features bereitstellen wollen...
Jemand eine Idee?
MfG, André
@buanet Ideen ja, Aufwand kann ich nicht einschätzen.
Idee 1: Im dockerfile einen Architekturcheck einfügen und wenn x64, dann influx v2 cli installieren. Idee 2: Eigenverantwortliche Umgebungsvariable. Ich kann über das Setzen eine Umgebungsvariable die Installation von influx v2 cli ermöglichen und muss selbst sicherstellen, diese Variable nur auf einem x64 System zu setzen.
Gibt es schon einen ungefähren Termin für die Bereitstellung von der Lösung zum MySQL Backup im BackItUp Adapter? :)
I released a new beta version v7.2.0-beta.1 and started some documentation for activating and running external database backups.
Any help appreciated.
For details and questions please join me at the "docker-image" channel under "BETA TESTING & FEEDBACK" on ioBroker Discord. Thank you.