field-manual icon indicating copy to clipboard operation
field-manual copied to clipboard

Where does orbitdb data are Stored?

Open kottackalthulasi opened this issue 6 years ago • 4 comments

where does orbitdb data are stored? I lost all data while copied the same project folder to another location.

My code is given below:

const ipfsOptions = {
            EXPERIMENTAL: {
              pubsub: true
            }
          }
          
          // Create IPFS instance
          const ipfs = new IPFSS(ipfsOptions)
          
          ipfs.on('error', (e) => console.error(e))
          ipfs.on('ready', async () => {
            const orbitdb = await OrbitDB.createInstance(ipfs)
            const db = await orbitdb.docs(account )
              console.log(db);
              await db.load();
              await db.put(results.data)
              var fulldata = db.get(' ');
              console.log(fulldata);

 })

kottackalthulasi avatar Oct 17 '19 13:10 kottackalthulasi

You can pass a directory option to the OrbitDB.createInstance call like this:

const orbitdb = OrbitDB.createInstance(ipfs, { directory: 'path/to/data/' })

aphelionz avatar Oct 17 '19 15:10 aphelionz

I tried it.. But actually no use... no data are getting stored in that folder.

kottackalthulasi avatar Oct 21 '19 05:10 kottackalthulasi

@aphelionz where is it stored if you don't add the directory option?

RichardLitt avatar Nov 11 '19 13:11 RichardLitt

I think in the ./orbitdb dir

vasa-develop avatar Mar 25 '20 17:03 vasa-develop