[RavenDB] import/export in JSON format

887 views
Skip to first unread message

fschwiet

unread,
May 20, 2010, 12:04:56 AM5/20/10
to ravendb
I was wondering if via Raven.Smuggler.exe or some other means, if it
is possible to save the contents of a database in JSON. I think one
file per object would be nice. I think I would prefer that indexes
are exported as well, though I'm not sure about that.
I would like to do this in order to keep seed data for a system
under source control.

btw Congratulations on the launch.

Ayende Rahien

unread,
May 20, 2010, 12:07:35 AM5/20/10
to ravendb
Smuggler will export all the data in a json format.
The format is indexes and then documents.
The code is a bit complicated because it has to handle streaming the whole thing in, but the format itself is pretty clear. 
You can read that by unzipping the file and opening in any text editor.

One file per document may result in large number of files. For example, MVC Music Store would generate over 600 hundred

mare

unread,
Jan 25, 2014, 3:30:52 PM1/25/14
to rav...@googlegroups.com, aye...@ayende.com
I tried exporting data from my embedded database using Management Studio and using Smuggler command line. In both cases, the generated dump file contains gibberish (unreadable content, mixed up characters, no JSON). What am I doing wrong? Is there some kind of cmd line switch required?

Oren Eini (Ayende Rahien)

unread,
Jan 26, 2014, 4:26:38 AM1/26/14
to mare, ravendb
The output of the smuggler is actually gzipped, you can run it through winrar or any decompression program to get the plain text.

Join us in the RavenDB Conference: 7 - 11 April, 2014

Oren Eini
CEO
Hibernating Rhinos
Office:    +972-4-674-7811
Fax:       +972-153-4622-7811



Reply all
Reply to author
Forward
0 new messages