5 ms·
> A simple solution would be to b64 encode each file and add it into an array! An individual file attachment can be as large as 500 MB[0]. It would make the JS
by 1una 4y ago
> A simple solution would be to b64 encode each file and add it into an array!
An individual file attachment can be as large as 500 MB[0]. It would make the JSON file too big to use.
Still, I do think that Bitwarden should warn users about it when exporting. Just mentioning it in the Help Center doesn't seem so helpful.
[0]: https://bitwarden.com/help/attachments/ https://bitwarden.com/help/attachments/
- manmal 4y agoWhy is such a JSON file too big to use if it’s only ever handled by streaming parsers? SQLite would be a better backup format ofc.
- vbezhenar 4y agoAFAIK SQLite field limit is 2 GB, so if you're used to storing Blurays in your password database, that might be a limiting factor as well.
- weaksauce 4y agothe maximum file size is smaller than 500MB so that's a moot point and not many people are going to be hitting that size limit in the first place... it is a password manager after all.
- mdaniel 4y agoCan you explain how sqlite is a better container for arbitrary binary files than zip? I mean, I know "INSERT INTO files ('my-file.bin', X'CAFEBABE...')" gets it into sqlite, but how would a sane person get that content back out?
- onetom 4y agoWell, you can just get BLOBs out of an SQLite DB with SELECT. Also: https://www.sqlite.org/fasterthanfs.html https://www.sqlite.org/fasterthanfs.html Not that performance or file size would matter in this case, BUT what using SQLite would allow is to use a single format for persisting all aspects of the password database, with immediate, programmatic, random access to all fields, including attachments. But I also agree, that for this specific use-case, even SQLite is a bit of an overkill probably. Finally, there is always https://www.passwordstore.org/ https://www.passwordstore.org/ :)
- mdaniel 4y agoRight, but I feel we're having a miscommunication about the level of effort one should expend to recover the payloads; your mental model is that this: sqlite3 -noheader -newline '' export.db "select data from files where filename = 'my-file.bin'" > my-file.bin is more user friendly than: unzip 1PasswordExport-ILESALYKVFDNJH3K24FEO3QRHM-20220611-100457.1pux files/my-file.bin
- manmal 4y agoThis discussion is about Base64-in-JSON vs SQLite, not binaries-in-ZIP vs SQLite.
- ben0x539 4y ago> An individual file attachment can be as large as 500 MB[0]. It would make the JSON file too big to use. The backup would be too big to use if it included all the data it's a backup of? What?
- remram 4y agoThe JSON file would be too big to use as a JSON file. Another format could be used for backup.