Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Where does orbitdb data are Stored? #103

Open
kottackalthulasi opened this issue Oct 17, 2019 · 4 comments
Open

Where does orbitdb data are Stored? #103

kottackalthulasi opened this issue Oct 17, 2019 · 4 comments
Labels
Architecture bug Something isn't working

Comments

@kottackalthulasi
Copy link

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);

 })
@aphelionz
Copy link
Collaborator

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

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

@kottackalthulasi
Copy link
Author

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

@RichardLitt
Copy link
Contributor

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

@vasa-develop
Copy link
Contributor

I think in the ./orbitdb dir

@aphelionz aphelionz added Architecture bug Something isn't working labels Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Architecture bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants