Help with pk-mount

97 views
Skip to first unread message

Tristan Kohl

unread,
Nov 4, 2019, 11:22:47 AM11/4/19
to Perkeep
Hey guys,

I am a little stuck using pk-mount. When I downloaded Perkeep from the download section I tried to mount my instance via pk-mount. However 0.10 seems to not include the fix to show sha224-xxx directory. So I build from github but sha224-xxx is still empty whilst the web interface shows all my pictures. Did I miss something? When I first dumped my data to perkeep I used the web ui to create a set, navigate into this set and then upload files. This way all pictures etc. was part of this set.

However I would expect to see all my blobs within sha224-xxx directory since all blobs are in fact sha224.

Any help would be very much appreciated.
Thanks in advance,
Tristan

Tristan Kohl

unread,
Dec 5, 2019, 2:23:31 AM12/5/19
to Perkeep
Well I still had no success so far using pk-mount, sha224-xxx remains empty. Is there any other option for me to just get access to all my files i.e. some "export" of some sort?

Cheers,
Tristan

Mathieu Lonjaret

unread,
Dec 5, 2019, 4:36:49 AM12/5/19
to per...@googlegroups.com
Hello,

you could:
1) either use a combination of pk search and pk get (e.g. in a script)
2) or use the web UI (select the ones you want, then download them as a zip)

btw, even if you did have pk-mount working I don't think you would be
able to download all your files (if there are many) very easily, since
afaik the "view" that pk-mount gives you is often based on searches
with a bounded result. For example, the "recent" directory shows you
only the 100 most recent permanodes, not all of them.

Cheers,
Mathieu
> --
> You received this message because you are subscribed to the Google Groups "Perkeep" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to perkeep+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/perkeep/180adb0c-d532-49c6-bc8e-585e8580d6dc%40googlegroups.com.

Tristan Kohl

unread,
Dec 5, 2019, 5:32:20 AM12/5/19
to Perkeep
Thank you Mathieu, using pk search gives me at least all blob refs I need. but how do I get my files with pk get dumped on my local filesystem (preferrably with their original file names)?

When I "open" a pdf in my web interface and navigate via "blob" => "camliContent" I can see, that the indexer knows about its original file name.

I ran this command to get all refs:
pk search -limit -1 before:2019-12-01

As expected it returned a JSON containing ~1500 blob refs. But how do I proceede from here? Unfortunately the documentation is not very clear about downloading files locally.

Thank you for your help,
Tristan

On Thursday, December 5, 2019 at 9:36:49 AM UTC, mathieu.lonjaret wrote:
Hello,

you could:
1) either use a combination of pk search and pk get (e.g. in a script)
2) or use the web UI (select the ones you want, then download them as a zip)

btw, even if you did have pk-mount working I don't think you would be
able to download all your files (if there are many) very easily, since
afaik the "view" that pk-mount gives you is often based on searches
with a bounded result. For example, the "recent" directory shows you
only the 100 most recent permanodes, not all of them.

Cheers,
Mathieu

On Thu, 5 Dec 2019 at 08:23, Tristan Kohl <kohlt...@gmail.com> wrote:
>
> Well I still had no success so far using pk-mount, sha224-xxx remains empty. Is there any other option for me to just get access to all my files i.e. some "export" of some sort?
>
> Cheers,
> Tristan
>
> --
> You received this message because you are subscribed to the Google Groups "Perkeep" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to per...@googlegroups.com.

Bob Glickstein

unread,
Dec 5, 2019, 10:36:18 AM12/5/19
to per...@googlegroups.com
On Wed, Dec 4, 2019 at 11:23 PM Tristan Kohl <kohlt...@gmail.com> wrote:
Well I still had no success so far using pk-mount, sha224-xxx remains empty.

This may be because you're expecting files you added with pk put file to show up there. That's not an unreasonable expectation, but (IIUC) they won't because pk put file uses a different schema for representing files and directories than pk-mount does.

For example, I have an image file that I added to Perkeep both ways. The bare bytes have a blobref of 5906a8... in both cases. (As expected.) That ref is embedded in a schema blob that, in the pk put file case (0056f0...), has a lot of unix* attributes (unixOwner, unixPermission, etc.), and in the pk-mount case (9507cd...) does not. The differences continue to accumulate as you move outward to their containers, etc.

It would be great if pk-mount could interpret files and directories create with pk put file...

Cheers,
- Bob

Is there any other option for me to just get access to all my files i.e. some "export" of some sort?

Cheers,
Tristan

--
You received this message because you are subscribed to the Google Groups "Perkeep" group.
To unsubscribe from this group and stop receiving emails from it, send an email to perkeep+u...@googlegroups.com.

Mathieu Lonjaret

unread,
Dec 5, 2019, 11:09:06 AM12/5/19
to per...@googlegroups.com
On Thu, 5 Dec 2019 at 11:32, Tristan Kohl <kohlt...@gmail.com> wrote:
>
> Thank you Mathieu, using pk search gives me at least all blob refs I need. but how do I get my files with pk get dumped on my local filesystem (preferrably with their original file names)?

Afair, if you use the -contents option, it should create the file on
disk for you, and if a filename is found in the file schema it will
use it as well.

> When I "open" a pdf in my web interface and navigate via "blob" => "camliContent" I can see, that the indexer knows about its original file name.
>
> I ran this command to get all refs:
>>
>> pk search -limit -1 before:2019-12-01

I think this will give you blorefs of permanodes, not file blobrefs.
You then have to follow the camliContent attribute to get the file
that is associated to each permanode.
> To unsubscribe from this group and stop receiving emails from it, send an email to perkeep+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/perkeep/befd45d3-f8af-413e-8efd-69e2b3748cc8%40googlegroups.com.

Tristan Kohl

unread,
Dec 7, 2019, 1:26:36 AM12/7/19
to Perkeep
On Thursday, December 5, 2019 at 4:09:06 PM UTC, mathieu.lonjaret wrote:

I think this will give you blorefs of permanodes, not file blobrefs.
You then have to follow the camliContent attribute to get the file
that is associated to each permanode.

Well, if I open one of my pictures (click on it) in the web GUI and run pk get against its blobref, I only get the permanode's content. However it does not contain the "camliContent" attribute. This attribute is found under Indexer Metadata. There is a Mutation claim which adds the camliContent attribute to this permanode but I do not know how to retrieve this via pk search...

Seems like I have no idea how Perkeep works after all :D

Thank you for taking the time to help me, I really appreciate this!

Mathieu Lonjaret

unread,
Dec 7, 2019, 9:43:41 AM12/7/19
to per...@googlegroups.com
You need to use the tools that rely on search queries that return "resolved" permanodes, I.e. with all the information compiled from the claims. I'm on phone rn so I can't look it up, but it should be one of the pk tool subcommands.

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