Dylan Whyte
871181d984
mount: fix mount subcommand
...
fixes the error, "manifest does not contain
file 'X.pxar'", that occurs when trying to mount
a pxar archive with 'proxmox-backup-client mount':
Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2020-09-10 07:21:16 +02:00
Dominik Csapak
83088644da
fix #2983 : improve tcp performance
...
by leaving the buffer sizes on default, we get much better tcp performance
for high latency links
throughput is still impacted by latency, but much less so when
leaving the sizes at default.
the disadvantage is slightly higher memory usage of the server
(details below)
my local benchmarks (proxmox-backup-client benchmark):
pbs client:
PVE Host
Epyc 7351P (16core/32thread)
64GB Memory
pbs server:
VM on Host
1 Socket, 4 Cores (Host CPU type)
4GB Memory
average of 3 runs, rounded to MB/s
| no delay | 1ms | 5ms | 10ms | 25ms |
without this patch | 230MB/s | 55MB/s | 13MB/s | 7MB/s | 3MB/s |
with this patch | 293MB/s | 293MB/s | 249MB/s | 241MB/s | 104MB/s |
memory usage (resident memory) of proxmox-backup-proxy:
| peak during benchmarks | after benchmarks |
without this patch | 144MB | 100MB |
with this patch | 145MB | 130MB |
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-09-10 07:15:12 +02:00
Thomas Lamprecht
abd4c4cb8c
ui: add translation support
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-08 08:54:33 +02:00
Dominik Csapak
15ec790a40
tools/systemd/time: convert the resulting timestamp into an option
...
we want to use dates for the calendarspec, and with that there are some
impossible combinations that cannot be detected during parsing
(e.g. some datetimes do not exist in some timezones, and the timezone
can change after setting the schedule)
so finding no timestamp is not an error anymore but a valid result
we omit logging in that case (since it is not an error anymore)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-09-04 15:28:05 +02:00
Thomas Lamprecht
843880f008
bin/backup-proxy: assert that daemon runs as backup user/group
...
Because if not, the backups it creates have bogus permissions and may
seem like they got broken once the daemon is started again with the
correct user/group.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-26 10:30:15 +02:00
Thomas Lamprecht
74f94d0678
bin/backup-proxy: remove outdated perl comments
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-26 10:27:47 +02:00
Thomas Lamprecht
946c3e8a81
bin/backup-proxy: return error directly in main
...
anyhow makes this a nice error message, similar to the manual
wrapping used.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-26 10:27:47 +02:00
Thomas Lamprecht
1ffe030123
various typo fixes
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-08-25 18:52:31 +02:00
Dylan Whyte
3435f5491b
Fix typo in program output
...
Change "comptation" -> "computation"
Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2020-08-19 09:06:27 +02:00
Dominik Csapak
93bb51fe7e
config/jobstate: replace Job:load with create_state_file
...
it really is not necessary, since the only time we are interested in
loading the state from the file is when we list it, and there
we use JobState::load directly to avoid the lock
we still need to create the file on syncjob creation though, so
that we have the correct time for the schedule
to do this we add a new create_state_file that overwrites it on creation
of a syncjob
for safety, we subtract 30 seconds from the in-memory state in case
the statefile is missing
since we call create_state_file from proxmox-backup-api,
we have to chown the lock file after creating to the backup user,
else the sync job scheduling cannot aquire the lock
also we remove the lock file on statefile removal
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-08-14 06:38:02 +02:00
Dominik Csapak
713b66b6ed
cleanup: replace id from do_sync_job with info from job
...
we already have it inside the job itself
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-08-14 06:36:43 +02:00
Dominik Csapak
a13573c24a
syncjob: use do_sync_job also for scheduled sync jobs
...
and determine the last runtime with the jobstate
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-08-13 11:51:20 +02:00
Dominik Csapak
e6263c2662
config: add JobState helper
...
this is intended to be a generic helper to (de)serialize job states
(e.g., sync, verify, and so on)
writes a json file into '/var/lib/proxmox-backup/jobstates/TYPE-ID.json'
the api creates the directory with the correct permissions, like
the rrd directory
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-08-13 11:36:10 +02:00
Wolfgang Bumiller
72dc68323c
replace and remove old ticket functions
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-12 14:28:21 +02:00
Fabian Grünbichler
14f6c9cb8b
chunk readers: ensure chunk/index CryptMode matches
...
an encrypted Index should never reference a plain-text chunk, and an
unencrypted Index should never reference an encrypted chunk.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-08-11 09:54:22 +02:00
Wolfgang Bumiller
e7cb4dc50d
introduce Username, Realm and Userid api types
...
and begin splitting up types.rs as it has grown quite large
already
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-10 12:05:01 +02:00
Dylan Whyte
5f76ac37b5
fix: master-key: upload RSA encoded key with backup
...
When uploading an RSA encoded key alongside the backup,
the backup would fail with the error message: "wrong blob
file extension".
Adding the '.blob' extension to rsa-encrypted.key before the
the call to upload_blob_from_data(), rather than after, fixes
the issue.
Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2020-08-06 09:34:01 +02:00
Wolfgang Bumiller
d9b8e2c795
pxar: better error handling on extract
...
Errors while applying metadata will not be considered fatal
by default using `pxar extract` unless `--strict` was passed
in which case it'll bail out immediately.
It'll still return an error exit status if something had
failed along the way.
Note that most other errors will still cause it to bail out
(eg. errors creating files, or I/O errors while writing
the contents).
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-03 09:40:55 +02:00
Wolfgang Bumiller
d44185c4a1
fix #2873 : if --pattern is used, default to not extracting
...
The extraction algorithm has a state (bool) indicating
whether we're currently in a positive or negative match
which has always been initialized to true at the beginning,
but when the user provides a `--pattern` argument we need to
start out with a negative match.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-30 09:33:30 +02:00
Stefan Reiter
c9756b40d1
datastore: prevent deletion of snaps in use as "previous backup"
...
To prevent a race with a background GC operation, do not allow deletion
of backups who's index might currently be referenced as the "known chunk
list" for successive backups. Otherwise the GC could delete chunks it
thinks are no longer referenced, while at the same time telling the
client that it doesn't need to upload said chunks because they already
exist.
Additionally, prevent deletion of whole backup groups, if there are
snapshots contained that appear to be currently in-progress. This is
currently unlikely to trigger, as that function is only used for sync
jobs, but it's a useful safeguard either way.
Deleting a single snapshot has a 'force' parameter, which is necessary
to allow deleting incomplete snapshots on an aborted backup. Pruning
also sets force=true to avoid the check, since it calculates which
snapshots to keep on its own.
To avoid code duplication, the is_finished method is factored out.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-07-30 08:26:01 +02:00
Stoiko Ivanov
f2b4b4b9fe
fix 2885: bail on duplicate backup target
...
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2020-07-24 11:08:56 +02:00
Dominik Csapak
01ca99da2d
server/rest: add console to index
...
register the console template and render it when the 'console' parameter
is given
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-07-23 12:06:38 +02:00
Dominik Csapak
2ab5acac5a
server/config: add mechanism to update template
...
instead of exposing handlebars itself, offer a register_template and
a render_template ourselves.
render_template checks if the template file was modified since
the last render and reloads it when necessary
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-07-23 11:55:00 +02:00
Thomas Lamprecht
9688f6de0f
client: log index.json upload only when verbose
...
I mean the user expects that we know what archives, fidx or didx, are
in a backup, so this is internal info and should not be logged by
default
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-23 10:28:38 +02:00
Thomas Lamprecht
5b32820e93
client: don't use debug format for printing BackupRepository
...
It implements the fmt::Display trait after all
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-23 10:28:38 +02:00
Dominik Csapak
ec01eeadc6
refactor CertInfo to tools
...
we want to reuse some of the functionality elsewhere
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-07-10 11:08:53 +02:00
Wolfgang Bumiller
660a34892d
update proxmox crate to 0.2.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-10 11:08:27 +02:00
Dietmar Maurer
d86034afec
src/bin/proxmox_backup_client/catalog.rs: fix keyfile handling
2020-07-10 10:36:45 +02:00
Wolfgang Bumiller
0eaef8eb84
client: show key path when creating/changing default key
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-10 09:58:24 +02:00
Thomas Lamprecht
e39974afbf
client: add simple version command
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-07-10 09:34:07 +02:00
Dietmar Maurer
dde18bbb85
proxmox-backup-client benchmark: improve output format
2020-07-10 09:13:52 +02:00
Dietmar Maurer
4327a8462a
proxmox-backup-client benchamrk: add more speed tests
2020-07-09 17:07:22 +02:00
Dietmar Maurer
323b2f3dd6
proxmox-backup-client benchmark: add --verbose flag
2020-07-09 16:16:39 +02:00
Dietmar Maurer
dfa517ad6c
src/backup/manifest.rs: rename into_string -> to_string
...
And do not consume self.
2020-07-09 11:28:05 +02:00
Dietmar Maurer
b53f637914
src/backup/manifest.rs: cleanup signature generation
2020-07-09 09:20:49 +02:00
Dietmar Maurer
2107a5aebc
src/backup/manifest.rs: include signature inside the manifest
...
This is more flexible, because we can choose what fileds we want to sign.
2020-07-08 16:23:26 +02:00
Dietmar Maurer
3638341aa4
src/backup/file_formats.rs: remove signed chunks
...
We can include signature in the manifest instead (patch will follow).
2020-07-08 16:23:26 +02:00
Wolfgang Bumiller
0351f23ba4
client: introduce --keyfd parameter
...
This is a more convenient way to pass along the key when
creating encrypted backups of unprivileged containers in PVE
where the unprivileged user namespace cannot access
`/etc/pve/priv`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-08 13:56:38 +02:00
Wolfgang Bumiller
05389a0109
more xdg cleanup and encryption parameter improvements
...
Have a single common function to get the BaseDirectories
instance and a wrapper for `find()` and `place()` which
wrap the error with some context.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-08 10:57:28 +02:00
Wolfgang Bumiller
b65390ebc9
client: xdg usage: place() vs find()
...
place() is used when creating a file, as it will create
intermediate directories, only use it when actually placing
a new file.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-08 10:57:28 +02:00
Dietmar Maurer
3bad3e6e52
src/client/backup_writer.rs - upload_stream: add crypt_mode
2020-07-08 10:43:28 +02:00
Wolfgang Bumiller
24be37e3f6
client: fix schema to include --crypt-mode parameter
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-08 10:09:15 +02:00
Wolfgang Bumiller
af3a0ae7b1
remove CryptMode::sign_only special method
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-08 09:19:53 +02:00
Wolfgang Bumiller
f28d9088ed
introduce a CryptMode enum
...
This also replaces the recently introduced --encryption
parameter on the client with a --crypt-mode parameter.
This can be "none", "encrypt" or "sign-only".
Note that this introduces various changes in the API types
which previously did not take the above distinction into
account properly:
Both `BackupContent` and the manifest's `FileInfo`:
lose `encryption: Option<bool>`
gain `crypt_mode: Option<CryptMode>`
Within the backup manifest itself, the "crypt-mode" property
will always be set.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-07 15:24:19 +02:00
Wolfgang Bumiller
96ee857752
client: add --encryption boolen parameter
...
This can be used to explicitly disable encryption even if a
default key file exists in ~/.config.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-06 14:36:04 +02:00
Wolfgang Bumiller
887018bb79
client: use default encryption key if it is available
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-06 14:36:04 +02:00
Wolfgang Bumiller
9696f5193b
client: move key management into separate module
...
and use api macro for methods and Kdf type
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-06 14:36:04 +02:00
Dietmar Maurer
9de69cdb1a
src/bin/proxmox_backup_client/catalog.rs: split out catalog code
2020-07-03 16:45:47 +02:00
Dietmar Maurer
e9764238df
make ReadChunk not require mutable self.
...
That way we can reduce lock contentions because we lock for much shorter
times.
2020-07-03 07:37:29 +02:00
Dietmar Maurer
cc7995ac40
src/bin/proxmox_backup_client/task.rs: split out task command
2020-07-02 18:04:29 +02:00
Dietmar Maurer
43abba4b4f
src/bin/proxmox_backup_client/mount.rs: split out mount code
2020-07-02 17:49:59 +02:00
Dietmar Maurer
caea8d611f
proxmox-backup-client: add benchmark command
...
This is just a start, We need to add more useful things here...
2020-07-02 14:01:57 +02:00
Dietmar Maurer
b957aa81bd
update backup api for incremental backup
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-06-26 07:17:08 +02:00
Dietmar Maurer
355c055e81
src/bin/proxmox-backup-manager.rs: implement verify
2020-06-24 13:35:21 +02:00
Wolfgang Bumiller
a6f8728339
update to pxar 0.1.9, update ReadAt implementations
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-24 11:57:12 +02:00
Dietmar Maurer
d6d3b353be
cleanup: implement FromStr for BackupGroup
2020-06-23 08:16:56 +02:00
Dietmar Maurer
a67f7d0a07
cleanup: implement FromStr for BackupDir
2020-06-23 08:09:52 +02:00
Dietmar Maurer
c8137518fe
src/bin/proxmox_backup_manager/disk.rs: add renderer for wearout
...
So that we display the same value as the GUI.
2020-06-23 07:44:09 +02:00
Dominik Csapak
1c090810f5
api2/admin/datastore/snapshos: show encrypted and size info per file
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-19 07:39:56 +02:00
Dominik Csapak
e181d2f6da
add encrypted info to Manifest
...
we want to save if a file of a backup is encrypted, so that we can
* show that info on the gui
* can later decide if we need to decrypt the backup
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-19 07:35:39 +02:00
Dietmar Maurer
1aef491e24
src/bin/proxmox_backup_manager/disk.rs: add cli to create mounted disks
2020-06-17 08:07:54 +02:00
Wolfgang Bumiller
8ecd7c9c21
move api dump binaries back to src/bin for package building
...
they're required for docs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-16 14:48:01 +02:00
Wolfgang Bumiller
d19c96d507
move test binaries to examples/
...
These aren't installed and are only used for manual testing,
so there's no reason to force them to be built all the time.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-16 13:32:24 +02:00
Dietmar Maurer
929a13b357
src/api2/node/disks/zfs.rs: add zpool api
2020-06-16 13:25:53 +02:00
Dietmar Maurer
ac7513e368
src/tools.rs: add setup_safe_path_env()
2020-06-15 10:38:30 +02:00
Wolfgang Bumiller
3d571d5509
some internal combinator-influenced api cleanup
...
The download methods used to take the destination by value
and return them again, since this was required when using
combinators before we had `async fn`.
But this is just an ugly left-over now.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-12 11:46:42 +02:00
Wolfgang Bumiller
8e6e18b77c
client: make dump_image async, use async chunk reader
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-12 11:40:18 +02:00
Wolfgang Bumiller
4d16badf6f
add an AsyncReadChunk trait
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-12 11:38:21 +02:00
Dominik Csapak
5d85847f91
client: only start catalog upload if we have one
...
else we start a dynamic writer and never close it, leading to a backup error
this fixes an issue with backing up vm templates
(and possibly vms without disks)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-12 10:38:25 +02:00
Dominik Csapak
e693818afc
refactor time functions to tools
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-10 13:31:10 +02:00
Wolfgang Bumiller
5444fa940b
turn pxar::flags into bitflags, pxar::Flags
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-10 11:05:53 +02:00
Wolfgang Bumiller
fc6047fcb1
pxar: don't skip list+found by default
...
This used to be default-off and was accidentally set to
on-by-default with the pxar crate update.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-10 08:53:10 +02:00
Wolfgang Bumiller
239e49f927
pxar: create .pxarexclude-cli file
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-09 13:17:59 +02:00
Dominik Csapak
33070956af
let disk_usage return StorageStatus and use it for datastores/nodes
...
disk_usage returned the same values as defined in StorageStatus,
so simply use that
with that we can replace the logic of the datastore status with that
function and also use it for root disk usage of the nodes
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-09 12:05:39 +02:00
Wolfgang Bumiller
c443f58b09
switch to external pxar and fuse crates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 13:56:58 +02:00
Dietmar Maurer
dfb31de8f0
proxmox_backup_manager disk list: display gpt column
2020-06-08 07:35:44 +02:00
Dietmar Maurer
707974fdb3
src/api2/node/disks.rs: implement initgpt API
2020-06-07 10:30:34 +02:00
Dietmar Maurer
9069debcd8
src/api2/types.rs: define BLOCKDEVICE_NAME_SCHEMA
2020-06-07 07:20:25 +02:00
Dietmar Maurer
8e40aa63c1
src/bin/proxmox-backup-manager.rs: add disk subcommand
2020-06-06 15:40:28 +02:00
Thomas Lamprecht
a720894ff0
rrd: fix off-by-one in save interval calculation
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-04 10:30:47 +02:00
Dietmar Maurer
5c264c8d80
src/tools/disks.rs: add/use get_partition_type_info
2020-06-04 07:48:22 +02:00
Dietmar Maurer
c48aa39f3b
src/bin/proxmox-backup-client.rs: implement quite flag
2020-06-03 10:11:37 +02:00
Thomas Lamprecht
2d32fe2c04
client restore: don't add server file ending if already specified
...
If one executes a client command like
# proxmox-backup-client files <snapshot> --repository ...
the files shown have already the '.fidx' or '.blob' file ending, so
if a user would just copy paste that one the client would always add
.blob, and the server would not find that file.
So avoid adding file endings if it is already a known OK one.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-03 07:03:55 +02:00
Thomas Lamprecht
dc155e9bd7
client restore: factor out archive/type parsing
...
will be extended in a next patch.
Also drop a dead else branch, can never get hit as we always add
.blob as fallback
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-03 07:03:12 +02:00
Thomas Lamprecht
add5861e8d
typo fixes all over the place
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-30 16:39:08 +02:00
Dietmar Maurer
b2387eaa45
avoid compiler warnings
2020-05-30 14:05:33 +02:00
Dietmar Maurer
7cc3473a4e
src/client/backup_specification.rs: split code into extra file
2020-05-30 10:54:38 +02:00
Dominik Csapak
c67b1fa72f
syncjob: change worker type for sync jobs
...
'sync' is used for manually pulling a remote datastore
changing it for a scheduled sync to 'syncjob' so that we can
differentiate between both types of syncs
this also adds a seperate task description for it
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-29 11:28:04 +02:00
Dietmar Maurer
934f5bb8ac
src/bin/proxmox-backup-proxy.rs: cleanup, move code to src/tools/disks.rs
...
And simplify find_mounted_device by using stat.st_dev
2020-05-29 11:13:36 +02:00
Dietmar Maurer
013fa7bbcb
rrd: reduce io by saving data only once a minute
2020-05-29 09:16:13 +02:00
Dietmar Maurer
a8d7033cb2
src/bin/proxmox-backup-proxy.rs: add test if last prune job is still running
2020-05-29 08:06:48 +02:00
Dietmar Maurer
04ad7bc436
src/bin/proxmox-backup-proxy.rs: test if last sync job is still running
2020-05-29 08:06:48 +02:00
Dietmar Maurer
dc58194ebe
src/bin/proxmox-backup-proxy.rs: use correct id to lookup sync jobs
2020-05-29 07:50:59 +02:00
Dietmar Maurer
c94e1f655e
rrd stats: improve io delay stats
2020-05-28 19:12:13 +02:00
Dietmar Maurer
91e5bb49f5
src/bin/proxmox-backup-proxy.rs: simplify code
...
and gather all stats for the root disk
2020-05-28 12:30:54 +02:00
Dietmar Maurer
25c550bc28
src/bin/proxmox-backup-proxy.rs: gather zpool io stats
2020-05-28 10:09:13 +02:00
Dominik Csapak
f5056656b2
use the sync id for the scheduled sync worker task
...
this way, multiple sync jobs with the same local store, can get scheduled
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-28 06:26:03 +02:00
Dominik Csapak
8c87743642
fix 'remove_vanished' cli arg again
...
since the target side wants this to be a boolean and
serde interprets a None Value as 'null' we have to only
add this when it is really set via cli
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-28 06:25:30 +02:00
Dominik Csapak
40dc103103
fix cli pull api call
...
there is no 'delete' parameter, only 'remove-vanished', so fix that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-26 12:39:19 +02:00
Dietmar Maurer
8c03041a2c
src/bin/proxmox-backup-proxy.rs: gather block device stats on datastore
2020-05-26 11:20:59 +02:00
Dietmar Maurer
309ef20d6d
src/bin/proxmox-backup-proxy.rs: simplify code
2020-05-25 16:20:32 +02:00
Dietmar Maurer
d0833a70f7
src/bin/proxmox-backup-proxy.rs: gather datastore usage stats
2020-05-25 16:20:32 +02:00
Dietmar Maurer
2c66a590c0
src/bin/proxmox-backup-proxy.rs: gather iowait stats
2020-05-25 11:54:15 +02:00
Dietmar Maurer
485841da2c
src/bin/proxmox-backup-proxy.rs: gather loadavg stats
2020-05-25 11:40:20 +02:00
Dietmar Maurer
dd15c0aa3b
src/bin/proxmox-backup-proxy.rs: gather root disk stats
2020-05-25 11:10:07 +02:00
Dietmar Maurer
c25c9d8dd1
src/bin/proxmox-backup-proxy.rs: gather swap usage stats
2020-05-25 10:25:58 +02:00
Dietmar Maurer
4f9513996c
src/bin/proxmox-backup-proxy.rs: use block_in_place for rrd update
2020-05-25 08:30:59 +02:00
Dietmar Maurer
8f0cec2642
src/bin/proxmox-backup-proxy.rs: gather netin/netout stats
2020-05-24 19:02:35 +02:00
Dietmar Maurer
4fb05fde17
src/rrd/rrd.rs: restructure whole code
2020-05-24 16:51:28 +02:00
Dietmar Maurer
a4a3f7ca5e
rrd: pack multiple rrd values into th estat list
2020-05-23 14:03:44 +02:00
Dietmar Maurer
eaeda365e0
start gathering stats using new rrd module
2020-05-23 10:43:08 +02:00
Dietmar Maurer
07ad6470ca
src/client/pull.rs: split out pull related code
2020-05-22 08:04:20 +02:00
Dietmar Maurer
a6160cdfeb
src/bin/proxmox-backup-proxy.rs: schedule sync jobs
2020-05-22 07:50:59 +02:00
Dietmar Maurer
a3016d6583
proxmox-backup-manager: add sync-job cli
2020-05-21 11:44:45 +02:00
Dietmar Maurer
b29d046e89
proxmox-backup-manager: split out cert.rs
2020-05-21 11:22:20 +02:00
Dietmar Maurer
380bd7df97
proxmox-backup-manager: split out datastore.rs
2020-05-21 11:14:34 +02:00
Dietmar Maurer
ea6f404e55
proxmox-backup-manager: split out dns.rs
2020-05-21 11:10:58 +02:00
Dietmar Maurer
a35a211d9e
proxmox-backup-manager: split out network.rs
2020-05-21 11:08:38 +02:00
Dietmar Maurer
53e14507c1
proxmox-backup-manager: split out acl.rs
2020-05-21 10:56:46 +02:00
Dietmar Maurer
6fa39e53e0
proxmox-backup-manager: split out users.rs
2020-05-21 10:53:06 +02:00
Dietmar Maurer
a220a4564a
roxmox-backup-manager: start splitting command into several files
2020-05-21 10:46:07 +02:00
Dietmar Maurer
c681885227
src/bin/proxmox-backup-manager.rs: format output of show commands
2020-05-20 16:47:37 +02:00
Dominik Csapak
ce55db66d6
proxmox-backup-manager: add show command for remote and datastore
...
to show the data for a single item
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-20 16:33:07 +02:00
Dietmar Maurer
25829a879b
src/bin/proxmox-backup-proxy.rs: schedule prune jobs
2020-05-20 13:00:53 +02:00
Dietmar Maurer
dd7a7eae8f
src/bin/proxmox-backup-manager.rs: add completion helper for gc-schedule
2020-05-20 09:42:51 +02:00
Dietmar Maurer
8545480a31
src/bin/proxmox-backup-proxy.rs: add simple task scheduler for garbage collection
2020-05-20 08:59:45 +02:00
Dietmar Maurer
e8d1da6a15
depend on proxmox 0.1.31 - use Value to store result metadata
2020-05-18 09:57:35 +02:00
Dietmar Maurer
65dab0266c
proxmox-backup-manager: add completion helper for port list
2020-05-08 17:28:04 +02:00
Dietmar Maurer
525008f7ad
proxmox-backup-manager - network list: render ports/slaves
...
And render interface name as first comumn.
2020-05-08 16:07:23 +02:00
Dietmar Maurer
86a5d56c4e
proxmox-backup-manager: add network create command
2020-05-08 09:55:56 +02:00
Dietmar Maurer
7b22acd0c2
src/config/network.rs: make it compatible with pve
...
and depend on proxmox 0.1.26
2020-05-07 09:28:25 +02:00
Dietmar Maurer
74f7240b8d
src/bin/proxmox-backup-client.rs: add human readable date to prune list
2020-05-05 07:33:58 +02:00
Dietmar Maurer
db1e061dcb
src/bin/proxmox-backup-client.rs: correctly format prune result list.
2020-05-05 06:45:37 +02:00
Dietmar Maurer
b080583ba8
src/bin/proxmox-backup-manager.rs: improve user list output
2020-05-01 16:22:50 +02:00
Dominik Csapak
f9e3b1104e
change index to templates using handlebars
...
using a handlebars instance in ApiConfig, to cache the templates
as long as possible, this is currently ok, as the index template
can only change when the whole package changes
if we split this in the future, we have to trigger a reload of
the daemon on gui package upgrade (so that the template gets reloaded)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-29 17:05:53 +02:00
Dietmar Maurer
bc0d03885c
use proxmox 0.1.25, use new EnumEntry feature
2020-04-29 13:01:24 +02:00
Dietmar Maurer
14627d671a
src/bin/proxmox-backup-manager.rs: add dns sub command
...
Also improved the DNS api, added a --delete option.
2020-04-26 08:23:23 +02:00
Dietmar Maurer
76227a6acd
src/bin/proxmox-backup-manager.rs: fix node parameter handling
2020-04-25 17:20:22 +02:00
Dietmar Maurer
26d9aebc28
move src/api2/config/network.rs to src/api2/node/network.rs
...
So that we have the same api path for network config as pve.
2020-04-25 17:00:38 +02:00
Dietmar Maurer
fd7c0979b4
src/bin/proxmox-backup-manager.rs: implement netwerk revert
2020-04-24 10:45:49 +02:00
Dietmar Maurer
c67bc9c35c
src/bin/proxmox-backup-manager.rs: new command to show pending network changes
2020-04-24 10:27:43 +02:00
Dietmar Maurer
3181f9b625
src/bin/proxmox-backup-manager.rs: only show pending changes with "text" format
2020-04-24 10:16:57 +02:00
Dietmar Maurer
2eefd9aee1
src/config/network.rs: implement network reload, set "changes" attribute
2020-04-24 09:55:46 +02:00
Dietmar Maurer
02269f3dba
src/config/network.rs: introduce NetworkInterfaceType
2020-04-23 08:45:03 +02:00
Dietmar Maurer
4cb6bd894c
src/bin/proxmox-backup-manager.rs: improve network list output format
2020-04-23 06:44:55 +02:00
Dietmar Maurer
b1564af25a
src/bin/proxmox-backup-manager.rs: format datastore list output
2020-04-22 17:37:20 +02:00
Dietmar Maurer
bf004ecd87
src/bin/proxmox-backup-manager.rs: format network list output
2020-04-22 17:14:52 +02:00
Dietmar Maurer
df6bb03d0e
src/api2/config/network.rs: improve network api
2020-04-22 10:54:07 +02:00
Dietmar Maurer
ca0e534796
src/api2/config/network.rs: start network configuration api
2020-04-21 14:28:26 +02:00
Wolfgang Bumiller
f7d4e4b506
switch from failure to anyhow
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-17 18:43:30 +02:00
Dietmar Maurer
9a328319dd
pxar extract: remove pattern from arg_param, add target instead
2020-04-15 06:41:37 +02:00
Dietmar Maurer
7e3d2e5b41
pxar create: remove exclude from arg_param
2020-04-15 06:31:46 +02:00
Dietmar Maurer
9765092ede
acl api: implement update
2020-04-14 10:16:49 +02:00
Dietmar Maurer
ed3e60ae69
start ACL api
2020-04-13 11:09:44 +02:00
Dietmar Maurer
685e13347e
api: move config/user to access/users, implement change_password
...
To make it similar to the pve api
2020-04-09 10:21:24 +02:00
Dietmar Maurer
579728c641
add user configiguration
2020-04-08 14:06:15 +02:00
Dietmar Maurer
18deda403d
src/bin/proxmox-backup-client.rs - list_groups: render full snapshot path for last-backup column
2020-02-28 09:09:22 +01:00
Dietmar Maurer
6882b3716c
src/bin/proxmox-backup-manager.rs: avoid compiler warning
2020-02-28 08:52:12 +01:00
Christian Ebner
189996cf4a
proxmox-backup-client: expose exclude match patterns to cli.
...
Allows to pass exclude match patterns to the 'backup' command.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2020-02-28 07:56:09 +01:00
Dietmar Maurer
ac3faaf5c0
src/bin/proxmox-backup-manager.rs: cleanup output handling
2020-02-28 07:42:36 +01:00
Dietmar Maurer
4939255fb4
src/tools/format.rs: move output rendering code to this new file
2020-02-28 07:30:35 +01:00
Dietmar Maurer
c81b2b7c70
src/bin/proxmox-backup-client.rs - list_groups: use format_and_print_result_full()
...
Depend on proxmox 0.1.16-1
2020-02-27 13:32:11 +01:00
Dietmar Maurer
c2043614f7
src/bin/proxmox-backup-client.rs: use new output formath helpers from proxmox 0.15.1-1
2020-02-27 12:41:15 +01:00
Dietmar Maurer
e23f586344
src/bin/proxmox-backup-client.rs - status: improve alignment
2020-02-27 11:38:09 +01:00
Dietmar Maurer
be2425ff85
src/bin/proxmox-backup-client.rs - status: do not print header
2020-02-27 11:31:05 +01:00
Dietmar Maurer
f24fc1166b
src/bin/proxmox-backup-client.rs - list_snapshots: use format_and_print_result_full()
...
Depend on proxmox v0.1.14.
2020-02-27 11:28:44 +01:00
Dietmar Maurer
ea5f547fdc
src/bin/proxmox-backup-client.rs - list_snapshot_files: use format_and_print_result_full()
2020-02-26 13:49:47 +01:00
Dietmar Maurer
390c5bdde4
src/bin/proxmox-backup-client.rs - status: use format_and_print_result_full
2020-02-26 13:29:00 +01:00
Dietmar Maurer
03ac286c80
src/bin/proxmox-backup-manager.rs: use crate::tools::runtime::block_on()
2020-02-26 11:37:38 +01:00
Dietmar Maurer
e02c3d461f
src/client/backup_writer.rs: implement verbose options
2020-02-24 12:48:40 +01:00
Dietmar Maurer
d1c657276a
src/client/http_client.rs: remove useless password_env
2020-02-11 11:42:03 +01:00
Dietmar Maurer
a05c0c6ff6
src/bin/proxmox-backup-client.rs: allows to pass fingerprint via env vars
2020-02-11 11:42:03 +01:00
Thomas Lamprecht
b69b8af26b
s/pbsbanner/proxmox-backup-banner/ + move to /usr/lib
...
We want to avoid pbs if possible and also avoid placing internal
binaries, not intended for human direct use, in /bin or /sbin paths.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-10 14:43:28 +01:00
Thomas Lamprecht
e2b5e75a3e
pbsbanner: use match and also return error
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-07 18:30:55 +01:00
Thomas Lamprecht
274b0c7bb7
add login banner service
...
Modeled after the one from PVE, but using rust instead of perl for
resolving the nodename and writing to /etc/issue
Behavior differs a bit. We write all non-loopback addresses to this
file, as the gui accepts connections from them all, so limiting it to
the first one is not really sensible.
Further an error to resolve, or only getting loopback addresses won't
write out an empty /etc/issue file, but a note about the error at the
place where the address would be displayed.
Named it "pbsbanner", not "proxmox-backup-banner" as it's rather an
internal tool anyway and mirrors pvebanner, pmgbanner
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-06 22:19:22 +01:00
Dietmar Maurer
032d3ad80f
src/bin/proxmox-backup-client.rs: do not use api macro for prune
...
So that we can use add_common_prune_prameters!() macro again.
2020-01-31 10:31:36 +01:00
Dietmar Maurer
501f4fa220
depend on proxmox 0.1.13, use new tty helpers from there
2020-01-31 08:16:00 +01:00
Christian Ebner
74616f63b0
proxmox-backup-client: add missing prune options to api definition.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2020-01-31 07:01:56 +01:00
Dietmar Maurer
93fbb4ef0a
update proxmox dependency to 0.1.12
2020-01-31 06:59:17 +01:00
Dietmar Maurer
43592f290d
src/bin/proxmox-backup-manager.rs: remove stale debug comment
2020-01-30 17:59:13 +01:00
Dietmar Maurer
9e165b5cad
src/bin/proxmox-backup-manager.rs - list remotes: do not use client, call directly
2020-01-30 17:57:37 +01:00
Dietmar Maurer
9894469e89
src/bin/proxmox-backup-manager.rs: use new texdt table formatter
2020-01-30 13:31:20 +01:00
Dietmar Maurer
d08bc483db
use proxmox 0.1.9 with new cli command helpers
2020-01-27 18:08:43 +01:00
Dietmar Maurer
99d863d770
src/client/http_client.rs: new password_env option
2020-01-27 10:42:37 +01:00
Dietmar Maurer
5030b7cea4
src/client/http_client.rs: new prefix options
2020-01-27 10:20:55 +01:00
Dietmar Maurer
5a74756c15
src/client/http_client.rs: implement fingerprint cache
2020-01-25 15:37:34 +01:00
Dietmar Maurer
d59dbeca1b
src/client/http_client.rs: new struct HttpClientOptions
2020-01-25 12:18:00 +01:00
Dietmar Maurer
6afbe1d846
src/config/remote.rs: add fingerprint
2020-01-25 09:49:45 +01:00
Christian Ebner
90c815bfe2
src/bin/proxmox-backup-client.rs: fix another typo in property description
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-24 13:46:08 +01:00
Christian Ebner
5eee6d89b6
src/bin/proxmox-backup-client.rs: fix typo in property description
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-24 13:45:22 +01:00
Dietmar Maurer
1dc117bbba
src/api2/types.rs: define and use struct StorageStatus
2020-01-23 12:51:30 +01:00
Dietmar Maurer
f1d99e3f6a
src/bin/proxmox-backup-client.rs: use a std channel to write the catalog
2020-01-22 12:49:08 +01:00
Wolfgang Bumiller
9ea4bce444
bump proxmox crate to 0.1.7
...
The -sys, -tools and -api crate have now been merged into
the proxmx crate directly. Only macro crates are separate
(but still reexported by the proxmox crate in their
designated locations).
When we need to depend on "parts" of the crate later on
we'll just have to use features.
The reason is mostly that these modules had
inter-dependencies which really make them not independent
enough to be their own crates.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-21 13:48:37 +01:00
Dietmar Maurer
3f06d6fbbd
use proxmox_backup::tools::runtime::main to run async run_cli_command
2020-01-21 11:34:45 +01:00
Wolfgang Bumiller
d973aa827c
introduce new runtime tokio helpers
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-20 13:12:40 +01:00
Dietmar Maurer
4b4eba0b9e
src/api2/pull.rs: implement delete flag for vanished groups
2020-01-17 11:24:55 +01:00
Dietmar Maurer
f357390c15
renamed: src/config/remotes.rs -> src/config/remote.rs
...
And use 'remote' instead of 'remotes' everywhere.
2020-01-16 14:32:06 +01:00
Dietmar Maurer
94609e2380
src/api2/pull.rs: use reference to remote configuration
2020-01-16 13:55:19 +01:00
Dietmar Maurer
3be839c61c
src/bin/proxmox-backup-manager.rs: add completion function for update commands
2020-01-15 12:42:13 +01:00
Oguz Bektas
cbe01dc5c7
tools: add read_and_verify_password helper
...
add a helper to perform some basic checks on password prompts.
- verification (asks for a 2nd time)
- check length
also use the new helper where password input in tty is taken to reduce
duplicate code.
this helper should be used when creating keys, changing passphrases etc.
note: this helper can be extended later on to provide better checks for
password strength.
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2020-01-15 10:52:57 +01:00
Dietmar Maurer
ddc526623f
src/bin/proxmox-backup-manager.rs: add datastore update cli
2020-01-14 14:47:26 +01:00
Dietmar Maurer
08195ac823
src/api2/config/remotes.rs: improve api, implement update and read
2020-01-14 14:20:16 +01:00
Dietmar Maurer
d0187a51a9
src/section_config.rs - convert_to_array: optionally add digest
...
datastore::config() -> also return digest
remotes::config() -> also return digest
2020-01-14 12:57:03 +01:00
Dietmar Maurer
167971ed49
src/api2/types.rs: define REMOTE_ID_SCHEMA here
2020-01-13 11:47:07 +01:00
Oguz Bektas
6d20a29d73
fix typo for function name load_and_decrypt_key
...
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2020-01-13 11:14:47 +01:00
Dietmar Maurer
688fbe07a1
cleanup config api, add remotes config cli interface
2020-01-11 10:42:09 +01:00
Christian Ebner
6fc053ed85
pxar: encoder: limit number of max entries held at once in memory during archive creation.
...
Limit the total number of entries and therefore the approximate memory
consumption instead of doing this on a per directory basis as it was previously.
This makes more sense as it limits not only the width but also the depth of the
directory tree.
Further, instead of hardcoding this value, allow to pass this information as
additional optional parameter 'entires-max'.
By this, creation of the archive with directories containing a large number of
entries is possible.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2020-01-10 13:45:08 +01:00
Dietmar Maurer
331b869d96
src/bin/proxmox-backup-manager.rs: implement shell completion for remote datastore name
2020-01-10 11:58:31 +01:00
Dietmar Maurer
eb506c830c
rename src/api2/sync.rs -> src/api2/pull.rs
...
Use "pull" instead of "sync", because this also indicates a
direction (like "sync from").
2020-01-10 11:15:16 +01:00
Dietmar Maurer
a81af92f9d
src/section_config.rs: implement generic lookup
2020-01-09 17:35:44 +01:00
Dietmar Maurer
0eb0e02451
src/bin/proxmox-backup-manager.rs: implement cli sync command
2020-01-09 14:52:29 +01:00
Dietmar Maurer
27c9affb23
src/bin/proxmox-backup-client.rs: cleanup - factor out api_datastore_latest_snapshot()
2020-01-07 15:18:36 +01:00
Dietmar Maurer
42af4b8f06
src/bin/proxmox-backup-client.rs: cleanup - factor out api_datastore_list_snapshots()
2020-01-07 15:07:57 +01:00
Dietmar Maurer
af9d4afc66
src/bin/proxmox-backup-client.rs: use SnapshotListItem
2020-01-07 13:25:25 +01:00
Dietmar Maurer
1e8da0a789
src/backup/manifest.rs: new helper archive_type()
2019-12-31 15:23:41 +01:00
Dietmar Maurer
94f085fab5
src/bin/proxmox-backup-proxy.rs: remove unused use clause
2019-12-30 11:50:24 +01:00
Dietmar Maurer
22be470d90
src/bin/proxmox-backup-api.rs: create cert here
2019-12-27 13:44:21 +01:00
Wolfgang Bumiller
a546a8a072
proxy/api: await running workers before shutdown
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-27 12:50:33 +01:00
Dietmar Maurer
f8fd5095d8
src/bin/proxmox-backup-proxy.rs: create self signed cert at startup.
2019-12-27 11:21:32 +01:00
Dietmar Maurer
afddffc7ec
proxmox-backup-manager.rs: remove wrong fixme
2019-12-27 10:17:06 +01:00
Dietmar Maurer
e739a8d8b4
src/bin/proxmox-backup-manager.rs: impl. cert info
2019-12-23 13:06:43 +01:00
Dietmar Maurer
550e0d8870
src/bin/proxmox-backup-manager.rs: add cli to generate proxy certificate
...
Without calling external openssl binary.
2019-12-22 17:35:06 +01:00
Dietmar Maurer
47d4712152
src/bin/proxmox-backup-manager.rs: add task management cli
2019-12-19 11:27:36 +01:00
Dietmar Maurer
d6c4a1198a
src/bin/proxmox-backup-client.rs: use async fn
2019-12-19 11:20:59 +01:00
Dietmar Maurer
769f8c9998
src/bin/proxmox-backup-manager.rs: connect to daemon to execute GC
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2019-12-19 08:45:27 +01:00
Dietmar Maurer
94913f35ca
src/bin/proxmox-backup-client.rs - start_garbage_collection: add missing output-format parameter
2019-12-19 07:57:53 +01:00
Wolfgang Bumiller
feaa1ad35f
replace file_set_contents with replace_file
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-18 11:16:04 +01:00
Thomas Lamprecht
9c01e73c2f
ui: add "Documentation" button to main view
...
Similar to PVE and PMG, for quick access when one has the basic
webinterface open anyway. Should move to the "proxmoxHelpButton" once
we have an onlineHelp mapping to the docs.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 11:22:34 +01:00
Thomas Lamprecht
2d694f8f1f
add CSS file for PBS ExtJS6 basic ui
...
some fitting rules copied over from PVE's ext6-pve.css file.
simply place it in the css subfolder where the proxmox-backup-gui.js
file is hosted and add a "css/" alias for that directory, the
formatter gets use the right content type with that.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 11:20:32 +01:00
Thomas Lamprecht
4e8cff1c9d
cipherbench: align/format output nicely
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 08:49:34 +01:00
Thomas Lamprecht
4832f53ab5
cipherbench: be conform with rfc7539, use 12 byte nonce
...
else we get an error from this call, using a 16 byte (128 bit) nonce
is currently only supported by the still in draft
XChaCha20-Poly1305, not the current default specified by RFC 7539[0],
which uses a 12 byte (96 bit) nonce.
Fixes the following error:
> thread 'main' panicked at 'called `Result::unwrap()` on an `Err`
> value: ErrorStack([])', src/libcore/result.rs:1165:5
[0]: https://tools.ietf.org/html/rfc7539
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-17 08:49:07 +01:00
Dietmar Maurer
a47a02ae62
src/bin/proxmox-backup-client.rs: use #[api] macro
2019-12-16 13:49:18 +01:00
Wolfgang Bumiller
78d5436040
client: use api macro for catalog_shell async fn
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-16 11:24:44 +01:00
Dietmar Maurer
87c423751a
src/bin/proxmox-backup-client.rs: use ApiHandler::Async for prune and status
2019-12-16 11:00:43 +01:00
Dietmar Maurer
8a8a470316
src/bin/proxmox-backup-client.rs: use new ApiHandler::Async
2019-12-16 10:06:26 +01:00
Wolfgang Bumiller
db0cb9ce0b
update a chunk of stuff to the hyper release
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-13 11:24:41 +01:00
Dietmar Maurer
3f1020b732
src/bin/proxmox-backup-client.rs: implement task stop
2019-12-13 09:43:08 +01:00
Dietmar Maurer
567d3e00fb
src/api2/node/tasks.rs: new filter "store" to filter tasks for one store
2019-12-11 12:53:34 +01:00
Dietmar Maurer
6d04612955
src/api2/node/tasks.rs: add "running" filter to list only running tasks
2019-12-11 10:52:27 +01:00
Dietmar Maurer
5830c20560
src/bin/proxmox-backup-client.rs: add simple task management cli
2019-12-10 13:43:53 +01:00
Dietmar Maurer
d105176f45
src/bin/proxmox-backup-client.rs: cleanup - factor out view_task_result()
2019-12-09 18:00:22 +01:00
Dietmar Maurer
48ef3c3327
cli: avoid useless .into()
...
This needs latest proxmox-api updates.
2019-12-09 17:40:34 +01:00
Dietmar Maurer
eb7e2ee00b
src/bin/proxmox-backup-client.rs: remove unnecessary .to_owned()
2019-12-09 17:11:48 +01:00
Dietmar Maurer
e5f7def40e
src/bin/proxmox-backup-client.rs - garbage-collection: display task log
2019-12-09 13:29:23 +01:00
Dietmar Maurer
0ec9e1b010
src/bin/proxmox-backup-client.rs: impl. and use complete_pxar_archive_name
2019-12-09 13:14:32 +01:00
Dietmar Maurer
1c6ad6ef90
src/bin/proxmox-backup-client.rs: impl. catalog sub command
...
catalog dump
catalog shell
2019-12-09 13:07:25 +01:00
Dietmar Maurer
5a0b484bdd
src/client/task_log.rs: move display_task_log into extra file
2019-12-08 11:27:15 +01:00
Dietmar Maurer
3b03abfe14
src/api2/admin/datastore.rs: remove test_prune, add dry-run to normal prune
...
And use display_task_log on the client side.
2019-12-08 10:59:47 +01:00
Dietmar Maurer
ec137a99c6
src/bin/proxmox-backup-client.r - display_task_log: use string range instead of as_bytes
2019-12-08 10:25:26 +01:00
Dietmar Maurer
b73ff941f6
src/bin/proxmox-backup-client.r - display_task_log: add new strip_date parameter
2019-12-08 10:22:02 +01:00
Dietmar Maurer
163e9bbe91
src/bin/proxmox-backup-client.rs: new display task log helper
...
New helper to display worker task logs. Use it for prune (experimental).
2019-12-07 16:11:26 +01:00
Dietmar Maurer
7074a0b339
src/bin/proxmox-backup-client.rs: white space cleanup
2019-12-06 13:35:59 +01:00
Dietmar Maurer
74fa81b89c
src/bin/proxmox-backup-client.rs: implement prune --dry-run
2019-12-06 13:35:25 +01:00
Dietmar Maurer
d75fbb0a21
src/bin/dump-catalog-shell-cli.rs: generate catalog shell docs
2019-12-06 09:54:13 +01:00
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