Comments (7)
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.
Also; try running with 'bash -x <command_here>' to get some debug info :)
from couchdb-dump.
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.
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.
Note that i've got a merge pending to fix the incorrect detection of _design docs in #23
from couchdb-dump.
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.
Cheers dude :D
from couchdb-dump.
Related Issues (20)
- Backup / restore all databases? HOT 4
- Stuck at 'Stage 1 - Document filtering' HOT 6
- Taking backup for all revisions HOT 1
- Is it possible to set the password with a environment variable? HOT 4
- ERROR: Curl encountered an issue whilst dumping the database HOT 1
- Backup exits with exitcode 1 in silent mode HOT 1
- can dump all revisions docs HOT 4
- Error when restoring: POST body must include `docs` parameter. HOT 4
- Document update conflict upon restore HOT 3
- couchdb-dump doesn't work with busybox's grep anymore HOT 1
- Backup all databases HOT 9
- Invalid UTF-8 JSON error while restoring large file HOT 5
- Restore backup into non-empty database HOT 1
- Backup does not work with pouchdb-server
- Question: How does the restore handle duplicate data? HOT 1
- compilation_error when attempting to restore database
- CouchDB Reported error, need some advice on how to debug HOT 1
- How can exclude some databases from backup? HOT 1
- Nice to have a 'drop database' option
- Intermittent backup issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchdb-dump.