5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-07 17:18:03 +03:00
Commit Graph

8058 Commits

Author SHA1 Message Date
Christian Ebner
e066bd7207 bin: show direction in sync job list output
As the WebUI also lists the sync direction, display the direction in
the cli output as well.

Examplary output:
```
┌─────────────────┬────────────────┬───────────┬────────┬───────────────────┬──────────┬──────────────┬─────────┬─────────┐
│ id              │ sync-direction │ store     │ remote │ remote-store      │ schedule │ group-filter │ rate-in │ comment │
╞═════════════════╪════════════════╪═══════════╪════════╪═══════════════════╪══════════╪══════════════╪═════════╪═════════╡
│ s-6c16fab2-9e85 │                │ datastore │        │ datastore         │ hourly   │ all          │         │         │
├─────────────────┼────────────────┼───────────┼────────┼───────────────────┼──────────┼──────────────┼─────────┼─────────┤
│ s-8764c440-3a6c │ push           │ datastore │ local  │ push-target-store │ hourly   │ all          │         │         │
└─────────────────┴────────────────┴───────────┴────────┴───────────────────┴──────────┴──────────────┴─────────┴─────────┘
```

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 16:00:45 +01:00
Christian Ebner
4b76b731cb api: admin/config: introduce sync direction as job config parameter
Add the sync direction for the sync job as optional config parameter
and refrain from using the config section type for conditional
direction check, as they are now the same (see previous commit).

Use the configured sync job parameter instead of passing it to the
various methods as function parameter and only filter based on sync
direction if an optional api parameter to distingush/filter based on
direction is given.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 16:00:40 +01:00
Christian Ebner
b5814a4142 config: sync: use same config section type sync for push and pull
Use `sync` as config section type string for both, sync jobs in push
and pull direction, renaming the now combined config plugin to sync
plugin.

Commit bcd80bf9 ("api types/config: add `sync-push` config type for
push sync jobs") introduced the additional config type with the
intend to reduce possible misconfiguration. Partially revert this to
use the same config type string again, since the misconfiguration
can happen nevertheless (by editing the config type) and currently
sync job configs are only listed partially when fetched via the
config api endpoint. The filtering based on the additional api
parameter is however retained.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 16:00:28 +01:00
Dominik Csapak
3b3d63ccfd ui: sync jobs: add search box
filter by (remote) store, remote, id, owner, direction.
Local store is only included on the globabl view not the datastore
specific one.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 14:54:33 +01:00
Dominik Csapak
5b11e52b08 ui: sync jobs: change default sorting to 'store' -> 'direction' -> 'id'
instead of just the id, which makes the list in the global datastore
view a bit more easier to digest (since it's now sorted by store first)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 14:54:33 +01:00
Dominik Csapak
e302382890 ui: sync jobs: revert to single list for pull/push jobs
but add a separate column for the direction so one still sees the
separate jobs.

change the 'local owner/user' to a single column, but add a tooltip in
the header to explain when it does what.

This makes the 'SyncJobsPullPushView' unnecessary, so delete it.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 14:54:33 +01:00
Dominik Csapak
28d6afc2d7 cli: manager: sync: add 'sync-direction' parameter to list
so one can list pull and push jobs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 14:54:33 +01:00
Dominik Csapak
403ad1f6d1 api: admin: sync: add optional 'all' sync type for listing
so that one can list all sync jobs, both pull and push, at the same
time. To not confuse existing clients that only know of pull syncs, show
only them by default and make the 'all' parameter opt-in. (But add a
todo for 4.x to change that)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 14:54:33 +01:00
Dominik Csapak
23185135bb api: admin: sync: add direction to sync job status
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 14:54:33 +01:00
Thomas Lamprecht
d394c33a0c update proxmox-notify to 0.5.1
To ensure we got the 10s timeout for webhooks and gotify
notifications available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-26 14:47:03 +01:00
Christian Ebner
0db4d9031b api types: add missing conf to blob archive name mapping
Commit addfae26 ("api types: introduce `BackupArchiveName` type")
introduced a dedicated archive name api type to add rust type
checking and bundle helpers to the api type. Since this, the backup
archive name to server archive name mapping is handled by its parser.

This however did not cover the `.conf` extension used for VM config
files. Add the missing `.conf` to `.conf.blob` to the match statement
and the test cases.

Fixes: addfae26 ("api types: introduce `BackupArchiveName` type")
Reported-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2024-11-26 13:28:17 +01:00
Fabian Grünbichler
d9f36232f1 docs: removable datastores: rephrasing and typos
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-11-26 13:09:16 +01:00
Hannes Laimer
3b9cf7b7a1 docs: add information for removable datastores
Specifically about jobs and how they behave when the datastore is not
mounted, how to create and use deivices with multiple datatstores on
multiple PBS instances and options how to handle failed unmounts.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-26 13:08:04 +01:00
Hannes Laimer
8c7492b99b api: types: add 'mount_status' to schema
... and deserialize with default if field is missing in data.

Reported-by: Aaron Lauterer <a.lauterer@proxmox.com>
Fixes: 76609915d6 ("pbs-api-types: add mount_status field to DataStoreListItem")
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-26 13:08:04 +01:00
Hannes Laimer
e90baeaaa8 api: maintenance: allow setting of maintenance mode if 'unmounting'
So it is possible to reset it after a failed unmount, or abort an
unmount task by resetting it through the API.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-26 13:07:53 +01:00
Stefan Hanreich
feeace2696 docs: client: change disk name from backup to disk
The same word occurring twice in succession can lead to the brain
skipping the second occurrence. Change the name of the archives in the
example from backup.pxar to archive-name.pxar to avoid that effect.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
 [ TL: squash in Christian's suggestion to use 'archive-name.pxar' ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-26 12:43:41 +01:00
Christian Ebner
caba859692 ui: use same label for removable datastore created from disk
The `Add datastore` window labels the flag for creating a removable
datastore as `Removable datastore`, while creating the datastore via the
storage/disks interface will refer to it as `is removable`.

Use the same `Removable datastore` as label for both locations.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2024-11-26 12:25:09 +01:00
Christian Ebner
a910ee8c0d docs: explain some further caveats of the change detection modes
Explain that the change detection mode data makes sure that no files
are considered reusable, even if their metadata might match and that
the use of ctime and inode number is not possible for detection of
unchanged files if the filesystem was synced to a temporary location,
therefore the mtime and size are used for detection.

Also note the reduced deduplication when storing snaphshots with
mixed archive formats on the same datastore.

Further, mention the backwards compatibility to older version of the
Proxmox Backup Server.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2024-11-26 12:22:35 +01:00
Stefan Hanreich
67a7e3c3eb client: fix example commands for client usage
The example commands in the Change Detection Mode / File Exclusion
section are missing the command in the client invocation. Add the
backup command to the examples, so they are actually valid.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-26 12:08:46 +01:00
Thomas Lamprecht
1a0eec9469 docs: update online-help-info reference map
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-26 12:07:38 +01:00
Gabriel Goller
80c9afae4e ui: add onlineHelp for consent-banner option
Add onlineHelp link to the consent-banner docs section in the popup when
inserting the consent-banner text.

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2024-11-26 12:00:08 +01:00
Dominik Csapak
20e58c056f ui: utils: add task description for mounting/unmounting
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-26 11:59:31 +01:00
Lukas Wagner
8dccdeb942 docs: notification: add webhook endpoint documentation
Same information as in pve-docs but translated to restructured text.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-26 11:58:46 +01:00
Lukas Wagner
9c4a934c71 ui: utils: enable webhook edit window
This allows users to add/edit new webhook targets.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-26 11:58:46 +01:00
Lukas Wagner
6a9aa3b9f4 management cli: add CLI for webhook targets
The code was copied and adapted from the gotify target CLI.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2024-11-26 11:58:46 +01:00
Lukas Wagner
aa8f7f6208 api: notification: add API routes for webhook targets
Copied and adapted from the Gotify ones.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-By: Stefan Hanreich <s.hanreich@proxmox.com>
2024-11-26 11:58:46 +01:00
Gabriel Goller
5a52d1f06c reuse-datastore: avoid creating another prune job
If a datastore with a prune job is removed, the prune job is preserverd
as it is stored in /etc/proxmox-backup/prune.cfg. We also create a
default prune job for every datastore – this means that when reusing a
datastore that previously existed, you end up with duplicate prune jobs.
To avoid this we check if a prune job already exists, and when it does,
we refrain from creating the default one. (We also check if specific
keep-options have been added, if yes, then we create the job
nevertheless.)

Reported-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2024-11-26 11:24:46 +01:00
Fabian Grünbichler
f73bc28f03 bump pxar dependency
to ensure bug fix is picked up

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-11-26 11:24:20 +01:00
Thomas Lamprecht
4174dafd32 bump version to 3.2.12-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 22:52:48 +01:00
Thomas Lamprecht
779f82ebdf ui: datastore summary: also trigger navgiation-store load on mount/unmount
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 21:34:22 +01:00
Thomas Lamprecht
668d8dfda4 ui: datastore summary: do single info-panel load on failure
Switch over using the controller of the info panel directly, avoiding
firing events, and add a single store load to cause the mask-logic
when the status update store goes from succeeding to failure.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 21:34:22 +01:00
Thomas Lamprecht
fc2d288434 ui: datastore summary: also stop/start rrd store on failure edges
No point in querying RRD metrics if it will fail anyway, so stop them
like we stop the status store, and start them again once it can work.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 21:34:22 +01:00
Thomas Lamprecht
2de3d5385c ui: datastore summary: only start/stop other stores on edges
Disabling basically was already done only on an transition edge from
"success" -> "failure" (= !success), as we stopped the periodic store
load in that case, thus we never trigger to "failures" after each
other without any user input.

But on success we always unconditionally fired an activate, which
cause the status store to start its store updates, which in turn
immediately triggered as store load. So the verbose status call of the
info panel was now coupled to the 1s update period of the encompassing
summary panel, not the slower 5s period it actually wanted to trigger
an update.

So save the last state and check if it actually differs before causing
such action.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 21:34:22 +01:00
Thomas Lamprecht
d11deccff1 ui: datastore summary: trigger status store load after unmount
Always trigger an explicit status store load.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 21:34:22 +01:00
Thomas Lamprecht
f784201c63 ui: datastore summary: start store updates after mount task is done
Without this, we immediately start the store updates even before the
browser created the (async) mount API request. So it's very likely
that the first store load will still get an error due to the backing
device of the datastore not being mounted yet. That in turn will
trigger our error detection behavior in the load even listener and
disable periodic store updates again.

Move the start of the update into the taskDone handler. We do not need
to check if the task succeeded, as either it did, and we will do
periodic updates, or it did not and we do at least one update to load
the current status and then stop again auto-loading the store anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 21:34:22 +01:00
Thomas Lamprecht
127de88a95 ui: datastore summary: fixate connection-info button position & add separator
It's not nice if a existing always visible button moves around
depending on the datastore type. Rather move the optional buttons to
the right and add a separator for visual grouping.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
09155de386 api: disks: only return UUID of partitions if it actually is one
Some filesystems like FAT don't include a concept of UUIDs.
Instead, tools like blkid tools like blkid derive these
identifiers based on certain filesystem metadata, such as
volume serial numbers or other unique information. This does
however not follow the format specified in RFC 9562[1].

[1] https://datatracker.ietf.org/doc/html/rfc9562

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
18d4c4fc35 bin: debug: add inspect device command
... to get information about (removable) datastores a device contains

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
c8835f5882 ui: support create removable datastore through directory creation
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
42e3b2f12a node: disks: replace BASE_MOUNT_DIR with DATASTORE_MOUNT_DIR
... since they do have the same value.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
43466bf538 api: node: include removable datastores in directory list
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
94a068e316 api: node: allow creation of removable datastore through directory endpoint
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
f0e1cb86d6 ui: render 'unmount' maintenance mode correctly
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
703a822c97 ui: maintenance: fix disable msg field if no type is selected
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
aaac857282 ui: add datastore status mask for unmounted removable datastores
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
b1b6489233 ui: utils: make parseMaintenanceMode more robust
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
c74b289174 ui: tree: render unmounted datastores correctly
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
9cafa1775b ui: add (un)mount button to summary
And only try to load datastore information if the datastore is
available.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
51148a0b1e ui: add removable datastore creation support
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00
Hannes Laimer
62963e6452 ui: add partition selector form
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2024-11-25 21:34:22 +01:00