andig / dbcopy

Configurable database backup tool for volkszaehler.org
http://volkszaehler.org
3 stars 4 forks source link

Read "measurement" value from config file #8

Open joekokker opened 4 years ago

joekokker commented 4 years ago

Overwrite preset influx measurement name with the one from the config file. This restores expected behavior.

andig commented 4 years ago

Typo with the %%s? Has this change been tested?

joekokker commented 4 years ago

Yes I use it in my system. I have a custom measurement name "vzlogger" instead of the default "data". I do not know php very well, therefore it might not be the nicest solution.

%%s is no typo. % is the escape character for % in sfprintf

andig commented 4 years ago

Why does the % need escaping here? All you want to do is replace %s by the actual uuid which is what sprintf does?

joekokker commented 4 years ago

I am creating the query where I substitute the measurement name. The uuid is substituted in a second step, which I left unchanged.

I want to replace 'data' with the name specified in the config file as you probably intended in the first place.