Commit Graph

8509 Commits

Author SHA1 Message Date
Lukas Wagner
c18ad8de2e docs: notification: improve wording for legacy-sendmail mode
Suggested-by: Michael Köppl <m.koeppl@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250725080236.32318-1-l.wagner@proxmox.com
2025-07-25 17:28:56 +02:00
Thomas Lamprecht
9aca936503 require newer rest-server, auth-api and s3-client
To ensure fixes for HttpOnly cookies and overly strict S3 region regex
are available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-25 17:27:58 +02:00
Shannon Sterz
8f4e455550 api/proxy: set auth cookie name in rest server api config
set the name of the auth cookie when configuring apis to allow the
rest server to remove invalid tickets on 401 requests.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Link: https://lore.proxmox.com/20250725112357.247866-5-s.sterz@proxmox.com
2025-07-25 17:25:55 +02:00
Dominik Csapak
ac5bcc36a1 tape: increase timeout for moving medium in changer to 45 minutes
Increase the time out from the current 5 minutes to 45 minutes.
According to documentation from vendors (e.g., for HP see [0]) moving
a medium between slots or to/from a drive can take up a much longer
time than 5 minutes. (up to 38 minutes in a HP library) so increase
the timeout we use here to something that exceeds these
recommendations.

[0]: https://support.hpe.com/hpesc/public/docDisplay?docId=sd00001714en_us&page=GUID-D7147C7F-2016-0901-065E-00000000072C.html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Link: https://lore.proxmox.com/20250725113657.3815270-1-d.csapak@proxmox.com
 [TL: commit message fix-ups]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-25 15:57:11 +02:00
Thomas Lamprecht
b1fa35ddf4 bump version to 4.0.6-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 15:31:24 +02:00
Thomas Lamprecht
6ca2162074 d/postinst: fix setting up pbs-test repo for beta
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 15:30:52 +02:00
Thomas Lamprecht
8acb09630f ui: main view: fix background for beta label in light-mode
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 14:21:01 +02:00
Thomas Lamprecht
6dbe44cfd6 bump version to 4.0.6-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 13:57:03 +02:00
Thomas Lamprecht
8174ef5a4b docs/ui: add anchors for S3 sections and use in onlineHelp
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 13:57:03 +02:00
Thomas Lamprecht
f7457dbd1f ui index: add fallback ngettext implementation
In preparation of actual ngettext support for the ExtJS based UIs we
need a no-op method for the native language (english).

It might get improved but for now it's just important to make it
available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 13:57:03 +02:00
Christian Ebner
db1a99d75e api: admin s3: switch request method to put for s3 check
The s3 check does perform more than just listing contents,
so it makes more sense to define this using the PUT method
instead, following common REST API practice.

This further allows to implement a list-bucket method with
a better fitting GET method.

Note: This is a breaking api change, however currently only
internal call side is the `proxmox-backup-manager s3 check`
and no official release based on the current state.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250724062501.68384-1-c.ebner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 13:57:03 +02:00
Christian Ebner
795b3f8ee1 client: benchmark: fix no-cache flag backwards comaptibility
The proxmox-backup-client benchmark command did unconditionally set
the no-cache flag to true. This is however not backwards compatible,
so expose it as additional cli flag instead, so the user can enable
it when benchmarking S3 backend, but default to false.

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250724090039.443454-2-c.ebner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 11:25:59 +02:00
Christian Ebner
665e729617 client: benchmark: fix indentation issues in api schema
This was noticed while extending the current schema.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250724090039.443454-1-c.ebner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 11:25:57 +02:00
Christian Ebner
4e1676a432 api: datastore: fix cache store creation when reusing s3 backend
Commit 3cc3c10d ("datastore: mark store as in-use by setting marker
on s3 backend") introduced the marker object on datastores used by
another instance. The check was however flawed as it made the local
chunk store creation dependent on the s3 client instantiation.

Therefore, instead factor out the DatastoreBackendType determination,
use that for the check and never assume the local cache store to
be pre-existing.

Also, since contents from the s3 store are refreshed anyway, local
contents in the cache store will be removed, except chunks which
are now cleaned up on create.

Fixes: 3cc3c10d ("datastore: mark store as in-use by setting marker on s3 backend")
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250724080233.282783-1-c.ebner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 11:25:57 +02:00
Thomas Lamprecht
fa9ccbe549 d/postinst: fix-up file name for beta sources file
Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 11:21:36 +02:00
Thomas Lamprecht
a207cb37bd d/postinst: add pbs-test repo on fresh installation during the beta
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 00:51:00 +02:00
Thomas Lamprecht
f6c1bb8e6c d/postinst: drop migration steps from PBS 2.x times
There is no direct upgrade path from PBS 2 to 4 possible, so we can
safely drop them now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 00:50:21 +02:00
Thomas Lamprecht
08d469eebc ui: add beta text with link to bugtracker
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-24 00:45:42 +02:00
Thomas Lamprecht
7616c0a2ed bump version to 4.0.5-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-23 21:53:53 +02:00
Thomas Lamprecht
d2011ce6b6 avoid leaking internal s3client struct name to the outside, favor s3-endpoint
Mostly affects docs and some JS UI components, but also changes the
section type name of the s3 client endpoints.

While the s3 client crate is aptly named, the config actually
describing how to access an S3 object storage is not really a client,
but a definition of an endpoint/remote/repo/address.

This is really no problem per se, but such internal names tend to leak
and can cause (a tiny bit!) confusion for users if they see with e.g.
"S3 Endpoints" in the UI but the same thing now uses "s3client" in the
config file.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-23 21:29:02 +02:00
Dominik Csapak
d8634d30f4 tape: forbid operations on a s3 datastore
namely:
* backup to tape from s3 (including a configuring such a job)
* restore to s3 from tape

It does not work currently, but it probably does not make sense to allow
that at all for several reasons:
* both are designed to be 'off-site', so copying data from one off-site
  location to another directly does not make sense most of the time
* (modern) tape operations can reach relatively high speeds (> 300MB/s)
  and up/downloading to an (most likely remote) s3 storage will slow
  down the tape

Note that we could make the check in the restore case more efficient
(since we already have the parsed DataStore struct), but this to be done
only once for each tape restore operation and most of the time there
aren't that many datastores involved, so the extra runtime cost is
probably not that bad vs having multiple code paths for the error.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Link: https://lore.proxmox.com/20250723143152.3829064-1-d.csapak@proxmox.com
2025-07-23 20:34:57 +02:00
Shannon Sterz
d20296194d client: adapt pbs client to also handle HttpOnly flows correctly
if we decide to make the HttpOnly flow opt-out or remove the previous
authentication flow entirely, prepare the client to properly
authenticate against such servers as well

this does not opt the client into the new flow, as that has no real
security benefits. however, doing so would require additional network
traffic and/or state handling on the client to maintain backward
compatability. this would be rather convoluted. hence, avoid doing so
for now.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Link: https://lore.proxmox.com/20250723151356.264229-11-s.sterz@proxmox.com
2025-07-23 20:21:09 +02:00
Shannon Sterz
dd490f30d1 ui: opt into the new HttpOnly ticket authentication flow
this should add additional protections for cookie stealing and xss
attacks. it also makes it harder to overwrite the cookie from
malicious subdomains.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Link: https://lore.proxmox.com/20250723151356.264229-9-s.sterz@proxmox.com
2025-07-23 20:21:06 +02:00
Shannon Sterz
864edfb777 api: access: add opt-in HttpOnly ticket authentication flow
this new flow returns HttpOnly cookies providing an additional layer
of security for clients operating in a browser environment. opt-in
only to not break existing clients.

most of the new protections were implement by a previous series that
adapted proxmox-auth-api and related crates [1]. this just enables
client's of the api to opt-into these protections.

[1]:
https://lore.proxmox.com/pdm-devel/20250304144247.231089-1-s.sterz@proxmox.com/T/#u

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Link: https://lore.proxmox.com/20250723151356.264229-7-s.sterz@proxmox.com
2025-07-23 20:20:46 +02:00
Lukas Wagner
948dd68daf docs: notifications: adapt to latest notification system UI changes
The latest updates to the backup-job UI completely drop the term
"Notification System" from the UI, instead we now use "Global
notification settings", which should be hopefully a bit clearer to users
with regards to what this actually means.

Some of the touched sections were slightly rephrased to improve clarity.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Michael Köppl <m.koeppl@proxmox.com>
Link: https://lore.proxmox.com/20250723112220.278700-1-l.wagner@proxmox.com
2025-07-23 15:49:17 +02:00
Christian Ebner
c763a0e9df client: backup writer: make no-cache parameter backwards compatible
Commit 90723828 ("api: backup: add no-cache flag to bypass local
datastore cache") introduced the additional flag to request bypassing
of the datastore cache by the Proxmox Backup Server.

The flag is however included in the backup api request parameters,
which is incompatible with older version of the server.

Fix this by only setting the flag if requested explicitley on
invocation, as it is then not included for requests to older servers
and for newer the default is to set this to false if not present
anyways.

Fixes: 90723828 ("api: backup: add no-cache flag to bypass local datastore cache")
Reported-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250723115015.711300-1-c.ebner@proxmox.com
2025-07-23 13:57:40 +02:00
Thomas Lamprecht
81b0ee0b68 d/postinst: drop outdated comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-23 13:56:02 +02:00
Thomas Lamprecht
ce37fcb74b d/postinst: drop useless no-op true command invocations
They do nothing as standalone command, would only ever make sense
in combination as `command-that-can fail || true`, but for these
situations it's almost always better to output an error message as
`command-that-can fail || echo "..."` instead, which we already do.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-23 13:56:02 +02:00
Christian Ebner
cda8987040 docs: s3: add object store provider specific configuration examples
To reduce friction, provide several provider specific example
configurations as reference.

With vhost style vs. path style bucket addressing, templating and all
the other provider specific configuration options, it can be rather
confusing on how to actually configure an S3 endpoint to be used as
PBS datastore backend. So having some concrete examples to lookup or
point to can help.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250723080231.189207-3-c.ebner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-23 13:55:57 +02:00
Christian Ebner
71f806aa39 docs: s3: add warning of potential costs when using s3 backends
S3 object store providers typically charge not only for storage
usage, but also for API requests. Explicitley warn the user about
this in the docs.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Link: https://lore.proxmox.com/20250723080231.189207-2-c.ebner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-23 13:55:52 +02:00
Thomas Lamprecht
36152566f0 bump version to 4.0.4-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 22:26:17 +02:00
Thomas Lamprecht
a5dc26adbc docs: move hint about tech-previe from heading to admonition
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 22:01:19 +02:00
Thomas Lamprecht
ad28d9ed75 ui: s3 datastore: use tech preview wording
As this is far from being experimental, but relaying that it's rather
new and might have some rough edges won't hurt.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:58:45 +02:00
Thomas Lamprecht
b8bf7e39fd update pbs-api-types to 1.0.2
For S3 backend for datacenter config and run-on-mount sync job config.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:56:33 +02:00
Thomas Lamprecht
15bcf787c6 update proxmox-s3-client crate dependency to 1.0.3
and track in d/control.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:56:11 +02:00
Thomas Lamprecht
35149f9458 ui: sync job: fine-tune wording for run-on-mount
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Hannes Laimer
90f7c434de docs: add section about run-on-mount sync job flag
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Link: https://lore.proxmox.com/20250721113314.59342-9-h.laimer@proxmox.com
Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Hannes Laimer
f660a5ecb0 ui: add task title for triggering sync jobs
This task will complete after the sync jobs triggered by it have been
completed. Given that, the task title has been chosen to reflect this,
as it will show up in the task log after the sync job tasks.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Link: https://lore.proxmox.com/20250721113314.59342-8-h.laimer@proxmox.com
Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Hannes Laimer
bd37cb3378 ui: add run-on-mount checkbox to SyncJob form
Exposes the `run-on-mount` flag in the advanced options of the sync job
edit window, allowing to set or clear it from the corresponding config.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Link: https://lore.proxmox.com/20250721113314.59342-7-h.laimer@proxmox.com
Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Hannes Laimer
19dc53ac0c bin: manager: run uuid_mount/mount tasks on the proxy
Use the API instead of running uuid_mount/mount directly in the CLI binary.
This ensures that all triggered tasks are handled by the proxy process.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Link: https://lore.proxmox.com/20250721113314.59342-6-h.laimer@proxmox.com
Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Hannes Laimer
6420da8a0c api: admin: trigger sync jobs only on datastore mount
Ensure sync jobs are triggered only when the datastore is actually
mounted. If the datastore is already mounted, we don't fail,
but sync jobs should not be re-triggered unnecessarily. This change
prevents redundant sync job execution.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Link: https://lore.proxmox.com/20250721113314.59342-5-h.laimer@proxmox.com
Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Hannes Laimer
6d7c593191 api: admin: run configured sync jobs when a datastore is mounted
When a datastore is mounted, spawn a new task to run all sync jobs
marked with `run-on-mount`. These jobs run sequentially and include
any job for which the mounted datastore is:

- The source or target in a local pull job
- The source in a push job to a remote datastore
- The target in a pull job from a remote datastore

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Link: https://lore.proxmox.com/20250721113314.59342-4-h.laimer@proxmox.com
Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Hannes Laimer
fc47cf1bbb api: config: sync: update run-on-mount correctly
Sets or clears the run-on-mount flag in sync job configs, removing the
optional value from the config if requested for deletion via the api call.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Link: https://lore.proxmox.com/20250721113314.59342-3-h.laimer@proxmox.com
Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Thomas Lamprecht
a71bea5174 ui: datastore content: hide More menu for local non-S3 datastores
As otherwise one questions what one needs to do or select to enable
that more menu for "normal" local datastore, rather just hide it when
it never can be used anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Thomas Lamprecht
3bbc9dedb9 ui: rename S3 remotes to endpoints
While I originally suggested it avoid moving this into the remote
panel as sub-tab for now, rather just rename it to S3 Endpoints for
good visual differentiation and as the term endpoints is widely used
in the S3 world anyway FWICT.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Christian Ebner
c4c0d6da8a datastore: check s3 bucket access before create datastore task
In order to give immediate feedback to the caller, so it is not
required to re-enter all the datastore configuration if the bucket
cannot be accessed.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Christian Ebner
ab75d7ac6e config: s3: adapt to new config struct layouts
In order to not return the secret key as part of the s3 endpoint
config, split the config into different struct depending on the
usecase. Either use the plain config without id and secret_key,
the struct with id and plain config or the combined variant with
all 3 fields present.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Christian Ebner
4840b515f8 ui: s3 client edit: allow for https scheme prefix in endpoint input
Since S3 object store providers might show the endpoint via the https
scheme prefix, allow this as valid user input for the ui, but strip
it when sending the value.

This is to reduce friction for the user when copy/pasting the value.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Christian Ebner
2900ef9594 ui: default for s3 overwrite-in-use to be disabled
The flag only makes sense in combination with the reuse-existing
datastore flag, which is unchecked by default. Therefore, opt for the
overwrite-in-use flag to be disabled if unchecked and hidden if not
an s3 datastore.

Reported-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00
Christian Ebner
f7eb5fc86d docs: use endpoint over client for the s3 endpoint configuration
The WebUI and CLI have been adapted to use s3 endpoint rather than S3
client, so update the documentation to be consistent.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-22 21:43:43 +02:00