Commit graph

11 commits

Author SHA1 Message Date
Adithya Vardhan
4efe735acf
fix: prevent LN client access during shutdown (#2096)
* fix: prevent LN client access during shutdown

* chore: run mockery

* chore: push lnClientShuttingDown inside stopLNClient

* fix: use atomic bool for synced access
2026-02-27 15:45:09 +07:00
Roland
8989c67911
fix: disable restore backup when using postgres db backend (#1361) 2025-06-02 14:06:23 +07:00
Roland
82e4a162fb
fix: delete access token when creating backup to migrate node (#1040) 2025-01-30 14:59:17 +07:00
Roman D
df9393194a
feat: PostgreSQL support (#922)
* feat: enable Postgres connections

* feat: implement migration templates

* feat: convert sqlite-specific migrations to migration templates; adjust SQL syntax

* fix: add migration to fix postgres incompatibilities in the DB schema

* fix: correct SQL syntax for comparisons in the transactions service

* feat: database migration tool

* chore: update tests for testing with Postgres

* fix: update test

* fix: explicitly store mock timestamps in UTC

* chore: add txdb to go.mod and run tidy

* fix: serialize concurrent transactions when running tests with txdb

* chore: update README to mention postgres

* fix: use timestamptz in Postgres

* test: add Github action for testing the backend with Postgres

* chore: fix migration name and add comments

* docs: add db migration notes to README

* fix: address PR feedback

* fix: rename the cmd/migrate tool to cmd/db_migrate

* feat: add schema check in the DB migration tool

* test: use testdb instead of txdb for testing with Postgresql

* fix: fix tests after merge

* chore: comment out unused VACUUM in migrations

* fix: reset Postgres sequences after migrating data

* docs: update migrate command in readme

* fix: do not allow backup for migration when postgres is enabled

* chore: add debug logs for db backend type

* chore: use Logrus instead of slog for db_migrate

* fix: initialize logger in the keys tests

* test: add db_migrate test

* fix: use transaction object in db_migrate function

* fix: txlock in db migration test

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-01-16 17:17:24 +07:00
Roland
f0e749f51d
feat: auto unlock (#949)
* feat: auto unlock feature

* chore: write auto unlock password from env to user config

* chore: simplify alert
2025-01-07 20:08:10 +07:00
Roland
373965a764
chore: add extra migration backup logs (#757)
* chore: add extra migration backup logs

* chore: minor copy
2024-10-25 13:15:54 +07:00
Adithya Vardhan
315cf7e158
fix: use workdir for temp bkp file (#511)
* chore: use workdir for temp bkp file

* chore: change bkp file name to albyhub

* chore: only notarize dmg during release

* chore: change tmp file name to albyhub-*.bkp

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-08-23 16:47:27 +07:00
Roland Bewick
d48ac18111 fix: migrate node
- ensure full wal checkpoint is executed on shutdown
- correctly shutdown DB on normal exit
- shutdown service before exiting on backup restore
- remove JWT middleware from backup endpoint
- delete old nwc db files before backup restore to ensure restored files are used
2024-08-14 17:51:48 +07:00
Roland Bewick
3088373477 chore: rename everything to alby hub 2024-07-05 20:32:40 +07:00
Roland
12412ff399
feat: backend-specific capabilities (#508)
Co-authored-by: Adithya Vardhan <imadithyavardhan@gmail.com>
2024-07-01 20:30:40 +07:00
Roland
d06b421769
Split service into packages (#435) 2024-06-17 19:42:09 +07:00
Renamed from backup/backup_service.go (Browse further)