Angular Modernizer
    Preparing search index...

    Backup manager for file-level backups.

    Creates backups before a transformation and restores them for rollback.

    Index

    Constructors

    Methods

    • Create a backup of a file.

      Parameters

      • filePath: string

        Path to file to backup

      • Optionalreason: string

        Optional reason for backup

      • options: BackupOptions = {}

      Returns Promise<BackupResult>

      Backup result with unique backup ID

    • Clear all backups.

      Returns Promise<void>

    • Create backups of multiple files with a shared backup ID.

      Parameters

      • filePaths: string[]

        Array of file paths to backup

      • Optionalreason: string

        Reason for backup

      Returns Promise<BatchBackupResult>

      Batch backup result

    • Delete a backup (deletes most recent backup for a file).

      Parameters

      • filePath: string

      Returns Promise<boolean>

    • Delete a backup batch using backup ID.

      Parameters

      • backupId: string

        Backup ID to delete

      Returns Promise<boolean>

      Whether deletion was successful

    • Most recent backup of a file: from this instance, else from the metadata files in the backup directory (backups written by another instance).

      Parameters

      • filePath: string

      Returns BackupMetadata | undefined

    • Get backup directory path.

      Returns string

    • Get backup metadata for a file (returns most recent backup).

      Parameters

      • filePath: string

      Returns BackupMetadata | undefined

    • Backups of the newest operation group in the backup directory, one per file (the newest). A backup without group forms a group of its own.

      Returns BackupMetadata[]

    • Check if a backup exists for a file.

      Parameters

      • filePath: string

      Returns boolean

    • Restore a file from backup (uses most recent backup).

      Parameters

      • filePath: string

      Returns Promise<RestoreResult>

    • Restore files from a backup batch using backup ID.

      Parameters

      • backupId: string

        Backup ID to restore

      Returns Promise<BatchRestoreResult>

      Batch restore result