Skip to content

Conversation

@maforget
Copy link
Owner

@maforget maforget commented Nov 13, 2025

Integrated a Backup Manager that backups on Startup & Exit. This is to replace the Backup Manager plugin. This isn't a replacement for the current Backup Database feature. They co-exists at the same time. It is also not possible to restore from that backup using the UI.

Difference between the plugin are:

  • It will automatically delete old backups when over the specified quantity to keep (they are sent to the recycle bin).
  • The Include all Alternate Configs means that instead of only backing up only the current config, it will save all configs present in the program data folder regardless of which is loaded. This is the equivalent to the old "Full" backup from the plugin.
  • You can pick and choose which elements you want in your backup.
  • When backing up on exit it does so after the database have been saved. This is after plugins are triggered, so you will have the correct version of your database. The plugin would trigger before so you wouldn't have the very latest database backup.
  • It also backups files from the %ProgramData% directory (but never the ones from the startup directory).
  • The backup is done in the background so it doesn't block the UI on startup like the plugin does (unless you used the buggy v1.3) - See Export Queue Doesn't Work as Expected #136

Go in Preferences -> Advanced -> Backup Manager. Enable either the on Startup or Exit option and some elements to save.

Note: For user using SQL, the current Backup Database feature saves the contents of the books from the db into the backup. This DOES NOT, it just backups your current XML file.

Setting the # of Backups to Keep to 0 will disable deletion of old backups. Do not rename the files or have multiple backups from different alternate configuration in the same folder. Finding old files is done by checking the filename and doesn't check subfolders.

@github-actions
Copy link

github-actions bot commented Nov 13, 2025

Build Successful! You can find a link to the downloadable artifact below.

Name Link
Commit 87dd443
Logs https://github.com/maforget/ComicRackCE/actions/runs/19413081698
Download https://nightly.link/maforget/ComicRackCE/suites/50040120616/artifacts/4582935169

- Refactored classes implementing `IBackupLocationProviderStrategy` to use a base `BackupLocationProviderStrategy` class instead.

- Refactored `BackupLocationProviderStrategy` and its derived classes to centralize `SystemPaths` handling via a new constructor.
- Removed redundant `SystemPaths` fields from derived classes.

- Refactored `BackupLocationProvider` to replace the use of a `Func<IEnumerable<string>>` with a direct `IEnumerable<string>` property, simplifying path handling.
- Introduced `FullBackupLocationProvider` to handle alternate configuration paths and dynamically adjust paths based on the application's data folder structure.
- Added `GetBackupLocationProvider` to choose the correct `IBackupLocationProvider`.
- Added helper methods for path replacement and alternate configuration enumeration.
- Made `BaseFolder` virtual to allow overrides in derived classes.
Uses ISupportedBackupOption instead of only BackupOptions
Used all flags instead of individual flag as options
@maforget maforget merged commit a64da4b into dev Nov 16, 2025
1 check passed
@maforget maforget deleted the backup_manager branch November 16, 2025 22:36
Nadiar referenced this pull request in Nadiar/ComicRackCE Dec 18, 2025
Integrated a Backup Manager that backups on Startup & Exit. This is to replace the Backup Manager plugin. This isn't a replacement for the current Backup Database feature. They co-exists at the same time. It is also not possible to restore from that backup using the UI.

Difference between the plugin are:

    - It will automatically delete old backups when over the specified quantity to keep (they are sent to the recycle bin).
    - The Include all Alternate Configs means that instead of only backing up only the current config, it will save all configs present in the program data folder regardless of which is loaded. This is the equivalent to the old "Full" backup from the plugin.
    - You can pick and choose which elements you want in your backup.
    - When backing up on exit it does so after the database have been saved. This is after plugins are triggered, so you will have the correct version of your database. The plugin would trigger before so you wouldn't have the very latest database backup.
    - It also backups files from the `%ProgramData%` directory (but never the ones from the startup directory).
    - The backup is done in the background so it doesn't block the UI on startup like the plugin does (unless you used the buggy v1.3)

Go in Preferences -> Advanced -> Backup Manager. Enable either the on Startup or Exit option and some elements to save.

Note: For user using SQL, the current Backup Database feature saves the contents of the books from the db into the backup. This DOES NOT, it just backups your current XML file.

Setting the # of Backups to Keep to 0 will disable deletion of old backups. Do not rename the files or have multiple backups from different alternate configuration in the same folder. Finding old files is done by checking the filename and doesn't check subfolders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants