Commit Graph

64 Commits

Author SHA1 Message Date
Nicolas Meienberger
7ae5f73783 fix: run repo stats in background
Closes #614
2026-03-05 18:57:28 +01:00
Nicolas Meienberger
157be2d6ab feat: custom flags allowlist 2026-03-04 19:42:08 +01:00
Nicolas Meienberger
5f6409e0a5 test: increase coverage for existing controllers 2026-03-04 18:48:47 +01:00
Nico
c606099104 test: use better-auth built-in test plugin (#599)
test: use better-auth built-in test plugin

refactor: map auth errors server side

refactor: native trusted providers callback usage

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

## Release Notes

* **New Features**
  * Enhanced SSO authentication error messaging with specific guidance for different failure scenarios (account linking required, email verification needed, banned accounts, invite-only access).

* **Chores**
  * Updated authentication dependencies to version 1.5.0.

* **Tests**
  * Extended test coverage for SSO error code handling and authentication scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-04 18:48:47 +01:00
Nico
12454ee401 fix: restic glob pattern in include (#594)
Closes #590

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

* **Tests**
  * Enhanced test coverage for backup pattern handling and anchoring
  * Added end-to-end scenarios validating include patterns, exclusion patterns, and exclude-if-present functionality

* **Refactor**
  * Updated pattern processing logic to improve relative path resolution for backup patterns
  * Improved asynchronous handling in backup initialization workflow

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-04 18:48:47 +01:00
bcrooker
ef51d665c8 feat(backups): add custom restic params to backup schedules
Allows users to pass arbitrary restic flags via a new advanced section in the create/edit schedule form. Includes DB migration, schema update, DTO, service, and restic command changes.
2026-02-27 14:46:47 -05:00
Nico
942bf2b31b refactor: tests (#585)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Tests**
  * Improved test infrastructure and organization across backup, repository, volume, and utility modules with streamlined mock setup and cleaner test patterns.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-26 19:54:25 +01:00
Nico
4a812a884b refactor(restic): split each command into its own file (#584)
refactor(restic): split each command into its own file

refactor: add missing await before promise expects

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

## Release Notes

* **Tests**
  * Improved async assertion handling across test suites for enhanced test reliability
  * Expanded test coverage for backup, restore, and other core operations

* **Refactor**
  * Reorganized internal utility structure for improved code maintainability

* **Chores**
  * Updated linting configuration and TypeScript dependencies

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-26 19:51:24 +01:00
Nico
c4f3300e9b fix(backups): correctly resolve paths when folder name matches volume name (#576)
When a selected subfolder had the exact same name as its parent volume
mount, the `path.relative` check falsely identified the subfolder path
as an absolute path already inside the volume. This caused the entire
volume root to be backed up instead of the intended subfolder.

Closes #250

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Bug Fixes**
  * Improved handling of backup patterns when folder names match volume names.
  * Enhanced error handling for snapshot deletion operations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-25 19:09:32 +01:00
Nico
cb92d36c95 feat: cache backup progress (#571)
Closes #412
2026-02-25 18:20:08 +01:00
Nico
a0a813ed09 refactor: short id branded type (#552)
* refactor: short id branded type

* chore: pr feedbacks
2026-02-21 11:16:15 +01:00
Nico
45fd9f9de1 feat: repository used space (#551)
* feat: repository used space

refactor: use a smarter cache key logic for easier invalidations

* chore: pr feedbacks
2026-02-21 10:52:55 +01:00
Nico
8681ebc0c0 refactor: always use short id in api calls (#545) 2026-02-19 20:08:40 +01:00
Nico
8fcd446926 refactor: snapshot strip out base path (#542)
* refactor: strip out volume path in snapshot list / restore

chore: lint issue

* test: backups new include patterns
2026-02-18 21:45:19 +01:00
Nico
ebfafa4143 fix(repositories): append short id when using the default path for local repos (#536) 2026-02-17 18:28:33 +01:00
Nicolas Meienberger
0bbdbc85ad Reapply "chore(deps): bump drizzle-orm from 1.0.0-beta.9-e89174b to 1.0.0-beta.15-859cf75 (#501)"
This reverts commit db163a1bb5.
2026-02-17 17:52:25 +01:00
Nicolas Meienberger
7bcf380198 test: fix impossible test scenarios 2026-02-16 23:20:33 +01:00
Nicolas Meienberger
db163a1bb5 Revert "chore(deps): bump drizzle-orm from 1.0.0-beta.9-e89174b to 1.0.0-beta.15-859cf75 (#501)"
This reverts commit d53b24bfb4.
2026-02-16 22:18:10 +01:00
Nico
99bb296866 fix: cascade delete not correctly applied (#531) 2026-02-16 21:36:07 +01:00
dependabot[bot]
d53b24bfb4 chore(deps): bump drizzle-orm from 1.0.0-beta.9-e89174b to 1.0.0-beta.15-859cf75 (#501)
* chore(deps): bump drizzle-orm

Bumps [drizzle-orm](https://github.com/drizzle-team/drizzle-orm) from 1.0.0-beta.9-e89174b to 1.0.0-beta.15-859cf75.
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/commits)

---
updated-dependencies:
- dependency-name: drizzle-orm
  dependency-version: 1.0.0-beta.15-859cf75
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* refactor: convert async transactions to sync + .run()

* chore: formatting

* chore: add lefthook dep

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicolas Meienberger <github@thisprops.com>
2026-02-14 14:18:20 +01:00
Nico
ec4cf938bc feat: show progress indicator on mirrors (#499)
* feat: show progress indicator on mirrors

refactor: remove unnecessary useEffects

* refactor: pr feedbacks
2026-02-12 22:27:30 +01:00
Nico
7ebce1166b feat: expand snapshot details with additional info (#505)
* feat: extend snapshot details with more info

Closes #385

* refactor: centralize restic backup schemas

* refactor: pr feedbacks
2026-02-12 18:25:21 +01:00
Nico
cb7988b8ed refactor(retention badges): use restic forget dry run result instead of manual calc (#494)
* refactor(retention badges): use restic forget dry run result instead of manual calc

* chore: PR feedbacks
2026-02-10 20:14:35 +01:00
Nico
0e0eaea946 refactor: split backups module + unit tests (#463)
* refactor: split backups module

* test: backup execution

* test: schedule db
2026-02-03 23:00:25 +01:00
Nico
35773a6969 refactor: upgrade to drizzle v1 (#450)
* refactor: move migrations to new structure

* refactor: convert all findMany to new structure

* fix(backups-schedule): missing null matching for last backup status

* chore: move root lib to server
2026-02-01 19:14:52 +01:00
Nico
b8ad1ae41a refactor: show progress card even if no data is streamed (#440) 2026-01-31 13:26:10 +01:00
Nicolas Meienberger
8f8b370679 test: fix cookie name 2026-01-27 23:25:28 +01:00
Nicolas Meienberger
458799297d refactor: make sse events isolated per org 2026-01-24 22:45:56 +01:00
Nico
2ab37e6b67 refactor: async doctor (#375)
* feat: background doctor operation

* refactor(repo-details): design layout

* refactor(doctor): support abort signal in all operations

* chore: fix linting issue

* chore: pr feedbacks

* chore: merge conflicts

* refactor: handle aborted signal in all operations

* chore: pr feedbacks

* chore: remove old migration
2026-01-22 21:55:45 +01:00
Nico
451aed8983 Multi users (#381)
* feat(db): add support for multiple users and organizations

* feat: backfill entities with new organization id

* refactor: filter all backend queries to surface only organization specific entities

* refactor: each org has its own restic password

* test: ensure organization is created

* chore: pr feedbacks

* refactor: filter by org id in all places

* refactor: download restic password from stored db password

* refactor(navigation): use volume id in urls instead of name

* feat: disable registrations

* refactor(auth): bubble up auth error to hono

* refactor: use async local storage for cleaner context sharing

* refactor: enable user registration vs disabling it

* test: multi-org isolation

* chore: final cleanup
2026-01-20 22:28:22 +01:00
Nico
d3f9ced5dc refactor: use spawn & exec instead of bun $ (#356)
* refactor: use spawn & exec accordingly

* chore: pr feedbacks
2026-01-15 22:09:00 +01:00
Jakub Trávník
1d2e737a98 fix: increase name length limit from 32 to 128 characters in backup schedule schema (#330) 2026-01-09 18:29:35 +01:00
Nico
99932a8522 refactor: better-auth (#319)
* refactor: better-auth

* chore: pr feedback

* chore: lower + trim usernames in db
2026-01-07 22:36:20 +01:00
Nico
b216219209 refactor: move from biome to oxlint/oxformat (#311)
* chore: install and configure oxlint

* chore: fix liniting issues

* chore: install and configure oxfmt

* ci: add oxlint action instead of biome

* chore: pr feedbacks

* Revert "chore: pr feedbacks"

This reverts commit 525dcd8d9f.
2026-01-05 21:04:37 +01:00
Nico
a2ee223ee7 refactor: use backend cache in restic operations (#295) 2026-01-04 16:37:42 +01:00
Jakub Trávník
94c84d7c58 feat: include schedule name in backup notifications and logs (#215)
* feat: include schedule name in backup notifications and logs

* lint fixes
2026-01-02 14:22:03 +01:00
Nico
ae5233d9fb refactor: tag snapshots with schedule short_id instead of db id (#248)
* refactor: tag snapshots with schedule short_id instead of db id

* chore: formatting issues
2025-12-28 11:42:25 +01:00
Nico
55e27ef0b5 feat: server timeout env (#219)
* feat: increase server idle timeout and allow to modify it via env

* chore(app): move auth middleware to individual controller

To clean up de main app.ts file

* chore: remove console.log
2025-12-22 17:34:27 +01:00
Nico
8cdd06ec49 fix(stop): always update status to warning when stop is executed (#202)
* fix(stop): always update status to warning when stop is executed

* fix: automatically put in_progress backups to warning during startup
2025-12-21 14:25:45 +01:00
Nico
492aa4178d feat: allow to control --one-file-system option from the schedule config (#201) 2025-12-21 14:21:08 +01:00
Nico
598de4e078 fix: schedules not running if never run manually (#194)
* fix: backups that were never run manually are not picked up by job

* fix(mutex): prioritize waiting exclusive locks over newly added shared tasks
2025-12-20 11:28:18 +01:00
Nicolas Meienberger
46c8139a23 fix: ensure proper error message when backup operation is aborted 2025-12-19 23:27:25 +01:00
Nicolas Meienberger
7879d88a54 fix(backups): preserve relative include/exclude pattern behavior 2025-12-19 23:18:56 +01:00
Nico
579bc89970 fix: prepend mount path in exclude patterns (#188)
* fix: prepend mount path location in exclude patterns

* test(backups): add tests suite for backend include & exclude patterns

* test: fix leaking global module mock
2025-12-19 22:35:34 +01:00
Nico
61dc07b36b Controllers tests (#187)
* test: backups service

* refactor: create hono app in a separate file

To avoid side effects like db migration or startup scripts when testing

test(backups): add security tests to the backups controller

* ci: run typechecks, build and tests on PR

* test: controllers security tests

* chore: update lock file

* refactor: pr feedbacks
2025-12-19 19:25:21 +01:00
Nicolas Meienberger
e57efcfcdc refactor: extract sortable card into its own component 2025-12-16 20:23:44 +01:00
Raj Dave
8e49b10042 Validates and improves schedule reordering
Ensures schedule reordering requests are valid by checking for duplicate and non-existent IDs.

Improves performance by using a transaction for batch updates.
2025-12-15 16:06:21 +03:00
Raj Dave
b51f3549c2 Backend and UI modifications to allow reordering of backup schedules
Adds drag-and-drop functionality to reorder backup schedules

Introduces a sort order field to the database schema and implements API endpoints to update the schedule order.

This allows users to visually prioritize their backup jobs.
2025-12-15 13:13:34 +03:00
Nico
8a5d45cbfb fix: run forget on mirrors in the background (#136) 2025-12-14 10:34:25 +01:00
Nico
be53466739 fix: same time backups run multiple times (#134) 2025-12-13 23:47:41 +01:00