Fabian Grünbichler
3e276f6fb6
api: add GroupFilter(List) type
...
at the API level, this is a simple (wrapped) Vec of Strings with a
verifier function. all users should use the provided helper to get the
actual GroupFilter enum values, which can't be directly used in the API
schema because of restrictions of the api macro.
validation of the schema + parsing into the proper type uses the same fn
intentionally to avoid running out of sync, even if it means compiling
the REs twice.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-18 10:36:57 +01:00
Fabian Grünbichler
2b00c5abca
api-types: add schema for backup group
...
the regex was already there, and we need a simple type/schema for
passing in multiple groups as Vec/Array via the API.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-18 10:36:57 +01:00
Dietmar Maurer
15cc41b6cb
proxmox-systemd: remove crate, use new proxmox-time 1.1.0 instead
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-17 13:07:51 +01:00
Wolfgang Bumiller
729bd1fd16
remove now unused serde_filter module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 09:50:08 +01:00
Wolfgang Bumiller
9a7431e2e0
www: use TFA widgets from widget toolkit
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 09:44:55 +01:00
Wolfgang Bumiller
52fbc86fc9
bump d/control rust dependencies
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 09:44:48 +01:00
Wolfgang Bumiller
afe6c79ce3
bump proxmox-widget-toolkit dependency to 3.4-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 09:43:26 +01:00
Wolfgang Bumiller
9407810fe1
switch tfa api to use proxmox-tfa::api
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-17 09:33:04 +01:00
Dietmar Maurer
c42a54795d
move fingerprint helpers from pbs-tools to pbs-api-types
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-17 07:07:40 +01:00
Dietmar Maurer
96ec3801a9
docs: add traffic control section
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-15 13:43:11 +01:00
Dietmar Maurer
c4707d0c1d
depend on proxmox-shared-memory 0.1.1
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-15 11:35:52 +01:00
Dietmar Maurer
24f9af9e0f
add missing file from previous commit
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-14 18:49:29 +01:00
Dietmar Maurer
a0172d766b
traffic-controls: add API/CLI to show current traffic
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-14 17:21:45 +01:00
Dietmar Maurer
09f999337a
update to proxmox-http 0.5.4
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-14 08:27:45 +01:00
Dietmar Maurer
e3eb062c09
cached_traffic_control: fix regression tests
...
Avoid using shared memory in tests because of permission problems.
2021-11-14 08:05:40 +01:00
Dietmar Maurer
de21d4efdc
implement rate limiter in shared memory
...
This kind of rate limiter can be used among several processes (as long
as all set the same rate/burst).
2021-11-13 17:49:38 +01:00
Dietmar Maurer
d5f58006d3
cached_traffic_control: use ShareableRateLimit trait object
2021-11-13 17:49:38 +01:00
Dietmar Maurer
cb80ffc1de
pbs-config: use new SharedMemory helpers from proxmox-shared-memory crate
...
depend on proxmox-shared-memory crate.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-13 17:49:38 +01:00
Thomas Lamprecht
1859a0eb8b
rest: make successful-ticket auth log a debug one to avoid syslog
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-12 11:10:12 +01:00
Dietmar Maurer
9e7132c0b3
bump version to 2.0.14-1
2021-11-12 08:12:18 +01:00
Dietmar Maurer
bf013be1c4
create /var/lib/proxmox-bnackup at server startup
...
This was missing in previous patch...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-12 08:12:18 +01:00
Dietmar Maurer
b935209584
fix directory permission problems
...
By carefully setting options on all create_path() calls,
and by creating "/var/lib/proxmox-backup" at api server startup.
2021-11-12 07:29:18 +01:00
Dietmar Maurer
efd4ddc17b
debian/control: depend on librust-cidr-dev
2021-11-10 12:23:16 +01:00
Dietmar Maurer
e511e0e553
proxmox-backup-proxy: implement traffic control
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
610150a4b4
implement a traffic control cache for fast rate control limiter lockups
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
485b2438ac
traffic_control: use Memcom to track. config versions
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
bfd12e871f
Add traffic control configuration config with API
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
0c136bfab1
DailyDuration: implement time_match()
2021-11-10 10:15:40 +01:00
Dietmar Maurer
245e2aea23
New DailyDuration type with nom parser
...
We will use this to specify timesframes for network rate limits (only
apply limite when inside the time frame).
Note: This is not systemd related, but we can reuse some of the parser
method.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
b9d588ffde
implement Servive for RateLimitedStream
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
e4bc3e0e8d
proxmox-backup-client: add rate/burst parameter to backup CLI
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
2419dc0de9
pbs-client: add option to use the new RateLimiter
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:32 +01:00
Dietmar Maurer
68fd9ca6d6
openid_login: vertify that firstname, lastname and email fits our schema definitions
...
If not, we do not copy the values to our user.cfg.
2021-11-10 06:48:40 +01:00
Dietmar Maurer
4beb7d2dbe
correctly lock remote config
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-06 17:35:10 +01:00
Dylan Whyte
2bc1250c28
docs: language fixup: faq and appendix
...
minor formatting and language fixes to the faq section and the appendix
Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2021-11-02 07:12:07 +01:00
Dominik Csapak
9b1e2ae83c
api: admin/datastore: reuse 'is_protected' implementation
...
we already have that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 12:54:54 +02:00
Dominik Csapak
9b5ecbe2ff
backup-client: use () instead of Value as return type
...
shorter and we do a conversion anyway
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 12:54:54 +02:00
Dominik Csapak
342ed4aea0
PruneMark: implement display without the write! macro
...
by using write_str instead
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 12:54:54 +02:00
Dominik Csapak
d4e9d5470e
PruneMark: use copied values instead of references
...
the type is small enough
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 12:54:54 +02:00
Dominik Csapak
5c1cabdea1
rrd: use saturating_sub to avoid underflow
...
Without this, the tests fail in debug mode.
Also having start (u64) underflow to a value greater than end does
not really make sense
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 12:54:54 +02:00
Dominik Csapak
38517ca053
docs: add info about protection flag to client docs
...
and mention that sync/pull does not sync the protected flag
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:32 +02:00
Dominik Csapak
e33758d1b8
fix #3602 : ui: datastore/Content: add action to set protection status
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:28 +02:00
Dominik Csapak
aba6189c4f
ui: add protected icon to snapshots
...
if they are protected
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:23 +02:00
Dominik Csapak
adcc21716b
ui: PruneInputPanel: add keepReason 'protected' for protected backups
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:21 +02:00
Dominik Csapak
87e17fb4d1
proxmox-backup-client: add 'protected' commands
...
includes 'update' and 'show' similar to the notes commands
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:16 +02:00
Dominik Csapak
8292d3d20e
api2/admin/datastore: add get/set_protection
...
for gettin/setting the protected flag for snapshots (akin to notes)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:11 +02:00
Dominik Csapak
5cc7d89139
api2: datastore/delete_group: throw error for partially removed group
...
when a group could not be completely removed due to protected snapshot,
throw an error
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:07 +02:00
Dominik Csapak
343392613d
pull_store/group: dont try remove locally protected snapshots
...
and log if a vanished groups could not be completely deleted if it
contains protected snapshots
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:04 +02:00
Dominik Csapak
de91418b79
backup/datastore: prevent protected snapshots to be removed
...
by throwing an error for remove_backup_dir, and skipping for
remove_backup_group
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:00 +02:00
Dominik Csapak
fe9c47ab4f
tests/prune: add tests for protecteded backups
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:30:56 +02:00