Commit Graph

14 Commits

Author SHA1 Message Date
Christian Decker
e6d26b479c backup: Add a test to reproduce #158 2020-12-11 10:52:23 +01:00
Christian Decker
3a1a89ecf8 backup: Add a warning about the deprecated backup-destination flag 2020-11-25 19:26:44 +01:00
Christian Decker
f34787d065 backup: Rely solely on backup.lock and do not cache writes
Caching writes was causing us some issues if the startup of
`lightningd` didn't complete, i.e., the writes would happen on the
live DB, but we'd forget about them. Since we have the backup.lock
file in same directory as the plugin is running in, we no longer have
to defer the writes. This hugely simplifies our logic.

Fixes #155

Changelog-Fixed: backup: The plugin doesn't lose sync anymore if the startup is interrupted
2020-11-25 19:26:44 +01:00
Christian Decker
b9a8622422 backup: Remove temporary node_factory shim
This was required in order to avoid cleaning the datadir on creation.
2020-08-28 23:06:30 +02:00
Christian Decker
a1f005012a backup: Perform preflight checks before entering the plugin loop 2020-05-18 22:44:49 +02:00
Christian Decker
9b5a9076d4 backup: Fix flaky test due to logs being dropped on shutdown
We were writing logs directly before killing `lightningd` which resulted in
the logs being lost. The subsequent check for the log-lines then would fail
obviously.
2020-05-18 22:44:49 +02:00
Christian Decker
41e440522e backup: NF wrapper was missing a keyword arg 2020-04-30 17:52:16 +02:00
Christian Decker
3a399fd55c backup: Temporarily use a wrapper of the node_factory
The node_factory from pyln-client clears the node directory when provisioning
a new node, which interferes with the backup-cli creation of the initial
snapshot. This just disables the cleaning until we can release the next
pyln-client version
2020-04-12 19:35:21 +02:00
Christian Decker
1e6b55b3cb backup: If a database exists write an intial snapshot 2020-04-12 19:35:21 +02:00
Christian Decker
a44284d04d pytest: Test starting without having initialized the backup 2020-04-12 19:35:21 +02:00
Christian Decker
4c146bf2a4 backend: Use th backup URL in backup-cli and add snapshot type to FileBackend 2020-04-12 19:35:21 +02:00
Christian Decker
c58e675877 backup: Ensure at startup that the backup backend was initialized 2020-04-12 19:35:21 +02:00
Christian Decker
4e19c32444 backup: Add backup-cli tool and use it to initialize the backups 2020-04-12 19:35:21 +02:00
Christian Decker
c049069cff backup: Initial version of the backup plugin 2020-04-12 19:35:21 +02:00