-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrating from mysql-only to mysql-influxdb CHORDS #171
Comments
Transferred the 3d CHORDS site to a new portal, preserving the configuration and the time series data. The process follows these steps:
Note: Larger databases can take an inordinate amount of time to process the queries (typically 40 minutes as above). It seems that the mysql query optimization is not working effectively. This is tolerable, but could be looked into. |
It looks like you can save yourself some effort, and the consequences of opening a potentially large file in a text editor, by creating the file w/ the header and then appending to it: cat > 3d-influxdb-line.txt <<-EOF
# DML
# CONTEXT-DATABASE: chords_ts_production
EOF
echo "SELECT CONCAT('tsdata,inst=', m.instrument_id, ',site=', instruments.site_id, ',var=', vars.id , ',test=false', ' value=', m.value , ' ', UNIX_TIMESTAMP(m.measured_at), '000000000') from measurements as m left outer join instruments on instruments.id = m.instrument_id inner join vars ON vars.shortname LIKE m.parameter AND vars.instrument_id=instruments.id ;" > query.sql
mysql -s -r chords_demo_production < query.sql >> 3d-influxdb-line.txt |
Great suggestion. |
It's working, more or less. Will have to solve the slow query problem when it becomes critical. |
This mysql backup script will allow you to backup a mysql database while excluding the data from selected tables. Might be able to use it to transfer the portal metadata.
The mysql query from #170 can be used to capture the measurement data to be transferred to influxdb.
Done together, we should be able to completely transfer an old portal to the new influxdb version.
The text was updated successfully, but these errors were encountered: