I was trying to implement an incremental backup procedure with the InfluxDB v1.5.0 OSS.
I did the backup:
[root@user dir]# influxd backup -portable -database dbname -since 2018-03-14T11:11:11Z ./new_backup/
2018/03/15 17:10:12 backing up metastore to new_backup/meta.00
2018/03/15 17:10:12 backing up db=dbname
2018/03/15 17:10:12 backing up db=dbname rp=autogen shard=164 to new_backup/dbname.autogen.00164.00 since 2018-03-14T11:11:11Z
2018/03/15 17:10:12 backing up db=dbname rp=autogen shard=165 to new_backup/dbname.autogen.00165.00 since 2018-03-14T11:11:11Z
2018/03/15 17:10:14 backup complete:
2018/03/15 17:10:14 new_backup/20180315T171012Z.meta
2018/03/15 17:10:14 new_backup/20180315T171012Z.s164.tar.gz
2018/03/15 17:10:14 new_backup/20180315T171012Z.s165.tar.gz
2018/03/15 17:10:14 new_backup/20180315T171012Z.manifest
For restore I used the command as below:
[root@host dir]# influxd restore -portable ./new_backup/
2018/03/15 18:31:02 error updating meta: DB metadata not changed. database may already exist
restore: DB metadata not changed. database may already exist
The only way I could find to successfully restore the backup was to drop the database (included in the backup) before the restore. But this way I lose all the data before the -since date defined in the backup.
Do you know how can I restore a partial backup without losing the data already in the database?
Thanks in advance