Code Monkey home page Code Monkey logo

Comments (7)

dalgibbard avatar dalgibbard commented on August 27, 2024

Do you have any '_design' docs in your DB? They normally at the start or end of the dumped JSON if that helps.

from couchdb-dump.

dalgibbard avatar dalgibbard commented on August 27, 2024

Also; try running with 'bash -x <command_here>' to get some debug info :)

from couchdb-dump.

dalgibbard avatar dalgibbard commented on August 27, 2024

I suspect I hit this issue in a recent run; and it may be a different issue; the actual problem is when the dataset is small enough to be imported in a single job without needing to split it; it doesn't seem to format the file appropriately. If/when I do my next load of dev on this code, i'll look to identify and sort this too :)

One thought; if the design docs are at the end (with only the footer after it), and we remove that, the last document should have the final comma stripped. Could be something as simple as this throwing off the parser.

from couchdb-dump.

dalgibbard avatar dalgibbard commented on August 27, 2024

OK so I spent some time testing/debugging this - and I can't reproduce it.

[root@server dir]# /root/couchdb-backup.sh -R -H 127.0.0.1 -u admin -p pass -d db2 -f db.nodesign.json
... INFO: Separating Design documents
... INFO: Duplicating original file for alteration
... INFO: Stripping _design elements from regular documents
... INFO: Fixing end document
... INFO: Inserting Design documents
... INFO: Successfully imported 0 Design Documents
... INFO: Small dataset. Importing as a single file.
[]

[root@server dir]# /root/couchdb-backup.sh -R -H 127.0.0.1 -u admin -p pass -d db3 -f db.short2.json
... INFO: Separating Design documents
... INFO: Duplicating original file for alteration
... INFO: Stripping _design elements from regular documents
... INFO: Fixing end document
... INFO: Inserting Design documents
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
104  1357    0    78  106  1279  34090   545k --:--:-- --:--:-- --:--:--  624k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
104  1988    0    74  100  1914  22162   559k --:--:-- --:--:-- --:--:--  934k
... INFO: Successfully imported 2 Design Documents
... INFO: Small dataset. Importing as a single file.
[]

[root@server dir]# /root/couchdb-backup.sh -R -H 127.0.0.1 -u admin -p pass -d db4 -f db.short1.json
... INFO: Separating Design documents
... INFO: Duplicating original file for alteration
... INFO: Stripping _design elements from regular documents
... INFO: Fixing end document
... INFO: Inserting Design documents
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
104  1357    0    78  106  1279  23276   372k --:--:-- --:--:-- --:--:--  416k
... INFO: Successfully imported 1 Design Documents
... INFO: Small dataset. Importing as a single file.
[]

So with:

  • Small file for import, with two design docs
  • Small file for import, with one design doc
  • Small file for import with no design docs
    No issues were found.

@danielebailo I would suggest we can close this for now, and re-open if it can be reproduced, complete with the output from 'bash -x'.

from couchdb-dump.

dalgibbard avatar dalgibbard commented on August 27, 2024

Note that i've got a merge pending to fix the incorrect detection of _design docs in #23

from couchdb-dump.

danielebailo avatar danielebailo commented on August 27, 2024

Darren,
I just added you as collaborator.
You deserve it for the great work you are doing.
Thanks.
Daniele

Daniele

http://www.danielebailo.it/ http://danielebailo.wordpress.com/

2015-05-07 18:15 GMT+02:00 Darren Gibbard [email protected]:

Note that i've got a merge pending to fix the incorrect detection of
_design docs in #23 #23


Reply to this email directly or view it on GitHub
#17 (comment)
.

from couchdb-dump.

dalgibbard avatar dalgibbard commented on August 27, 2024

Cheers dude :D

from couchdb-dump.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.