How to find all records in LastPass that have files/attachments in them?
Asked Answered
F

3

7

Exporting notes from LastPass does not export files that are in some notes so I need to go through every note that has a file in it and backup it manually. It would help to know which notes have files/attachments in them so that I do not need to open every note.

Fricative answered 14/4, 2021 at 20:25 Comment(1)
I agree that would be a helpful feature, but it does not appear to exist. Faced with the same situation, I had to resort to opening each attachment to see if there was an attachment, then manually saving it. The exported data doesn't even mention attachments, so you can't filter the data to find attachments. One might suspect this helps LogMeIn with lock-in for their product. Either way I'm afraid you're out of luck.Basle
B
4

The LastPass CLI open source project has a script that does just this. It's a shell script.

https://github.com/lastpass/lastpass-cli/blob/master/contrib/lpass-att-export.sh

Bargainbasement answered 5/11, 2021 at 7:54 Comment(3)
This script seems to require specific account IDs, which would be difficult for this use case where you need all accountsGlauconite
This is the correct answer. The script requires you to be logged in to the LastPass account, so it is fine for a single user, which seems to be the OP's case.Purpleness
Another similar solution is here: github.com/mindrunner/lastpass-attachment-exporterRoselani
L
1

You can use lpass-att-export.sh as noted above, but note that the script doesn't work out of the box on a Mac:

  1. The "sed" commands in the script don't work with the Mac version of sed. I got around this by installing gsed (via MacPorts) and modifying the script to use gsed.
  2. The script doesn't properly handle attachment filenames with spaces in them. The attachment exports properly, but the exported filename is only the first part of the name (up to the first space).
Lenardlenci answered 26/2, 2023 at 17:50 Comment(0)
L
0

I wrote [this] on Ubuntu (on windows WSL), so not sure it will work on Mac but I suspect tweaks would be be small. It is designed to retrieve all attachments and deals with spaces in file and folder names. Credit to mindrunner for a lot of the concepts, but mine is a bit more specific with the search and retrieval - which is does by identifying each entry with an attachment first.

hope that helps.

https://github.com/englishbob1598/lastpass-cli-attachments

Lupitalupo answered 5/1 at 18:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.