Obtain a streams events as json

Hi,

Is ther a way to obtain a streams events as a json file?

Kind regards

Sean.

curl -i http://{yourip:yourport}/streams/foo?embed=content -H "Accept:
application/json"

it pages so you will need to do a little bit on top (e.g. handle the
paging/output)

Hi,

Ok, thatnks, what I'm looking for is a way to take a backup of a stream in one es instance and import it in to another, is this the best way?
Cheers
Sean.

For a single stream this + a small script (prob 50 lines) would work.
To "restore" it you would iterate over and post the events (note you
can do this in batches as well). Is there a reason you need stream by
stream back up as opposed to a database back up?

Greg

Not necessarily, is there a way to get a backup from a database, given the master nodes url?
Cheers
Sean.

Sure see http://docs.geteventstore.com/server/3.1.0/database-backup/

There isn’t a way to back up over HTTP, though if you have access to the nodes it’s straightforward using the doc Greg linked earlier.