I’m using cbtransfer to backup data from a bucket to a CSV file. The problem is that when I try to restore data, the document appears with metadata inside it.
For example:
In the original bucket the document has the key:
0001:2014-01-01T00:00:00.000+0000
And the value:
{
“value”: 2.479090921778098
}
When I backup it to a CSV file and restore in another bucket appears the following value:
{
“cas”: 1457544300929482800,
“dtype”: 1,
“rev”: 1,
“value”: “{"value":2.479090921778098}”,
“flags”: 33554432,
“expiration”: 0,
“vbid”: 149,
“id”: “0001:2014-01-01T00:00:00.000+0000”
}
This issue has been reported by a few people, I shall take a look tomorrow but I suspect that there may be a way to avoid adding this metadata by using the extra argument try_xwm=0 (I will have to test the exact behaviour though).
That said, I am not sure that cbtransfer was designed to perform a backup to csv files and then to restore from these same csv files. As the documentation states cbtransfer is designed to be a ‘lightweight extract-transform-load (ETL) tool that transfers data between clusters and to and from files’.
My question to you would be, if you intend to use this as a backup which you wish to later restore, why not instead use the tool cbbackup which has been specifically designed for this task, is there a reason that you want your backup format to be in the form of .csv files?
The result is the same using the argument tre_xwm=0
My reason to use CSV is that I’m thinking to use a external tool to generate the CSV file and import it into couchbase, so I need to understand the formats to import and how it works
If cant’ import csv then what is the purpose of export and why it’s documented on couchbase website ?
This topic is already 184 days old, but still in open state!
I’m also really frustrated this hasn’t been resolved. We have to restore data to a client and the most recent backup we have is a csv export. I need this to work!
Same here … I am facing same problem , why this hasnt been resolved yet. Moreover , I had to resort to cbtransfer because cbrestore does not import all the documents as exported using cbbackup … that is another issue…