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
Dominik Csapak
02db72678f
add protected info of snapshots to api and task logs
...
adds the info that a snapshot is protected to:
* snapshot list
* manual pruning (also dry-run)
* prune jobs
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:30:51 +02:00
Dominik Csapak
db4b469285
pbs-datastore: skip protected backups in pruning
...
as a separate keep reason so it will not be calculated for the other reasons
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:30:47 +02:00
Dominik Csapak
92c5cf42d1
pbs-datastore: add protection info to BackupInfo
...
and add necessary helper functions (protected_file/is_protected)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:30:44 +02:00
Dominik Csapak
e9558f290a
ui: datastore content: improve sorting verification column
...
sort failed < no verify < outdated < all ok
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-27 16:29:59 +02:00
Dominik Csapak
572e6594d2
fix typo s/CGM/GCM/i
...
only user visible change is in the error message
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-27 16:28:02 +02:00
Wolfgang Bumiller
88691284d8
bump d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-22 14:30:00 +02:00
Wolfgang Bumiller
85c622807e
Cargo.toml: set udev dependency to 0.4
...
we don't need to bother with 0.3 anymore
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-22 14:28:33 +02:00
Dominik Csapak
9d42e0475b
acme: interpret no TOS as accepted
...
some custom ACME endpoints do not have TOS, interpret this as
'the user has accepted the TOS', like we do for PVE.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-22 10:55:14 +02:00
Wolfgang Bumiller
181a335bfa
bump proxmox-acme-rs dependency to 0.3
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-22 10:54:43 +02:00
Wolfgang Bumiller
0a33951e9e
acme: new_account: prevent replacing existing accounts
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-22 08:35:24 +02:00
Dietmar Maurer
7a356a748a
bump version to 2.0.13-1
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 08:36:41 +02:00
Dietmar Maurer
1c402740a2
update dedian/control
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:59:45 +02:00
Dietmar Maurer
e0a19d3313
use new fsync parameter to replace_file and atomic_open_or_create
...
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:28:32 +02:00
Dominik Csapak
6b8329ee34
tape: simplify export_media_set for pool writer
...
our export code can handle if the tape is inside the drive, so unloading
it first does not have an benefit, it even makes the exporting slower,
since we first unload it into its original slot, and then moving it
to an import/export slot
so drop the code that unloads the tape from the drive, and let the
export code itself handle that
change the 'eject' into a 'rewind' and comment why we do that first
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-21 06:37:48 +02:00