Dietmar Maurer
7eea56ca00
use cli from proxmox::api
2019-12-02 11:56:29 +01:00
Dietmar Maurer
e8e9bae4d1
src/bin/completion.rs: add echo command
2019-12-02 11:04:40 +01:00
Dietmar Maurer
19d7a59236
src/bin/completion.rs: use api macros
2019-12-02 10:57:19 +01:00
Dietmar Maurer
7afc1af7ab
src/bin/completion.rs: add history support
2019-11-30 15:08:37 +01:00
Dietmar Maurer
2b691daf6f
src/cli.rs: add insert_help() method
2019-11-30 14:56:31 +01:00
Dietmar Maurer
1201abcffa
src/cli/command.rs: implement help
2019-11-30 13:02:00 +01:00
Dietmar Maurer
ca60ac13d9
use rustyline to replace readline
2019-11-29 12:49:44 +01:00
Christian Ebner
314bb35868
catalog_shell: fix several clippy warnings
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-11-27 10:13:50 +01:00
Dietmar Maurer
2a11191072
src/pxar/fuse.rs: rename from_decoder into new, new into from_path
2019-11-26 10:56:41 +01:00
Dietmar Maurer
99b5b6cba9
src/pxar/decoder.rs: use trait object as reader
...
So that the Decoder is no longer genertic.
2019-11-26 10:45:11 +01:00
Dietmar Maurer
f701d0335e
src/pxar/sequential_decoder.rs: remove callback from new()
...
And use an extra functzion set_callback() to configure that.
Also rewrite pxar/fuse.rs and implement a generic Session (will get
further cleanups with next patches).
2019-11-26 09:56:48 +01:00
Dietmar Maurer
49fddd985c
src/cli/command.rs: use static array for arg_param
2019-11-25 11:16:41 +01:00
Wolfgang Bumiller
be2bb37205
remove api_schema submodule
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-22 09:31:45 +01:00
Dietmar Maurer
e57e1cd82d
move src/api_schema/config.rs -> src/server/config.rs
2019-11-22 09:23:03 +01:00
Christian Ebner
3cf73c4e53
src/bin/proxmox-backup-client.rs: impl shell subcommand for client
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-11-22 08:22:50 +01:00
Dietmar Maurer
45cc157f7c
docs: add backup reader protocol
2019-11-22 06:59:37 +01:00
Wolfgang Bumiller
cad540e969
api/compat: remove remaining api_schema references
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 14:53:15 +01:00
Wolfgang Bumiller
a2479cfa1a
api/compat: drop more compat imports from api_schema.rs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 14:36:28 +01:00
Wolfgang Bumiller
3d482025b3
move api schema into proxmox::api crate
...
And leave some compat imports in api_schema.rs to get it to
build with minimal changes.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 14:14:54 +01:00
Dietmar Maurer
552c225948
sort all property lookup tables
...
Required, because we use binary sreach to find items.
2019-11-21 13:32:09 +01:00
Dietmar Maurer
255f378a1b
use const api definitions
2019-11-21 13:32:09 +01:00
Dietmar Maurer
bb19af7302
src/client/backup_reader.rs: factor out download_blob() helper
2019-11-08 13:16:41 +01:00
Dietmar Maurer
7205050059
src/client/backup_reader.rs: factor out download_fixed_index() helper
2019-11-08 12:51:52 +01:00
Dietmar Maurer
c3d84a2281
src/client/backup_reader.rs: factor out download_dynamic_index() helper
2019-11-08 12:51:52 +01:00
Dietmar Maurer
bf6e321744
change catalog format, use dynamic index to store catalog.
...
In order to remove size restriction of a single blob.
2019-11-08 10:35:48 +01:00
Dietmar Maurer
11377a47bb
avoid some clippy warnings
2019-10-25 18:04:37 +02:00
Christian Ebner
62d123e50a
pxar: add functionality to pass exclude MatchPatterns on create
...
This exposes the option to pass a list of exclude MatchPattern via the
'--exclude' option.
The list is encoded as file '.pxarexclude-cli' in the archives root directory.
If such a file is present in the filesystem, it is skipped and not included in
the archive in order to avoid conflicting information.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-10-23 07:31:49 +02:00
Dietmar Maurer
a8f10f849e
src/bin/proxmox-backup-client.rs: fix parameters for get_encryption_key_password
2019-10-17 10:28:21 +02:00
Dietmar Maurer
f06b820ac0
src/backup/manifest.rs: add verify_file
2019-10-13 10:09:12 +02:00
Dietmar Maurer
59e9ba01c6
src/backup/manifest.rs: new class to generate/parse index.json
2019-10-12 17:58:08 +02:00
Dietmar Maurer
ad6e5a6f51
rename INDEX_BLOB_NAME to MANIFEST_BLOB_NAME
2019-10-12 15:53:27 +02:00
Dietmar Maurer
296c50ba3d
src/client/backup_reader.rs: add download_manifest
...
Also add crypt_config as member variable.
2019-10-12 15:50:26 +02:00
Dietmar Maurer
cf9271e27c
src/client/backup_writer.rs: move BackupClient code into extra file
...
And rename it to BackupWriter.
2019-10-12 13:53:11 +02:00
Dietmar Maurer
9e490a7479
src/client/backup_reader.rs: split BackupReader code into separate file
2019-10-12 12:57:08 +02:00
Dietmar Maurer
fd04ca7a5a
src/bin/proxmox-backup-client.rs: pass verbose flag to dump_image
...
And print some useful status to stderr.
2019-10-09 12:04:02 +02:00
Dietmar Maurer
7123ff7d43
src/backup/data_blob.rs: avoid Arc<CryptConfig>
...
use simple reference instead.
2019-10-07 11:41:35 +02:00
Dietmar Maurer
c26d4b4573
cleanup: remove dead code
2019-10-05 16:10:41 +02:00
Dietmar Maurer
88892ea801
src/bin/proxmox-backup-client.rs: cleanup restore
...
- write directly to /dev/stdout (instead of using stdout line writer)
- avoid BufferedFixedReader
2019-10-05 11:52:12 +02:00
Dietmar Maurer
ff01c1e393
src/client/http_client.rs: store raw data/blob size in index.json
2019-10-02 10:54:06 +02:00
Dietmar Maurer
32efac1cce
remove trailing whitespace
2019-09-20 08:12:31 +02:00
Christian Ebner
70235f72f4
src/bin/proxmox-backup-client.rs: add functionality to mount pxar archive.
...
This adds the basic functionality to mount an archive stored in a repository
locally via fuse.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-20 08:01:01 +02:00
Christian Ebner
2fa91f5221
src/bin/pxar.rs: adapt to new deamonize flag
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-20 08:00:20 +02:00
Dietmar Maurer
cc2ce4a92f
src/client/http_client.rs: add password parameter to HttpClient::new()
2019-09-16 12:35:23 +02:00
Dietmar Maurer
4a7de56e2f
avoid injecting ENV vars from Makefile
...
So that we can run "cargo build" without setting vars manually.
2019-09-09 10:51:08 +02:00
Dietmar Maurer
d2267b112d
src/bin/proxmox-backup-client.rs: verify blob/catlog checksums
2019-09-04 08:47:14 +02:00
Christian Ebner
3fa71727ee
src/bin/proxmox-backup-client.rs: refactoring of match statement
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-04 06:08:00 +02:00
Dietmar Maurer
a40220c056
src/bin/proxmox-backup-client.rs: code cleanup - factor out some functions
2019-09-03 13:31:13 +02:00
Dietmar Maurer
36493d4d7e
src/backup.rs: define INDEX_BLOB_NAME here
2019-09-03 13:15:44 +02:00
Dietmar Maurer
df65bd3da6
src/bin/proxmox-backup-client.rs - restore: verify checksums
2019-09-03 13:12:16 +02:00
Wolfgang Bumiller
2b92971fba
merge fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:22:36 +02:00
Wolfgang Bumiller
083ff3fd5d
update to tokio 0.2.0-alpha.4
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
8630557918
src/bin/upload-speed.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
cab6816969
src/bin/test_chunk_speed2.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
fda5797b8a
src/bin/proxmox-backup-proxy.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
e9722f8bde
src/bin/proxmox-backup-client.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
e76ac3a499
src/bin/proxmox-backup-api.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller
e235c8f719
src/bin/h2s-server.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller
74be6dc9b7
src/bin/h2server.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller
55d8a631fc
src/bin/h2s-client.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller
15d0e4a3bd
src/bin/h2client.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller
b9203d87f4
src/bin/download-speed.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Dietmar Maurer
02fcf372e4
rc/bin/proxmox-backup-client.rs - restore: always download index.json.blob
2019-09-02 14:14:32 +02:00
Dietmar Maurer
0d9862803b
src/bin/proxmox-backup-client.rs - reatore: avoid loading (large) blobs into memory
2019-09-02 14:13:31 +02:00
Christian Ebner
bcb664cb69
pxar/fuse: add pxar cli flag to set single- or multi-threaded session loop
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 09:43:14 +02:00
Dietmar Maurer
9d135fe617
src/backup/catalog_blob.rs: moved catalog impl. from pxar
...
And avoid loading catalog into memory.
2019-08-16 12:27:17 +02:00
Wolfgang Bumiller
9025312aa6
avoid lifetimes in blob reader/writer
2019-08-16 10:07:24 +02:00
Dietmar Maurer
a84ef4c205
src/bin/proxmox-backup-client.rs: avoid loading catalog into memory
...
We can use the new DataBlobReader instead.
2019-08-14 15:07:28 +02:00
Dietmar Maurer
e240d8be0b
src/bin/proxmox-backup-client.rs: implement login/logout
2019-08-10 09:12:17 +02:00
Christian Ebner
f71e8cc96f
pxar: add command 'mount' to cli of pxar
...
Allows to mount an archive to a specified mountpoint via the cli.
Once the archive is mounted, the process is send to the background.
By passing the --verbose flag, the process is kept in foreground and
debug output is provided.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-08-09 16:46:16 +02:00
Dietmar Maurer
9049a8cfe6
src/bin/proxmox-backup-client.rs: implement catalog command
2019-08-09 11:36:33 +02:00
Dietmar Maurer
7926a3a1cf
src/bin/proxmox-backup-client.rs: add archive filename to catalog
2019-08-09 11:05:56 +02:00
Dietmar Maurer
3fb53e07b4
src/bin/proxmox-backup-client.rs: avoid compiler warning
2019-08-09 10:22:32 +02:00
Dietmar Maurer
543a260ff9
src/bin/proxmox-backup-client.rs: new completion helper for snapshots
2019-08-09 10:08:45 +02:00
Dietmar Maurer
2761d6a4f3
src/pxar/encoder.rs: use BackupCatalogWriter
2019-08-09 09:46:49 +02:00
Dietmar Maurer
977eeb24f6
src/bin/proxmox-backup-client.rs: avoid doubled file extensions (.blob.blob) in index.json
2019-08-07 10:23:08 +02:00
Dietmar Maurer
4af0ee055a
api: always use complete file names (including add exctensions)
2019-08-07 10:10:14 +02:00
Dietmar Maurer
c4f025ebbf
src/bin/proxmox-backup-client.rs: fix remote filename completion
2019-08-07 06:48:18 +02:00
Dietmar Maurer
c807d231eb
src/client/http_client.rs: compute file checksums
2019-08-06 11:26:06 +02:00
Dietmar Maurer
a17a0e7a9f
src/api2/admin/datastore.rs: extract backup size from index.json
2019-08-06 10:56:21 +02:00
Dietmar Maurer
8c70e3eb18
src/api2/admin/datastore.rs - files: return data from index.json
2019-08-05 13:22:19 +02:00
Dietmar Maurer
f69adc81a6
use new proxmox::tools::nodename
2019-08-03 17:06:23 +02:00
Dietmar Maurer
e18a6c9ee5
update to nix 0.14, use code from proxmox:tools
2019-08-03 13:05:38 +02:00
Christian Ebner
4d142ea79e
pxar: cleanup: refactor and rename exclude pattern
...
The original name PxarExcludePattern makes no sense anymore as the patterns are
also used to match filenames during restore of the archive.
Therefore, exclude_pattern.rs is moved to match_pattern.rs and PxarExcludePattern
rename to MatchPattern.
Further, since it makes more sense the MatchTypes are now declared as None,
Positive, Negative, PartialPositive or PartialNegative, as this makes more sense
and seems more readable.
Positive matches are those without '!' prefix, Negatives with '!' prefix.
This makes also the filename matching in the encoder/decoder more intuitive and
the logic was adapted accordingly.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-08-03 08:52:32 +02:00
Christian Ebner
47651f9530
pxar: cleanup: move feature flags to src/pxar/flags.rs and omit CA_FORMAT prefix on all of them
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-08-03 08:51:06 +02:00
Dietmar Maurer
b335f5b713
src/bin/proxmox-backup-client.rs: sign index.json
2019-08-02 10:00:15 +02:00
Christian Ebner
81a9905e0a
pxar: implement feature flag support for device nodes, fifos and sockets
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-08-02 07:55:17 +02:00
Dietmar Maurer
2c3891d1c3
src/bin/proxmox-backup-client.rs: upload backup index.json
...
The plan is to use this file to verify the backup content.
2019-08-01 12:39:02 +02:00
Dietmar Maurer
cec17a3ec7
src/bin/proxmox-backup-client.rs - files: allow --repository parameter
2019-07-31 11:45:55 +02:00
Dietmar Maurer
52c171e49d
src/bin/proxmox-backup-client.rs: implement files command
2019-07-31 11:23:53 +02:00
Dietmar Maurer
43a406fd3f
src/bin/proxmox-backup-client.rs: supress useless output from prune command
2019-07-31 10:15:16 +02:00
Christian Ebner
6a87910949
pxar: implement allow_existing_dirs for pxar decoder
...
By default, restoring an archive will fail if files with the same filename
already exist in the target directory.
By setting the allow_existing_dirs flag, the restore will not fail if an
existing directory is encountered.
The metadata (permissions, acls, ...) of the existing directory will be set
to the ones from the archive.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-07-30 09:40:30 +02:00
Dietmar Maurer
46d5aa0a09
src/bin/proxmox-backup-client.rs: add restore flag --allow-existing-dirs
...
Not jet implemented ...
2019-07-29 12:49:15 +02:00
Dietmar Maurer
ea7a7ef299
src/bin/proxmox-backup-client.rs: fixup - correctly pass prune parameters
2019-07-27 09:24:23 +02:00
Dietmar Maurer
9fdc3ef46f
src/api2/admin/datastore.rs: pass backup type/id (group) to prune
...
IMHO, prune over all backup groups is a bit dangerous, considering
that more than one user might use a datastore.
2019-07-27 08:49:14 +02:00
Dietmar Maurer
7a6cfbd98d
src/bin/proxmox-backup-client.rs: correctly compute duration
...
And format time with SecondsFormat::Secs
2019-07-26 11:13:49 +02:00
Dietmar Maurer
bbf9e7e951
src/api2/backup.rs: cleanup schema definitions
2019-07-26 09:07:29 +02:00
Dietmar Maurer
ca5d0b61ca
src/api2/backup.rs: new required backup-time parameter
...
The client should pass the time as parameter.
2019-07-25 13:44:01 +02:00
Dietmar Maurer
ec34f7eba0
src/bin/proxmox-backup-client.rs: implement upload-log
2019-07-25 12:18:15 +02:00
Dietmar Maurer
79679c2d6e
src/bin/proxmox-backup-client.rs: allow to uploag .log files (as binary blobs)
2019-07-24 13:07:02 +02:00
Dietmar Maurer
5b72c9b4f7
src/pxar/encoder.rs: add new skip_lost_and_found parameter
2019-07-24 12:21:25 +02:00