Table of Contents

Class UpdateBackupService

Namespace
EchoHub.Client.Services
Assembly
EchoHub.Client.dll

Manages pre-update backups and rollback restoration for the auto-updater. Backup location: ~/.echohub/update-backup/

public static class UpdateBackupService
Inheritance
UpdateBackupService
Inherited Members

Properties

IsPostUpdate

True if a backup exists from a recent update (set at startup).

public static bool IsPostUpdate { get; set; }

Property Value

bool

Methods

BackupExists()

Returns true if a valid backup exists (both ZIP and metadata file present).

public static bool BackupExists()

Returns

bool

CreateBackup()

Creates a ZIP backup of the current app directory before an update. Deletes any previous backup first. Uses fastest compression for speed.

public static void CreateBackup()

DeleteBackup()

Deletes the backup directory and all contents.

public static void DeleteBackup()

GetBackupInfo()

Reads backup metadata. Returns null if no backup exists or metadata is unreadable.

public static BackupInfo? GetBackupInfo()

Returns

BackupInfo

RestoreBackup()

Restores the backup ZIP to the app directory, then restarts the process. This method does not return — it calls Environment.Exit(0).

public static void RestoreBackup()