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
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
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:
influxdb.conf
), uncomment the bind-address
configuration setting on the remote node.bind-address
value to <remote-node-IP>:8088
-host
parameter when you run commands.If you want to back up everything you can use:
influxd backup -portable <path-to-backup>
As per:
And to restore everything:
influxd restore -portable path-to-backup
As per:
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
Hi I head a faulty installation where the backup command wasn’t working.
So needed to migrate a influx 1.7 DB.
So to migrate it, create a new server / Virtual machine. But I think this will also work with a container.
Stop the services on the source DB.
Copy the var/lib/influxdb folder to a backup location. (Including all the subfolders and files)
On the new server, install influx 1.7, create an empty DB with the same name.
Create a user so you can access the data remotely.
Copy BACKUP/influxdb/data/ “DATABASE” → var/lib/influxdb/data/
On the destination server delete the var/lib/influxdb/meta/“File” and copy the one from your backup to that location.
Add the permissions so influx can read the new files:
cd var/lib/influxdb
chmod -R 777 *
start the influx db services on the new server
And in my case I could access the data and head a working influx db instance.
As I’m not a Linux master I just use the chmod 777 command to get it working. But if you plan to keep using this server please make sure that you change this back so only influx db has richts on the files.
Hope someone can use this information
Not sure if it is still running, I hope not! but bellow is how I migrated data with only the DB files left.