Page 1 of 1

export whole database to csv (or other mysql readable)?

Posted: Fri Dec 21, 2018 9:34 pm
by martinkk
Hi,
Unfortunately something weird happened to my mysql database and the most important table got corrupted. It is the table with all the weatherdata stored every minute. I wrote a script that automatically imports the wswintoday.csv every day.

Is there a way to create something like the wswintoday for ALL database entries?
Currently I am at ~1,5 Million entries (>1000 days).

My idea was to just manually create the monthly csvs via the meteohub interface, but for some reason, I can only do that for a few selected months (why is that?) see screenshot.
export.png
export.png (4.78 KiB) Viewed 441 times
PS: yes, my mysql backup was bad.... *stupidme*

Thanks,
Martin

Re: export whole database to csv (or other mysql readable)

Posted: Fri Dec 21, 2018 10:18 pm
by martinkk
mayday!

looks like all the data of the missing months in the screenshot are gone....?!??!?!?!?!?!?!?!!?

BEfore I do something stupid, please help me:

I am saving the meteohub.backup file on a daily basis. What'S the correct way to import those properly?

Re: export whole database to csv (or other mysql readable)?

Posted: Mon Dec 24, 2018 2:25 pm
by martinkk
Finally I restored the data and used my available scripts to import all the monthly csv files to SQL. Done.