I created a new cluster. Now I want to import my existing cluster’s buckets along with all the documents in my new cluster.
I tried taking export for each of the bucket from the existing cluster and then importing it. But while importing, I got an error “Bash cbimport command not found”.
Even I tried using cbdocloader but got the same error.
Please suggest what I need to do to replicate the existing cluster’s bucket details into new cluster.
Hi @esita.banerjee, you’re on Mac, correct? Is it a simple path issue? E.g. does
/Applications/Couchbase\ Server.app/Contents/Resources/couchbase-core/bin/cbimport work for you?
No I am not on Mac. And the path for cbimport is /opt/couchbase/bin.
I have checked already that cbimport command is present in this folder.
My mistake, I thought from another post you were on Mac. Still, this seems to be a simple path issue, unless I’m overlooking something (and apologies if I am)? E.g. is
/opt/couchbase/bin in your path? Does running
@graham.pople : No /opt/couchbase/bin/cbimport doesnot works. I am getting an error: “No such file or directory”.
@esita.banerjee thank you for confirming. I’m confused then… Could you please post the output of
ls -latr /opt/couchbase/bin/cbi*? I just want to confirm that the files look valid, have the executable flag, etc.
@graham.pople : Please fimd the screenshot for the output of "ls -latr /opt/couchbase/bin/cbi"
Thanks for sending that through @esita.banerjee. Just so I can see the error myself, and make sure we’re covering all bases, could you possibly send a screenshot of you running
/opt/couchbase/bin/cbimport and the result please?
@graham.pople :Please find the screenshot:
Can u please let me know what is the error?
@esita.banerjee well there’s no error here, and the command is running successfully and printing the help message as you’ve not provided any of the required arguments. You need to tell it what data to import, please see https://developer.couchbase.com/documentation/server/current/tools/cbimport.html for more info.
@graham.pople : I tried with this command but got the error: bash cbimport: command not found.
command : cbimport json --cluster http://localhost:8091 --bucket ChecklistLibrary --dataset file:///home/adcv2/Desktop/bucketLibrary/ChecklistLibrary.json --format lines --username Administrator --password Pwcwelcome1 --generate-key %metaid% --log-file /opt/couchbase/bin/import.log
@esita.banerjee try that command but with
@graham.pople : Thanks a lot. This works. Was stuck in this issue for so long time… thanks a lot. But I have a question as why I need to provide /opt/couchbase/bin/ along with cbimport command?
@esita.banerjee fantastic, I’m glad you’re past it. It’s just how paths and commands work on Linux, I recommend a Google for that one All the best.
@graham.pople Thanks a lot.