Commit graph

29 commits

Author SHA1 Message Date
Jakub Trávník
a71009ff78
Increment warning count on volume mount failure 2025-12-29 20:41:01 +01:00
Jakub Trávník
5a4f4641b4 feat: improve config import with result tracking and idempotent repository detection
- Add ImportResult type to track succeeded/warnings/errors counts across all import functions
- Implement multi-layer repository duplicate detection:
  - URL-based check (same path/bucket/endpoint already registered)
  - Restic repo check (path is already a restic repository)
  - Name-based fallback check
- Standardize logging between CLI and env var import methods with logImportSummary()
- CLI exits with code 1 when import has errors
- Remove shortId override for local repo migrations (use full path with isExistingRepository instead)
- Update example JSON and README:
  - Document that local repo path is optional (defaults to /var/lib/zerobyte/repositories)
  - Add existing-local-repo example with isExistingRepository: true
  - Add S3 endpoint field to example
  - Expand config behavior docs to explain all repository skip conditions
- Improve .gitignore to exclude all JSON except example template
2025-12-29 18:34:02 +01:00
Jakub Trávník
5cdec5cdaa Merge remote-tracking branch 'origin/main' into config-import-json 2025-12-29 11:06:06 +01:00
Jakub Trávník
45b5c0d752 feat(cli): add import-config command for manual config import
Add CLI command to import configuration from file or stdin, providing
an alternative to the env-var-based automatic import on startup.

Features:
- `import-config --config <path>` to import from a mounted file
- `import-config --stdin` to import from piped input (no file mount needed)
- `import-config --dry-run` to validate config without importing

Changes:
- Add app/server/cli/commands/import-config.ts with new command
- Register importConfigCommand in CLI index
- Refactor config-import.ts: extract runImport() and add applyConfigImport()
  for direct config object import (used by CLI)
- Update docs with both import methods (env var and CLI examples)
2025-12-29 11:04:12 +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
Jakub Trávník
7476897f87 feat(config-import): support mirrors, oneFileSystem, and optional flags
- Add mirrors support for backup schedules (copy to secondary repos)
- Add oneFileSystem flag to prevent crossing filesystem boundaries
- Support autoRemount=false for volumes (defaults to true)
- Support enabled=false for notification destinations (defaults to true)
- Optimize: move early return before dynamic imports in importBackupSchedules
- Update example config and README with new fields documentation
2025-12-23 15:29:27 +01:00
Jakub Trávník
9e9edd73a1 Merge remote-tracking branch 'origin/main' into config-import-json 2025-12-23 13:18:14 +01:00
Nico
ac9de54a7b
fix: allow arbitrary name for repositories and correctly import existing local repos (#197)
* fix: allow arbitrary name for repositories and correctly import existing local repos

* chore: rebase conflicts
2025-12-22 20:50:53 +01:00
Jakub Trávník
883ee49ded Merge remote-tracking branch 'origin/main' into config-import-json 2025-12-22 16:27:52 +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
Jakub Trávník
6e1cc89caa Merge origin/main into config-import-json 2025-12-19 14:23:02 +01:00
Nico
94f49e2022
refactor: separate healthcheck and auto remount in two separate jobs (#179)
* refactor: separate healthcheck and auto remount in two separate jobs

* fix: try catch in volume auto remount
2025-12-18 23:03:41 +01:00
Nico
a17da2562f
refactor(startup): ensure entities always use the latest configuration format (#173)
* refactor(startup): ensure entities always use the latest configuration schema

* refactor: await config updates to avoid race condition on later mount
2025-12-18 18:11:39 +01:00
Jakub Trávník
7f124f81cb refactor the import logic
- Updated README to reflect changes in config file structure and usage.
- Modified error messages for user registration to be more generic.
- Cleaned up startup logic to utilize the new config import functionality when requested.
- Adjusted JSON config structure to support user definitions.
2025-12-18 15:31:27 +01:00
Jakub Trávník
0b2576af91 Merge remote-tracking branch 'origin/main' into config-import-json 2025-12-17 18:27:32 +01:00
Nico
361311285a
refactor: remove docker volum plugin functionnality (#137) 2025-12-14 11:07:32 +01:00
Jakub Trávník
ea9003ca4b
Merge branch 'main' into config-import-json 2025-12-05 10:56:38 +01:00
Jakub Trávník
a4d1cc0791 enhance config interpolation and validation for admin user setup 2025-12-02 10:07:14 +01:00
Nico
9b46737852
refactor(repositories): add a locking mechanism for restic operations (#94)
* refactor(repositories): add a locking mechanism for restic operations

* fix: add missing lock in list repositories
2025-12-01 19:47:21 +01:00
Jakub Trávník
d767346345 admin passwordHash import support 2025-12-01 12:29:30 +01:00
Jakub Trávník
ebaebe0aad config import via json 2025-11-30 18:53:32 +01:00
Nico
9a9991eb9b
restore as a page (#87)
* feat: add custom restore target directory

Adds the ability to restore snapshots to a custom directory instead of
only the original path. Closes #12.

Changes:
- Add target parameter to restore API endpoint
- Add directory picker UI in file browser restore dialog
- Add target input field in snapshot restore form
- Create reusable PathSelector component

Note: Run `bun run gen:api-client` after merging to regenerate types.

* refactor: path selector design

* refactor: unify restore snapshot dialogs

* refactor: restore snapshot as a page

* chore: fix liniting issues

* chore(create-notification): remove un-used prop

---------

Co-authored-by: Deepseek1 <Deepseek1@users.noreply.github.com>
2025-11-30 16:43:34 +01:00
Nicolas Meienberger
58708cf35d refactor: repo healthcheck once per day
Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled
2025-11-29 12:25:46 +01:00
Nico
673827f9f3
refactor: all timestamps to ms (#77)
* refactor: change all timestamps to be in miliseconds

* chore: format files

* chore: fix syntax error
2025-11-26 23:20:22 +01:00
Nicolas Meienberger
4328607cc1 fix: skip renaming imported repository
Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled
2025-11-26 22:20:42 +01:00
Nico
b26a062648
refactor: use short ids to allow changing the name of volumes & repos (#67)
Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled
* refactor: use short ids to allow changing the name of volumes & repos

* refactor: address PR feedbacks

* fix: make short_id non null after initial population
2025-11-26 19:47:09 +01:00
Nicolas Meienberger
0e4c302620 refactor: make healthchecks less expensive 2025-11-20 18:50:40 +01:00
Nicolas Meienberger
6e6becec3b refactor(breadcrumbs): use handler & match pattern 2025-11-13 22:28:53 +01:00
Nico
95a0d44b45
refactor: unify backend and frontend servers (#3)
* refactor: unify backend and frontend servers

* refactor: correct paths for openapi & drizzle

* refactor: move api-client to client

* fix: drizzle paths

* chore: fix linting issues

* fix: form reset issue
2025-11-13 20:11:46 +01:00