Expand description
File operations: recover .bakโ.sav, backup/restore full, .ini management.
Backups are stored as tar.gz archives: one archive per backup event,
containing all savegame_* files. .ini backups use the same format.
Standard tar -xzf recovers data without the tool (no vendor lock-in).
Structsยง
- Backup
Result - Result of a backup operation.
- BakFile
Summary - Enriched .bak file entry with GVAS metadata for the picker UI.
- Recovery
Result - Result of a recovery operation.
Functionsยง
- backup_
ini_ files - check_
tar_ gz_ integrity - Quick integrity check: verify the file is non-empty and starts with gzip
magic bytes (
1f 8b). Returnstrueif the archive looks valid. - create_
full_ backup - create_
tar_ ๐gz - Create a tar.gz archive containing all files from
srcthat match a filename predicate. Returns the path to the created archive. - dedup_
by_ slot - Keep only the most recent .bak per slot, discarding older versioned backups.
- delete_
ini_ files - extract_
tar_ ๐gz - Extract a tar.gz archive into
dest. Returns the number of files extracted (excluding MANIFEST). Validates each file against the manifest SHA256 hashes if present. - folder_
stats - Scan the save folder and return stats for the dashboard.
- list_
bak_ files - List .bak files in the save folder, sorted by mtime descending.
- list_
bak_ files_ with_ meta - List .bak files with parsed GVAS metadata.
- list_
full_ backups - list_
ini_ backups - list_
tar_ ๐gz - List tar.gz files in a directory, sorted by mtime descending.
- migrate_
backups_ ๐from - Migrate old directory-tree backups from a given root path.
Separated from
migrate_old_backups()so tests can use temp directories. - migrate_
old_ backups - Migrate old
NotAlterra_Backups/directory-tree backups into the new tar.gz format. Each timestamped directory becomes its own.tar.gzarchive inbackups/saves/. The old directory is not deleted. - recover_
bak_ to_ sav - restore_
full_ backup - restore_
ini_ files