6781 Commits

Author SHA1 Message Date
Wolfgang Bumiller
a63a869e07 client: use BorrowedFd from std
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-10-19 11:00:36 +02:00
Wolfgang Bumiller
62c948a8d9 bump edition in rustfmt.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-10-13 15:01:11 +02:00
Thomas Lamprecht
8201329a63 cargo: rrd: set license in subcrate too
in preparation of moving this out

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-11 15:46:30 +02:00
Thomas Lamprecht
938dd9278e move proxmox-rest-server to proxmox-rs as separate package
Lives now in the common proxmox rs repo[0] for better reuse with
other projects.

[0]: https://git.proxmox.com/?p=proxmox.git;a=tree;f=proxmox-rest-server;h=8035b65a00271604c229590d0109aba3f75ee784

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-11 15:31:39 +02:00
Dominik Csapak
064a9a6bb1 ui: node certificate: make parent panel scrollable
The `ACME` panel may be rendered out of sight (overflow) when there
are enough SANs on the upper `Certificates` panel to push it down
enough and the browser/display height is too small.

Enable the `scrollable` config for the parent certificate view panel
in the y-axis (vertical) to make ExtJS automatically add a scrollbar
if the content overflows. Avoid enabling it for the x-axis too as
that breaks reflow of the layout if the browser window gets resized.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: fix commit message to one from manager ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-11 11:27:18 +02:00
Fabian Grünbichler
237beaed93 cargo fmt
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-10-11 09:37:16 +02:00
Fabian Grünbichler
f097eaa80f clippy fixes
and one additional API fn "allow many parameters" addition.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-10-11 09:36:12 +02:00
Thomas Lamprecht
c36c901172 prune job: various cleanups, line reduction
no semantic change intended

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-07 15:39:57 +02:00
Thomas Lamprecht
97184e14b4 prune job: avoid duplicate code when assembling CLI keep options
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-07 15:37:32 +02:00
Dominik Csapak
cf91a072ef fix #4274: implement prune notifications
we converted the prune settings of datastores to prune-jobs, but did
not actually implement the notifications for them, even though
we had the notification options in the gui (they did not work).

implement the basic ok/error notification for prune jobs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-10-07 08:35:56 +02:00
Daniel Tschlatscher
bd25aaed7a Remove BackupFileDownloader.js file and Makefile entry
While finishing up my previous patch series I stumbled upon this file
which is not referenced anywhere in the proxmox-backup repository nor
in any of the other repositories as far as I can tell (except in the
Makefile).
I searched far and wide for any occurences and tested the backup
explorer GUI without it, which still seems to work normally.

Introduced in: 98425309b0106c9174505614525a9561d98c56d7
References removed in: 3e395378bca5a844b2c820750cd57e4f2bfbacca

Therefore I think this can be safely considered dead code and be
removed. It shall remain in the pve-devel archives forevermore anyway.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
2022-10-05 19:35:25 +02:00
Dominik Csapak
ba690c4023 file-restore: remove 'json-error' parameter from list_files
we can reuse the 'output_format' here
also remove the 'error: true' here. we can determine it was an error,
by checking if it's an object with a 'message' property

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-10-05 19:34:00 +02:00
Dominik Csapak
1053a71e81 tape/inventory: make 'load_media_db' a method
and use self.inventory_path. This is only used internally (not pub) so there
is no need to have it as a static function.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-10-05 19:26:36 +02:00
Dylan Whyte
6481fd2498 docs: language fixup
This fixup covers every doc patch since my previous language fixup patch.

Note: not much attention was paid to certificate-management, as it's
derived from pmg, which I had touched up not so long ago.

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2022-10-05 19:23:17 +02:00
Thomas Lamprecht
7c1029d760 bump version to 2.2.7-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 18:59:54 +02:00
Dominik Csapak
cc900ae2f7 file-restore: add 'format' and 'zstd' parameters to 'extract' command
if the target ist stdout, we can now specify the exact format by making use of
the new 'format' parameter of the restore daemons 'extract' api

note that extracting a pxar from a source pxar (container/host backups)
won't work currently since we would have to reencode as pxar first

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: fixed missing proxmox-compression dependency ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 18:40:51 +02:00
Dominik Csapak
702ff41471 restore-daemon: add 'format' and 'zstd' parameters to the 'extract' handler
'format' can be 'plain', 'pxar', 'zip' or 'tar',  and it returns the
content in the given format (with fallback to the old behaviour if not
given)

the 'zstd' denotes if the output should be zstd compressed

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 18:40:49 +02:00
Dominik Csapak
1bbf0cd467 pbs-api-types: add FileRestoreFormat type
intended for passing the format to the file-restore client/daemon

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 18:40:49 +02:00
Thomas Lamprecht
ed4466d840 prune sim: shorten code for weekdayFlags computation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 16:57:40 +02:00
Thomas Lamprecht
5ad65cc252 prune sim: mask simulation options during update
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 16:56:51 +02:00
Thomas Lamprecht
922812ed37 prune sim: style nit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 14:38:59 +02:00
Thomas Lamprecht
c4fe6c1f35 docs: prune sim: explicitly document time range options
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 13:18:13 +02:00
Thomas Lamprecht
87cbd8c48a prune sim: rework simulation options layout
move the two columns to a field set each, one for the backup job
config, containing weekdays and schedule, and one for the simulation
time, which contains the end date/time and the duration, which got
moved over, as it better fits along the new date/time.

Note that I used end instead of start as its the later point in time,
so hopefully less confusing, but one could argue either.

Flex and width of the fields got adapted such that they now better
work on smaller resolutions (< 1500px total width) and look better
on both, low and high resolutions/width.

The button got moved into the docked area  mostly due to me being to
lazy to add yet another container indirection for having the hbox
nested inside a vbox, but also as it makes sense to have it big and
centered available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 13:16:22 +02:00
Thomas Lamprecht
3ac9b04a26 docs: prune sim: add h4 to h6 style in css
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-05 13:07:13 +02:00
Thomas Lamprecht
bb044304aa prune sim: move PruneList to more static declaration
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-04 16:32:18 +02:00
Matthias Heiserer
f44e2386df prune-simulator: allow setting a custom date/time
With this, the prune simulator will be more flexible, which might clear
up questions such as these:
https://forum.proxmox.com/threads/pbs-prune-simulator-monthly-backups.115081

In order to have the configuration window not take up too much space,
I added another column and moved the border to the left.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
2022-09-23 12:32:28 +02:00
Thomas Lamprecht
6088459570 api: disk SMART: fix details for depreacated return value comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-23 10:33:17 +02:00
Matthias Heiserer
500014e83b fix #4165: SMART: add raw field
This makes it consistent with the naming scheme in PVE/GUI.
Keep value for API stability reasons, and remove it in next major version.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.cspak@proxmox.com>
2022-09-23 10:32:30 +02:00
Fabian Grünbichler
37cfd7b336 daily update: fix subscription check
this wrongly triggered for non-subscribed systems as well.

Fixes: dd16e1dac8976b523c1cf895efe280b73008eca6
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-23 07:58:17 +02:00
Thomas Lamprecht
1e85f97b9f api/pull: drop unused ApiMethod info
the API macro can handle this

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-23 07:57:03 +02:00
Matthias Heiserer
4d226f963f pbs-manager: fix pull not respecting local ns setting
It pulls to root namespace instead.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2022-09-20 12:19:00 +02:00
Stefan Hanreich
fc65ec4345 fix #4095: make http client use proxy config from 'ALL_PROXY' env var
In order to be able to use a proxy with the proxmox-backup-client, use
ProxyConfig for parsing proxy server config from the environment. Also
added a section in the documentation that describes how to configure the
environment if a proxy server should be used.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-16 13:28:24 +02:00
Fabian Grünbichler
3259c85ad1 apt: add proxmox-offline-mirror-helper package
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-15 09:08:32 +02:00
Fabian Grünbichler
78357bb054 d/control: recommend proxmox-offline-mirror-helper
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-12 10:56:25 +02:00
Fabian Grünbichler
ae66b24542 docs: faq: fix heading underline
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-12 10:13:35 +02:00
Dominik Csapak
d8e4837a57 docs: faq: add better clarification on full/incremental
and add a link to the technical overview

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-09-12 10:13:13 +02:00
Dominik Csapak
d48275359f docs: technical overview: add section about snapshots
to clarify that snapshots get uploaded in an incremental manner, but
still represent a full backup.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-09-12 10:13:13 +02:00
Dominik Csapak
ff438963dd docs: terminology: update snapshot uniqueness for namespaces
since we introduced namespaces, a snapshot does not have be unique
across the datastore anymore, only a namespace.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-09-12 10:13:13 +02:00
Stefan Sterz
a756b0c1a1 fix: datastore: make relative_group_path() return relative path
previously the BackGroup trait used the datastore's
namespace_path() method to construct a base path. this would result in
it returning an absolute path equivalent to full_group_path(). use
the namspace's path() method instead to get a relative path, in-line
with backup_dir's relative_path().

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-09-12 10:02:46 +02:00
Dominik Csapak
a554ac1950 ui: fix default language display
when we set a default language server side, we want to display that on
the login page. For that we have to use the 'language' variable in the
index template.

Also set the fallback to '__default__' instead of 'en' so that we show
'Default (English)'.

Was reported in the forum:

https://forum.proxmox.com/threads/set-default-language-on-server-login-screen-to-german.114431/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-09-12 09:42:01 +02:00
Thomas Lamprecht
c4861c5afd bump version to 2.2.6-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-09 14:15:29 +02:00
Thomas Lamprecht
84df915ef5 proxy: inline args in format strings
in most cases anyway. Allows for shorter code, which allows to drop
some line breaks.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-09 14:00:29 +02:00
Thomas Lamprecht
bee53cbba2 docs: intro: avoid office@ mail address for sales related questions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-09 13:34:28 +02:00
Thomas Lamprecht
0e930e7b7d docs: package repos: fix typo
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-09 12:40:35 +02:00
Fabian Grünbichler
2b3f136ceb update to proxmox-subscription 0.3
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 14:17:12 +02:00
Fabian Grünbichler
f3cfeb20a1 update proxmox-router to 1.3.0
no real change for PBS usage - the ApiHandler enum is marked
non_exhaustive now because it has extra values if the new (enabled by
default) "server" feature is enabled.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 14:17:12 +02:00
Fabian Grünbichler
951cbb96a2 update to proxmox-http 0.7
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 14:17:00 +02:00
Dominik Csapak
6171c72778 backup-client: mount: fix read of larger files
fuse_lowlevel.h says about read:

 Read should send exactly the number of bytes requested except
 on EOF or error, otherwise the rest of the data will be
 substituted with zeroes.

but we simply forwarded the bytes we got from 'read_at'. The result was
that files were corrupt as soon as read_at returned not the exact number
of bytes requested. such short reads are easy to trigger with large
files (where reading a file has to cross many chunk boundaries).

To fix that, loop over 'read_at' until our buffer is full, or we read
0 bytes, indicating EOF.

reported in the forum:
https://forum.proxmox.com/threads/proxmox-backup-client-mounting-a-pxar-archive-gives-truncated-files.114447/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>

Added comment, reworded slightly

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-05 15:16:42 +02:00
Fabian Grünbichler
e762aea4e0 build: more missing features
these would cause failures when building the sub-crates directly from
their sub-directory.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-05 12:55:33 +02:00
Fabian Grünbichler
180585a273 pbs-config: add missing proxmox-sys/timer feature
else building pbs-config directly (not from the workspace root with `-p
pbs-config`) fails (and so do similar dep chains that don't pull in the
feature via another way, like `cd proxmox-backup-client; cargo build`).

Reported-by: Dominiki Csapak <d.csapak@proxmox.com>

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-05 12:18:00 +02:00