Comments (7)
Hi Graham,
I've not tested the script with binaries.
I know that it has some bug when the database contains strings with the " character, but I didn't have time to test it yet.
Bynaries,if I'm not wrong, are usually attached to the object as strings of chars.
Can you make a test, e.g. creating a database with a couple of docs, one with an attachment, and then donwload it?
If you send me the output, I could then do some work on this test case.
best
Daniele
Il giorno 26/set/2013, alle ore 20:48, Telephonic ha scritto:
Great work on these scripts! Thank you for writing these and sharing. It's great to be able to just grab a copy of a whole CouchDB database.
Did you design the scripts in mind to handle binary attachments? We seem to able to download a full database that includes binary attachments. The backup file and the original database size are similar. However, when I try to restore this database dump with binary files, I get the following error:
{"error":"bad_request","reason":"invalid UTF-8 JSON"}
Have you come across the above error before?
I have been able to restore pure JSON (non binary) databases without any trouble.
Thank you!
Graham
CTO, Telephonic—
Reply to this email directly or view it on GitHub.
from couchdb-dump.
This issue should be solved.
Can you check it?
from couchdb-dump.
This issue should be solved.
Can you check it?
from couchdb-dump.
Hi Daniel,
I'm very sorry for the slow reply here.
I've tested again and the attachments aren't included when using couchdb-dump.sh. There is no binary string within the downloaded file.
Were you able to get this to work in your tests?
thanks,
Graham
from couchdb-dump.
Dear Graham,
unfortunately at the moment I've no time to work harder on this project.
Sorry for this
best
Daniele
Daniele
http://www.danielebailo.it/ http://danielebailo.wordpress.com/
2014-08-17 0:59 GMT+02:00 Telephonic Communications Inc. <
[email protected]>:
Hi Daniel,
I'm very sorry for the slow reply here.
I've tested again and the attachments aren't included when using
couchdb-dump.sh. There is no binary string within the downloaded file.Were you able to get this to work in your tests?
thanks,
Graham—
Reply to this email directly or view it on GitHub
#2 (comment)
.
from couchdb-dump.
FYI; I looked at this issue whilst contributing some other fixes; the main issue is that requesting the docs output doesn't 'print' the binary content; example:
{"docs":[
{"_id":"4685ca2ba841112ed63ba386c0001e56","_rev":"2-e1432ed19858cdbc8b5c0c0bbf38f76a","value":"this is my binary document","_attachments":{"esxi.tgz":{"content_type":"application/x-compressed-tar","revpos":2,"digest":"md5-K1F3CiyZT2AjIaR3n7dFSQ==","length":1697995,"stub":true}}}
]}
In order for these to be managed too, I suspect you'd need to scan your entire output for references to attachement and then, programatically download the binary separately.
Then, during restore, you'd again need to monitor for import of the document, strip the attachment stanza, and post-successful-import, push the binary file to the document again. (If you try and import the document without stripping the attachement segment, it will fail with "missing_stub" as the referenced file doesn't exist)
It's a bit long winded, and unfortunately out of scope for the changes that i've been looking to implement.
from couchdb-dump.
fixed here #8
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.