Skip to content

[BUG][1.9.0~1.9.2] Unexpected database file deletion on backup deletion #64

Closed

Description

@Fallen-Breath
  • Affected version: v1.9 (released on Mar 15, 2025), v1.9.1, v1.9.2
  • Fixed version: v1.9.3 (released on Mar 29, 2025)

Please upgrade Prime Backup to the latest version whenever possible, if you have the plugin with its version in the affected range

Activity

  1. changed the title [-][BUG] Unexpected database file deletion on backup deletion[/-] [+][BUG][1.9~1.9.2] Unexpected database file deletion on backup deletion[/+] on Mar 29, 2025
  2. Fallen-Breath commented on Mar 29, 2025

    @Fallen-Breath
    ContributorAuthor

    Source: https://t.bilibili.com/1049779707586805763

    Translated to English using AI:

    Basic Information

    • Affected Versions: 1.9.0 ~ 1.9.2
    • Fixed Version: 1.9.3
    • Trigger Scenario: Backup deletion operations, including manual deletion and automatic cleanup.

    Scope of Impact

    • When deleting a backup, the data of backups that share the same base fileset with that backup will also be deleted.
    • New backups are not affected.
    • Backups created or deleted after upgrading to v1.9.3 are not affected.

    Damage Results

    • Affected backups will become incomplete, losing >= 80% of their files.

    Verification Method

    Use the !!pb database validate filesets command for self-inspection. If the output shows a mismatch, as in the example provided, it is affected

    Example output:

    1. 399: fileset.file_object_count 11075 != actual file object count 265
    

    Fileset 399 is damaged, and backups that reuse fileset 399 are all affected.

    (Requires plugin v1.9.4+) You can check the pb_files/logs/validate.log log and look for the line with "Affected backup IDs (bad filesets)" to determine the scope of impact.

    Repair Method

    Cannot be repaired. Restoration must rely on additional backups outside of PB (such as PB’s own database backups, blob store backups, etc.) to the best extent possible.

    For affected backups:

    Note: Prime Backup v1.9.0 was released on March 15, 2025, 14 days ago.

  3. added a commit that references this issue on Mar 29, 2025
  4. changed the title [-][BUG][1.9~1.9.2] Unexpected database file deletion on backup deletion[/-] [+][BUG][1.9.0~1.9.2] Unexpected database file deletion on backup deletion[/+] on Mar 29, 2025
  5. added a commit that references this issue on Mar 29, 2025
  6. Fallen-Breath commented on Mar 29, 2025

    @Fallen-Breath
    ContributorAuthor

    fixer script

    Note

    You need to have external backups of these 2 stuffs perform the fix:

    1. Backup of the database file (created by PB v1.9+). Take a look in pb_files/db_backup
    2. (Optional) Backup of the blob store (pb_files/blobs) backups

    No rescue if no backup :(

    Script: https://github.com/TISUnion/PrimeBackup/blob/dev/tools/issue_64_fixer.py

    Usage: https://github.com/TISUnion/PrimeBackup/blob/dev/tools/README.md#issue_64_fixerpy

  7. hi54123 commented on Jun 22, 2025

    @hi54123

    刚想来说我存档炸了,结果就有了(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdata securityAffects data security / completeness of existing backups

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions