Skip to content

plugins: add proxmox backup#2372

Merged
BareosBot merged 70 commits intobareos:masterfrom
pstorz:dev/pstorz/master/proxmox-plugin
Nov 17, 2025
Merged

plugins: add proxmox backup#2372
BareosBot merged 70 commits intobareos:masterfrom
pstorz:dev/pstorz/master/proxmox-plugin

Conversation

@pstorz
Copy link
Member

@pstorz pstorz commented Sep 16, 2025

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

TODO

  • write an ADR how proper virtual filenames should be generated
  • use proper virtual filenames

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set
  • Fix the hostname setting problem when restoring CTs
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@pstorz pstorz force-pushed the dev/pstorz/master/proxmox-plugin branch from 1111e93 to 5c1bffe Compare September 16, 2025 12:46
@pstorz pstorz added nobuild and removed nobuild labels Sep 16, 2025
@pstorz pstorz force-pushed the dev/pstorz/master/proxmox-plugin branch from 2582996 to 1fadfe6 Compare September 19, 2025 09:37
@arogge arogge added this to the 25.0.0 milestone Sep 23, 2025
@arogge arogge self-requested a review September 30, 2025 10:01
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found quite a few things to complain about, sorry for that.
Haven't looked at the documentation yet.

@arogge arogge force-pushed the dev/pstorz/master/proxmox-plugin branch from 10e4a2e to 4db6ed0 Compare November 6, 2025 16:58
@pstorz pstorz force-pushed the dev/pstorz/master/proxmox-plugin branch from 7b93ea9 to 0f2959c Compare November 7, 2025 08:41
Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. I found some small things. Please see below.

@arogge arogge force-pushed the dev/pstorz/master/proxmox-plugin branch from 8f3915f to 097ef5b Compare November 12, 2025 09:53
Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review for the documentation @pstorz

Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the code, its really good now, just want a few more debug messages in case things go wrong.

Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell this is fine now, but I changed a lot of the code, so that's more than just a bit opinionated.

@pstorz pstorz changed the title add proxmox backup plugin plugins: add proxmox backup Nov 14, 2025
@pstorz pstorz force-pushed the dev/pstorz/master/proxmox-plugin branch from 9f7a659 to 6b7dc1b Compare November 14, 2025 16:31
@pstorz pstorz dismissed sebsura’s stale review November 17, 2025 09:06

In sync with arogge the PR is ready.

@pstorz pstorz force-pushed the dev/pstorz/master/proxmox-plugin branch 4 times, most recently from 3a947a5 to 2598b43 Compare November 17, 2025 15:16
arogge and others added 28 commits November 17, 2025 15:55
* avoid split/join
* look at "Starting backup of" for type so we can fail cleanly on newly
  introduced types
* get timestamp from "Backup started at" instead of datetime.now()
* create virtual file as PROXMOX/... instead of /var/lib/... so it
  cannot clash with regular files
* allow setting the restore path using "restore_path" option
* adapt systemtest
* switch backup/restore branch based on self.level
* ignore restoretodisk on backup
* functions that should never be called throw NotImplementedError
* add get_acl() / get_xattr() that return no data
Retrieve the maximum pipe size from /proc and increase LogPipe's pipe
size to that.
set it in one location only, default ON if
* ENABLE_PYTHON
* Distribution == "debian"
* Distribution version >= 12
otherwise OFF
This allows us to set cache variables in any of the subdirectories and
then use these in BareosGenerateDebianInfo later.
Also move the ENABLE_PROXMOX option next to the rest of the cmake
proxmox things.
${rscripts} -> ${BAREOS_SCRIPTS_DIR}
Instead of failing silently, provide a message that the program was not
found on start and status.
* check if process is alive before backing up data
* wait for process to exit (and check return code) before finishing a
  backup or restore
* close the restore process' stdin so it knows we're done restoring
  data
otherwise the core will create a bogus directory based on the virtual
file name we are restoring.
* add force option to overwrite a VM/container on restore
* support on/off yes/no 1/0 on boolean options
* detect unknown extra options
* add comments with sample output
* reorder to match the expected output order
* move default guest names into parser
This makes the plugin adhere to ADR-0004.
Add more debug messages as suggested in code review.
As suggested in code-review enrich the ValueErrors on option assignment
with the name of the option and the value passed.
pct restore requires --rootfs option to restore from stdin.
For now the user has to provide this as a plugin option to Bareos.
@BareosBot BareosBot force-pushed the dev/pstorz/master/proxmox-plugin branch from cd1e5ee to aebb95d Compare November 17, 2025 15:56
@BareosBot BareosBot merged commit a3d2a83 into bareos:master Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants