Documentation Index
Fetch the complete documentation index at: https://docs.memvid.com/llms.txt
Use this file to discover all available pages before exploring further.
File Security
How are .mv2 files protected?
Integrity relies on cascading checksums:
- Header checksum: Validates file header
- TOC checksum: Validates table of contents
- Per-segment checksums: Validates each data segment
- Time index checksum: Validates timeline data
Are checksums validated automatically?
Yes. When opening a file, Memvid validates:- Header checksum
- TOC integrity
- WAL consistency
memvid verify --deep) additionally checks all segment checksums.
What happens if a file is corrupted?
Memvid provides tools to detect and repair corruption:Crash Safety
What ensures data survives crashes?
The embedded Write-Ahead Log (WAL):- All mutations are written to WAL first
- WAL is synced to disk (fsync)
- Changes are then applied to main data
- On recovery, uncommitted WAL entries are replayed
How long does recovery take?
Recovery is fast:- Typical recovery: < 100ms
- Large WAL replay (4MB): < 250ms
Are there any single points of failure?
No. The.mv2 file is self-contained:
- No external databases
- No network dependencies
- No sidecar files that could be lost
Access Control
How does file locking work?
Memvid uses OS-level file locks:- Writers: Exclusive lock (one at a time)
- Readers: Shared lock (multiple concurrent)
Can multiple users access the same file?
Yes, but only one can write at a time:Data Privacy
Is my data sent anywhere?
Local operations (search, timeline, stats) never send data anywhere. Ask operations with external LLMs (openai, claude, gemini) send context to those providers. To prevent this:
- Use the local model (tinyllama):
- Use context-only mode:
- Enable PII masking:
What does PII masking protect?
The--mask-pii flag masks sensitive information before sending to external LLMs:
| PII Type | Example | Masked As |
|---|---|---|
| Email addresses | john@example.com | [EMAIL] |
| Phone numbers | 555-123-4567 | [PHONE] |
| US Social Security Numbers | 123-45-6789 | [SSN] |
| Credit card numbers | 4111-1111-1111-1111 | [CREDIT_CARD] |
| IPv4 addresses | 192.168.1.1 | [IP_ADDRESS] |
| API keys/tokens | sk-abc123... | [API_KEY] |
Using PII Masking
CLI:PII masking is applied to the context sent to external LLMs, not to data stored in the memory file. The original data remains intact.
Verification
How do I verify file integrity?
What does deep verification check?
| Check | Description |
|---|---|
HeaderChecksum | Header integrity |
TocIntegrity | Table of contents valid |
WalConsistency | WAL state consistent |
TimeIndexSortOrder | Time index properly sorted |
LexIndexDecode | Lexical index readable |
VecIndexDecode | Vector index readable |
FrameCountConsistency | Frame counts match |
Best Practices
File Storage
- Use appropriate permissions: Restrict file access to authorized users
- Regular backups: Copy
.mv2files to backup storage - Verify after transfer: Run
memvid verify --deepafter copying files
Production Use
- Read-only mode: Use for query-only workloads
- Monitor capacity: Check utilization before large ingestions
- Periodic verification: Run
memvid verify --deepweekly
Sensitive Data
- PII masking: Always enable for external LLM calls
- Local models: Use tinyllama for sensitive queries
- Context-only mode: Get relevant docs without LLM synthesis