Move databse to a new server - tutorial?

Hello
is there a step by step tutorial - to move influxDB’s from a Raspberry Pi to a VM?
both have the same influxDB 1.8

have a nice day
vinc

I would use
https://docs.influxdata.com/influxdb/v1.8/administration/backup_and_restore/

Antony.

@Pooh Antony Merci
the link is good - just not sure i understood everything right.
it’s just as soon it it is done i have to change node Red too. so i don’t should lose to much time with try and erroe

have a nice day
vinc

Hi,

I have the same issue but of course slightly different.
My problem is the existing database is InfluxDB 1.2.4 (yes, very old) and I need to move about 250GB of data to the new server (InfluxDB 1.8.6).

The influxdb.conf file on the old server does not mention port 8088.
However I did see this:

$ influxd backup -help
Downloads a snapshot of a data node and saves it to disk.

Usage: influxd backup [flags] PATH

    -host <host:port>
            The host to connect to snapshot. Defaults to 127.0.0.1:8088.
    -database <name>
            The database to backup.
    -retention <name>
            Optional. The retention policy to backup.
    -shard <id>
            Optional. The shard id to backup. If specified, retention is required.
    -since <2015-12-24T08:12:23>
            Optional. Do an incremental backup since the passed in RFC3339
            formatted time.

backup: flag: help requested
$

It mentions port 8088 there, but it’s not clear to me how that option is to be used.

Thanks.
Jeremy Begg

Hello @JeremySTX,
To enable the port for the backup and restore service:

  1. At the root level of the InfluxDB config file ( influxdb.conf ), uncomment the bind-address configuration setting on the remote node.
  2. Update the bind-address value to <remote-node-IP>:8088
  3. Provide the IP address and port to the -host parameter when you run commands.

If you want to back up everything you can use:

influxd backup -portable <path-to-backup>

As per:
https://docs.influxdata.com/influxdb/v1.8/administration/backup_and_restore/#backup-examples

And to restore everything:

influxd restore -portable path-to-backup

As per:
https://docs.influxdata.com/influxdb/v1.8/administration/backup_and_restore/#restore-examples

Hi,

Thanks for responding and for the documentation references. After a little mucking around I got the backup command running, but it doesn’t manage to save any data.

I think there must have been a change to the backup protocol between version 1.2.4 (the system where the data is) and version 1.8.6 (the system I want to move the data to). Here’s what hapens:

On the InfluxDB 1.8.6 system:

$ influxd backup -database solarmon_30min -host REDACTED:8088 /idb_backups/30min_31-Jul-2021/
2021/07/31 15:41:53 backing up metastore to /idb_backups/30min_31-Jul-2021/meta.00
2021/07/31 15:41:53 Download shard 0 failed copy backup to file: err=<nil>, n=0.  Waiting 2s and retrying (0)...
2021/07/31 15:41:55 Download shard 0 failed copy backup to file: err=<nil>, n=0.  Waiting 2s and retrying (1)...
2021/07/31 15:41:57 Download shard 0 failed copy backup to file: err=<nil>, n=0.  Waiting 2s and retrying (2)...
...etc...

On the InfluxDB 1.2.4 system, the following is displayed in /var/log/syslog:

Jul 31 15:41:53 sol influxd[24619]: [I] 2021-07-31T06:11:53Z read request: invalid character '\x01' looking for beginning of value service=snapshot
Jul 31 15:41:55 sol influxd[24619]: [I] 2021-07-31T06:11:55Z read request: invalid character '\x01' looking for beginning of value service=snapshot
Jul 31 15:41:57 sol influxd[24619]: [I] 2021-07-31T06:11:57Z read request: invalid character '\x01' looking for beginning of value service=snapshot
...etc...

I tried it with and without the -portable option and it didn’t make any difference.

Thanks,
Jeremy Begg