此篇指南目前僅提供英文。「開始使用」與「連接學校」已有繁體中文版。

Data and storage

Understand local files, clean caches, and make a portable backup.

What stays on disk

The main process owns one application data namespace under Electron’s userData directory. It contains vstudy.sqlite, the document library, settings, and bounded Moodle response caches. SQLite uses WAL mode and foreign keys. There is no device sync.

Originals use content-addressed directories. Metadata lists do not read every original file. Local full-text indexes support document and chat search. Credentials use separate main-owned secret storage.

Manage storage

Settings > Storage shows local usage, cache cleanup, converted-file cleanup, portable backup, restore, and integrity checks. Read the confirmation before cleaning data. Cleanup excludes active conversions and chats.

Clearing cached responses differs from deleting student records. Removing converted files preserves original documents. The integrity check snapshots SQLite and scans database integrity and foreign keys. It does not hash every original.

Export a portable backup

Use Settings > Storage to choose a backup destination. VStudy writes an uncompressed ZIP32 archive with a manifest and checksums. The backup includes coursework, library content, and chat data in plaintext. Protect the archive as private data.

Credentials, CLI logins, and Chromium state are excluded. Restore accepts the app’s backup format below 4 GiB and 50,000 files. It does not support arbitrary ZIP archives or ZIP64.

Restore and restart

Choose a backup through Settings > Storage. The app validates archive paths, sizes, hashes, database structure, and source files before staging it. Invalid backups leave the live library untouched.

After a validated restore, new writes pause until restart. Startup publishes the staged database and library with recoverable rename steps. Moodle accounts require reconnection. Provider configuration and existing secrets are not replaced. Previous data stays in a recovery directory until you remove it.

參考原始碼