Commit Graph

111 Commits

Author SHA1 Message Date
Nico
8fedeef4d1 feat: add restore agent RPC foundation (#929)
* feat: add restore agent RPC foundation

* chore: temp event handlers

* refactor: export restore progress from dto file
2026-05-31 19:39:20 +02:00
Nico
2d877cee5a feat: durable tasks (#927) 2026-05-30 16:54:49 +02:00
Nico
0a2c6bca0c refactor(restic): auto try to unlock and remove stale locks (#926) 2026-05-30 13:21:22 +02:00
Nico
d4436b0cdc refactor(restic): all commands return effects (#924)
* refactor(restic): all commands are effects

* fix(restic): preserve effect failure errors

* chore: pr feedbacks
2026-05-30 10:10:54 +02:00
Nico
7b5c53bb7d fix(sftp): allow legacy ssh rsa to add support for older servers (#921)
* refactor(e2e): use more stable assertion

* feat(sftp): add legacy ssh-rsa option
2026-05-27 21:19:23 +02:00
Nico
a58fe82d48 refactor: move backup path resolution into agent contract (#872) 2026-05-10 21:46:03 +02:00
Nico
aa7da321ba refactor: dedpulicate volume schemas across packages (#864) 2026-05-09 15:36:25 +02:00
Nico
700fa1cd4a feat: route backups through volume agents (#860) 2026-05-06 22:13:51 +02:00
Nico
e65a135676 feat(agents): create agent registry and service (#849)
* feat(agents): create agent registry and service

* fix: mark agent offline only if the session was removed properly

* refactor: centralize agent backup lifecycle state

* refactor: simplify session management

* refactor: move effect / async boundary in one place

* chore: regen migration

* refactor: improve error handling

* chore: pr feedback
2026-05-05 19:34:10 +02:00
Nicolas Meienberger
cd69eea27f fix: avoid unnecessary webhook allowlist checks on notification edits 2026-05-05 10:24:20 +02:00
Nicolas Meienberger
8772d4796e feat(backups): configure backup webhook timeout 2026-05-04 07:52:21 +02:00
Nicolas Meienberger
d19d827496 fix(backups): default ignore-inode for fuse volumes 2026-05-02 08:54:14 +02:00
Nico
220e2d2801 feat: make webhook calls trusted only (#848)
* feat: make webhook calls trusted only

* fix: pr feedbacks
2026-04-30 22:14:22 +02:00
Nico
11e9fbcc44 feat: pre/post backup webhooks (#835)
* feat: pre/post backup webhooks

* fix(hooks): run post when cancelled

* refactor(webhooks): headers as array

* refactor: pr feedback

* refactor: simplify hooks ceremonies

* chore: pr feedbacks

* chore: re-gen migration
2026-04-29 23:48:58 +02:00
Nico
e506047415 test: add property-based tests with fast-check (#832) 2026-04-25 09:35:28 +02:00
Nico
e2c9ef0518 chore: fixed unused types (#824) 2026-04-22 22:04:46 +02:00
Nico
a0c34ee48d chore: cleanup un-used exports (#823) 2026-04-22 21:14:37 +02:00
Nico
63b08a4b71 feat(backups): ensure volume readiness before backup (#815)
* feat(backups): ensure volume readiness before backup

Backup preflight checks were relying on a db cached status. Now a real
volume healthcheck is performed before backing up. Closes #811 #695

* chore: fix ci
2026-04-20 21:18:29 +02:00
Eric Hess
d2f65716fe feat(mirrors): add selective snapshot sync to mirror repositories (#755)
* feat(mirrors): add selective snapshot sync to mirror repositories

Allow users to sync missing snapshots from the source repository to a
mirror. A new sync button per mirror opens a dialog showing which
snapshots are missing, with checkboxes to select which ones to copy.

- Add GET /:shortId/mirrors/:mirrorShortId/status endpoint to compare
  snapshots between source and mirror repositories
- Add POST /:shortId/mirrors/:mirrorShortId/sync endpoint accepting
  selected snapshotIds in the request body
- Extend restic copy command to accept multiple snapshotIds
- Add sync preview dialog with snapshot selection to the frontend

* refactor: stylistic changes

---------

Co-authored-by: Nicolas Meienberger <github@thisprops.com>
2026-04-16 21:28:48 +02:00
Nico
33601dde24 feat(agent): add standalone agent runtime (#776)
* feat(agent): add standalone agent runtime

* fix(agent): add Bun and DOM types to agent tsconfig

* refactor: wrap backup error in a tagged effect error

* feat(controller): add agent manager and session handling

* feat(backups): execute backups through the agent

* fix(agent): harden disconnect and send-failure handling

* fix: rebase conflicts

* test: simplify mocks

* refactor: split agent runtime state

* fix(backup): keep old path when agent is disabled

* fix: pr feedbacks
2026-04-13 23:29:10 +02:00
Nicolas Meienberger
76ac78c40c chore: fix ts issues in test files 2026-04-12 11:39:06 +02:00
Nicolas Meienberger
832425025f refactor(backup): move retry delay minutes conversion at the contract level 2026-04-12 11:28:39 +02:00
Nicolas Meienberger
ed046f284d fix(backup): reset failure count on cancel 2026-04-12 10:39:14 +02:00
DerPenz
8765c5e705 feature(backup): do not trigger retry on manual backup 2026-04-12 09:49:35 +02:00
DerPenz
11bb95db92 fix(backup): retry wont be scheduled if it is after the next scheduled backup 2026-04-12 09:49:35 +02:00
DerPenz
5d8c2925d8 fix(backup): resetting failureRetryCount if backup is not retried 2026-04-12 09:49:35 +02:00
DerPenz
61396625f1 fix(backup): added limits in zod schema 2026-04-12 09:49:35 +02:00
DerPenz
b2728cb09a fix(backup): removed useless null checks 2026-04-12 09:49:35 +02:00
DerPenz
0476dcebb8 fix(backup): updating new settings correctly in the db 2026-04-12 09:49:35 +02:00
DerPenz
79b7733e1e fix(backup): updated types gen 2026-04-12 09:49:35 +02:00
DerPenz
7e9b1fafa3 feat(backup): added retry policy into job settings 2026-04-12 09:49:35 +02:00
DerPenz
feb69ef7a7 feat(backup): retry backup on failure 2026-04-12 09:49:35 +02:00
Nico
c371676ad0 feat(agent): add standalone agent runtime (#761)
* feat(agent): add standalone agent runtime

* fix(backups): bridge local executor to Effect restic API

* fix(agent): add Bun and DOM types to agent tsconfig

* refactor: wrap backup error in a tagged effect error

* fix: pr feedbacks
2026-04-08 20:47:15 +02:00
Nico
a4e54ac527 fix: serialize mirror copy operations per destination repository (#747)
* fix: serialize mirror copy operations per destination repository

* refactor(copy-mirror): implement acquireMany to avoid deadlock cycles
2026-04-04 17:12:45 +02:00
Nico
4305057185 test: move test runner from Bun to Vitest (#727)
* chore: migrate to vitest

* test: speed up some suites by sharing sessions and mocking expensive non-tested actions

* test: refactor some tests to verify behavior instead of implementation details

* chore: fix linting issues
2026-04-01 20:05:54 +02:00
Nicolas Meienberger
e265f7d478 test: fix flaky test depending on mutex timing 2026-04-01 09:27:13 +02:00
Nico
2a219ac042 refactor(backups): consolidate execution into service helpers (#717) 2026-03-29 12:57:47 +02:00
Nico
866a3c63e8 feat: manual backup option (#713)
Closes #710
2026-03-26 19:35:18 +01:00
Nico
05dd440dea fix(restic): separate error summary from diagnostic details (#694) 2026-03-21 20:50:23 +01:00
Nico
a039bb478e fix: separate raw include paths and patterns (#683)
Separate include patters and included path cleanly to avoid path with special characters to be expanded. Closes https://github.com/nicotsx/zerobyte/discussions/680

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

## Summary by CodeRabbit

* **New Features**
  * Added ability to select specific directories and paths for inclusion in backup schedules, separate from pattern-based rules.

* **Bug Fixes & Improvements**
  * Automatically migrates existing backup configurations to work with the new path selection system.
  * Enhanced backup restoration to properly handle both selected paths and pattern-based inclusions.

* **Chores**
  * Updated database schema to support path selections in backup schedules.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-20 19:27:54 +01:00
Nico
f6f17cd61c fix: backup progress use simple polling & cache (#678)
#593
2026-03-18 20:25:30 +01:00
Nico
429b69ec92 fix: show back warnings logs and surface in UI (#677)
fix: show back warnings logs and surface in UI

#544

chore: fix dev login issue
2026-03-18 20:21:14 +01:00
Nico
e39220c024 fix: allow quoted urls in env variables (#676) 2026-03-17 22:09:22 +01:00
Nicolas Meienberger
66f95dcd8e fix: reject include patterns that are not in the volume root 2026-03-12 20:17:40 +01:00
Nico
332e5bffda refactor: extract restic in core package (#651)
* refactor: extract restic in core package

* chore: add turbo task runner

* refactor: split server utils

* chore: simplify withDeps signature and fix non-null assertion
2026-03-11 21:56:07 +01:00
Nico
df312cd419 refactor: move from arktype to zod (#637)
chore: gen api-client
2026-03-09 18:27:03 +01:00
Nicolas Meienberger
3d2900ab69 refactor: harden cron validation and fail early in case of wrong pattern 2026-03-08 12:47:19 +01:00
Nico
6769f5fa6c fix: run repo stats in background (#620)
Closes #614
2026-03-05 20:18:34 +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