Export Influxdb2 to CSV with influx query

I am moving data (millions of records) from one Influx 2.6 server to a new one. I am exporting data with the following command

influx query --file influx_query --raw > ./output/1662

I am getting the following error

,context canceled,

The error is inconsistent, but appears to be a timeout or row limitation.

Can anyone explain this error, or provide an alternative to move this data.