Commit Graph

6545 Commits

Author SHA1 Message Date
Dietmar Maurer 0465218953 src/backup.rs: add documentation about ChunkStore locking 2019-03-22 10:14:50 +01:00
Dietmar Maurer 43b1303398 datastore: use new ProcessLocker
To make sure only one process runs garbage collection while having active writers.
2019-03-22 09:42:15 +01:00
Dietmar Maurer abfc001f25 src/tools/process_locker.rs: new() - use generic path parameter 2019-03-22 09:41:32 +01:00
Dietmar Maurer a650f50301 src/tools/process_locker.rs: implement inter-process reader-writer locks 2019-03-22 08:05:51 +01:00
Wolfgang Bumiller eb90c9e372 tools: style fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-20 09:57:13 +01:00
Christian Ebner e04d1bfadc Cleanup of if statement with unwraps by a more compact match statement
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-03-20 09:49:18 +01:00
Dietmar Maurer 8346f0d59b src/server/rest.rs: correctly extract content type 2019-03-19 12:50:15 +01:00
Dietmar Maurer 164d961729 docs/index.rst: cleanup 2019-03-19 12:22:57 +01:00
Wolfgang Bumiller a690ecacf0 daemon: simplify daemon creation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-19 12:12:54 +01:00
Wolfgang Bumiller e4311382d9 tools: daemon: rename some structs
Reloadable resources are now 'Reloadable' instead of
'ReexecContinue'.

The struct handling the reload is a 'Reloader', not a
'ReexecStore'.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-19 11:09:46 +01:00
Wolfgang Bumiller 5e7bc50af1 add reload support to api daemon
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-18 12:29:18 +01:00
Wolfgang Bumiller a2ca713701 add reload support to proxy
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-18 12:29:18 +01:00
Wolfgang Bumiller af70c1811b tools: implement ReexecContinue for tokio's TcpListener
This is the only thing we currently need to keep alive for
reloads.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-18 12:29:18 +01:00
Wolfgang Bumiller 4422ba2c7f tools: daemon: add a default signalfd helper
Proxy and daemon for now just want to handle reload via
`SIGHUP`, so provide a helper creating the signalfd stream
doing that - this is simply a filtered stream which passes
the remaining signals through, so it can be used exactly
like the signalfd stream could before to add more signals.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-18 12:29:18 +01:00
Wolfgang Bumiller dce94d0e09 tools: add daemon helpers
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-18 12:29:18 +01:00
Wolfgang Bumiller ff7049d481 tools: add fd_change_cloexec helper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-18 12:29:18 +01:00
Wolfgang Bumiller 1c042cdc6c proxy: listener error handling fixup
If the listening socket goes into some error state we'll get
std::io::Errors rather than higher level errors from the
native_tls::TlsAcceptor, those are usually fatal. (Ran into
this after performing a shutdown() on the file descriptor,
after which the future just endlessly loops in accept().)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-18 12:29:18 +01:00
Dietmar Maurer 60864b1b56 src/pxar.rs: improve docu 2019-03-18 12:27:30 +01:00
Dietmar Maurer 515688d1f1 avoid compiler warnings 2019-03-18 10:00:58 +01:00
Dietmar Maurer 998b827a5d start file format docu 2019-03-16 16:44:45 +01:00
Dietmar Maurer ba10f2b0d4 src/bin/dynamic-files.rs: test case for file shrink during backup 2019-03-16 14:22:14 +01:00
Dietmar Maurer af572aaa4c pxar: implement hardlinks
So we are no longer compatible with catar ...
2019-03-16 11:02:12 +01:00
Wolfgang Bumiller c238e4d4b3 protocol: c-api: add proxmox_backup_finish_backup to .h
this was missing

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-15 14:28:28 +01:00
Wolfgang Bumiller 7b7a42b467 protocol: use Option<fn()> for nullable function
This should have the same memory layoutas a simple `fn()`
with NULL function pointers mapping to None.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-15 14:21:52 +01:00
Wolfgang Bumiller 33b1767d05 protocol: add C header work in progress and test client
The test client simply (optionally) requests a list of
hashes of an existing file.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-15 12:40:47 +01:00
Wolfgang Bumiller 7f497b2e68 protocol: add C bindings for Connector
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-15 12:40:47 +01:00
Wolfgang Bumiller 4457adb28c protocol: C-API improvements
- make Client creation reusable
- add helper to create a CApiSocket for any Read + Write
  streams
- add drop callback (required for the above)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-15 12:40:47 +01:00
Wolfgang Bumiller 41310cb96e protocol: add connector
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-15 12:40:47 +01:00
Dietmar Maurer 812dd935ce src/pxar/encoder.rs: detect hardlinks 2019-03-15 12:19:51 +01:00
Dietmar Maurer 896e803feb src/pxar/sequential_decoder.rs: dump_entry - fix FIFO/SOCKET handling 2019-03-15 12:15:38 +01:00
Dietmar Maurer 7dfa17c7cc src/pxar/binary_search_tree.rs: fix test 2019-03-15 11:34:31 +01:00
Dietmar Maurer 9307279faf cleanup: remove dead code 2019-03-15 10:18:28 +01:00
Dietmar Maurer 46cfe7ab7e src/pxar/decoder.rs: implement seekable decoder 2019-03-15 09:36:05 +01:00
Dietmar Maurer 0e21b87be3 renamed: src/pxar/decoder.rs -> src/pxar/sequential_decoder.rs 2019-03-15 08:36:02 +01:00
Dietmar Maurer 3dbfe5b142 simplify pxar module structure 2019-03-15 08:24:32 +01:00
Dietmar Maurer 1ef46b81d3 src/bin/pxar.rs: implement extract 2019-03-15 08:03:44 +01:00
Dietmar Maurer 02c93163cf src/pxar/decoder.rs: correctly call callback() 2019-03-15 08:02:04 +01:00
Dietmar Maurer 5defa71bf9 rename PxarBackupWriter into PxarDecodeWriter 2019-03-15 07:20:22 +01:00
Dietmar Maurer b005ed12d5 src/client/http_client.rs: avoid compiler warning 2019-03-15 07:16:26 +01:00
Dietmar Maurer 9e26abf16b src/cli/command.rs: fix iterator usage 2019-03-15 07:12:40 +01:00
Dietmar Maurer f98746ba6c src/pxar/decoder.rs: improve docu 2019-03-15 07:12:11 +01:00
Dietmar Maurer 0b2d7fdc81 src/pxar/decoder.rs: avoid compiler warnings 2019-03-14 17:45:47 +01:00
Dietmar Maurer 37940aa1f9 src/bin/pxar.rs: implement dump/list 2019-03-14 17:43:11 +01:00
Dietmar Maurer 40360fde6e src/pxar/decoder.rs: implement dump_archive
use this to debug archive problems ...
2019-03-14 13:10:27 +01:00
Dietmar Maurer 8968258b66 rename catar into pxar
To avoid confusion with the casync implementation.
2019-03-14 10:54:09 +01:00
Dietmar Maurer 7c4dd94670 rename catar into pxar
Seems impossible to stay compatible with the original catar specification,
so we change the name to avoid confusions.
2019-03-14 10:14:32 +01:00
Dietmar Maurer 806500cd09 src/tools.rs: improve file name completion
Use current working directory by default.
2019-03-14 08:17:35 +01:00
Dietmar Maurer 08dc340a12 src/bin/proxmox-backup-client.rs: complete archive names 2019-03-14 08:09:35 +01:00
Wolfgang Bumiller f7bbb8a664 protocol: add missing finish_backup to C API
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-13 14:16:17 +01:00
Wolfgang Bumiller 6f90a6a764 protocol: cleanup finish_backup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-13 14:16:17 +01:00