How do I import/export my data?

We recommend using the Smuggler tool to manage exporting from or importing to a RavenHQ database. For documentation of the complete set of Smuggler options, please view the RavenDB Smuggler documentation.

Exporting

Raven.Smuggler out https://lark.ravenhq.com export.ravendump 
--database=MyTestDatabase
--api-key=627707FA-59AF-44A4-BF25-0BCB2A4E75F3
--negative-metadata-filter:@id=Raven/Replication/Destinations
--negative-metadata-filter:@id=Raven/Backup/Periodic/Setup
--negative-metadata-filter:@id=Raven/Backup/Periodic/Status
--negative-metadata-filter:@id=Raven/Replication/VersionHilo

This will export all indexes, documents, and attachments in MyTestDatabase to a file named export.ravendump.

NOTE: This process specifically excludes a number of documents that should not be included when exporting from a RavenHQ database. It is important to exclude those documents, as it will cause issues if they are present during the import process.

Importing

Raven.Smuggler in https://lark.ravenhq.com export.ravendump 
--database=MyTestDatabase
--api-key=627707FA-59AF-44A4-BF25-0BCB2A4E75F3
Have more questions? Submit a request

5 Comments

  • 0
    Avatar
    Nigel Ainscoe

    This exports the data into a binary form (BSON?). It would be useful to have an indication here of how it can be converted to a human readable form. When I try and sell this whacky Document DB idea to a more traditional and conservative business they will likely want to see their data come back from the cloud ;-)

    There is no mention of this in the main RavenDB impot/export documentation either.

    Kind regards,

    Nigel Ainscoe

  • 0
    Avatar
    Manuel Ornato

    +1 for a text based export (xml, json, csv, whatever). It's important to have the feeling we can easily get our data out of ravenHQ if ever needed.

  • 0
    Avatar
    Dan Bishop

    Manuel, the .dump file generated by Raven.Smuggler is just gzipped JSON, so you should be able to get your plain-text data from there.

  • 0
    Avatar
    Kamran Ayub

    I'm getting a 404, both from the Studio (import) and the smuggler. I'm on Raven 2750, but I exported and then tried 2708 (current HQ build) Smuggler to no avail.

  • 0
    Avatar
    Bgmills74

    It does not work for me. I used to import to a local db fine, but when importing to ravenhq I get 'Input string was not in correct format' error

Please sign in to leave a comment.