Exporting/Importing a Document Collection from RavenDb
Why ?
- Export a live collection to a file, copy it to your dev machine, restore and test.
- Backup a collection before you try patching/changing.
Backup Command Line Summary
Raven.Smuggler.exe
out
http://<server>:<port>/databases/<tenant>
"<path-to-output-file>"
--metadata-filter=Raven-Entity-Name=<collection>
--operate-on-types=Documents.
Example
Raven.Smuggler.exe out http://localhost:8080/databases/MusicStore "C:\Temp\Users.dump" --metadata-filter=Raven-Entity-Name=Users --operate-on-types=Documents
Restore Command Line Summary
Raven.Smuggler.exe
in
http://<server>:<port>/databases/<tenant>
"<path-to-backup-file>"
Example
Raven.Smuggler.exe in http://localhost:8080/databases/MusicStore "C:\Temp\Users.dump"
Written by Pure Krome
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#