copy camlistore index

49 views
Skip to first unread message

Markus Peröbner

unread,
Mar 8, 2017, 2:41:00 AM3/8/17
to Camlistore
Hi,


I'm using camlistore on two devices. One is a raspberry PI and the other one my PC. Sometimes the index on one of the two devices seems to break and I fix it by doing a reindex. Now a reindex takes very long on the raspberry PI.

That's why I was thinking to stop both camlistore instances and then copy the underlying index leveldb from the PC to the raspberry PI. Is this possible or does the index leveldb contain environment specific stuff like maybe the path to blobs etc?

Of course the blob stores of both devices are in sync before I want to copy the index.

For completenes here's my index configuration from my server-config.json:
    "/index/": {
        "handler": "storage-index",
        "handlerArgs": {
        "blobSource": "/bs/",
        "storage": {
            "file": "/some/path/to/index.leveldb",
            "type": "leveldb"
        }
        }
    },


Thanks,
Markus

Mathieu Lonjaret

unread,
Mar 8, 2017, 9:15:18 AM3/8/17
to camli...@googlegroups.com
Off the top of my head I don't see why it would not work. Well, except I don't really know the details of how leveldb journaling works, so maybe make sure all transactions are well done and finished before stopping the "fast" camlistored('s index).
if needed, you could probably trivially make a tool using the leveldb pkg to open "/some/path/to/index.leveldb", make sure any transactions left in the journal are written, and then close properly.
In any case, please let me know if you hit any problem so I can help.

Cheers,
Mathieu


--
You received this message because you are subscribed to the Google Groups "Camlistore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camlistore+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Markus Peröbner

unread,
Mar 10, 2017, 1:19:39 AM3/10/17
to camli...@googlegroups.com
Just for completeness I wanted to mention that copying the index
leveldb was successful. I can performe queries on the copied index as
usual.
>> email to camlistore+...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Camlistore" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/camlistore/5ZFYvGg6U-4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> camlistore+...@googlegroups.com.

Mathieu Lonjaret

unread,
Mar 10, 2017, 10:22:45 AM3/10/17
to camli...@googlegroups.com
cool, thanks for the feedback.


>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Camlistore" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/camlistore/5ZFYvGg6U-4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Camlistore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camlistore+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages