Compare commits

..

No commits in common. "master" and "v0.9.7" have entirely different histories.

723 changed files with 29705 additions and 97440 deletions

10
.gitignore vendored
View File

@ -1,16 +1,6 @@
local.mak local.mak
/target /target
**/*.rs.bk **/*.rs.bk
*~
*.backup
*.backup[0-9]
*.backup[0-9][0-9]
*.old
*.old[0-9]
*.old[0-9][0-9]
*.5
*.7
__pycache__/
/etc/proxmox-backup.service /etc/proxmox-backup.service
/etc/proxmox-backup-proxy.service /etc/proxmox-backup-proxy.service
build/ build/

View File

@ -1,16 +1,7 @@
[package] [package]
name = "proxmox-backup" name = "proxmox-backup"
version = "2.2.3" version = "0.9.7"
authors = [ authors = ["Dietmar Maurer <dietmar@proxmox.com>"]
"Dietmar Maurer <dietmar@proxmox.com>",
"Dominik Csapak <d.csapak@proxmox.com>",
"Christian Ebner <c.ebner@proxmox.com>",
"Fabian Grünbichler <f.gruenbichler@proxmox.com>",
"Stefan Reiter <s.reiter@proxmox.com>",
"Thomas Lamprecht <t.lamprecht@proxmox.com>",
"Wolfgang Bumiller <w.bumiller@proxmox.com>",
"Proxmox Support Team <support@proxmox.com>",
]
edition = "2018" edition = "2018"
license = "AGPL-3" license = "AGPL-3"
description = "Proxmox Backup" description = "Proxmox Backup"
@ -18,134 +9,59 @@ homepage = "https://www.proxmox.com"
exclude = [ "build", "debian", "tests/catar_data/test_symlink/symlink1"] exclude = [ "build", "debian", "tests/catar_data/test_symlink/symlink1"]
[workspace]
members = [
"pbs-buildcfg",
"pbs-client",
"pbs-config",
"pbs-datastore",
"pbs-fuse-loop",
"proxmox-rest-server",
"proxmox-rrd",
"pbs-tape",
"pbs-tools",
"proxmox-backup-banner",
"proxmox-backup-client",
"proxmox-file-restore",
"proxmox-restore-daemon",
"pxar-bin",
]
[lib] [lib]
name = "proxmox_backup" name = "proxmox_backup"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
apt-pkg-native = "0.3.2" apt-pkg-native = "0.3.1" # custom patched version
base64 = "0.13" base64 = "0.12"
bitflags = "1.2.1" bitflags = "1.2.1"
bytes = "1.0" bytes = "0.5"
cidr = "0.2.1"
crc32fast = "1" crc32fast = "1"
endian_trait = { version = "0.6", features = ["arrays"] } endian_trait = { version = "0.6", features = ["arrays"] }
flate2 = "1.0"
anyhow = "1.0" anyhow = "1.0"
thiserror = "1.0"
futures = "0.3" futures = "0.3"
h2 = { version = "0.3", features = [ "stream" ] } h2 = { version = "0.2", features = ["stream"] }
handlebars = "3.0" handlebars = "3.0"
hex = "0.4.3"
http = "0.2" http = "0.2"
hyper = { version = "0.14", features = [ "full" ] } hyper = "0.13.6"
lazy_static = "1.4" lazy_static = "1.4"
libc = "0.2" libc = "0.2"
log = "0.4.17" log = "0.4"
nix = "0.24" nix = "0.19"
num-traits = "0.2" num-traits = "0.2"
once_cell = "1.3.1" once_cell = "1.3.1"
openssl = "0.10.38" # currently patched! openssl = "0.10"
pam = "0.7" pam = "0.7"
pam-sys = "0.5" pam-sys = "0.5"
percent-encoding = "2.1" percent-encoding = "2.1"
regex = "1.5.5" pin-utils = "0.1.0"
rustyline = "9" pathpatterns = "0.1.2"
proxmox = { version = "0.7.0", features = [ "sortable-macro", "api-macro", "websocket" ] }
#proxmox = { git = "git://git.proxmox.com/git/proxmox", version = "0.1.2", features = [ "sortable-macro", "api-macro" ] }
#proxmox = { path = "../proxmox/proxmox", features = [ "sortable-macro", "api-macro", "websocket" ] }
proxmox-fuse = "0.1.0"
pxar = { version = "0.6.1", features = [ "tokio-io", "futures-io" ] }
#pxar = { path = "../pxar", features = [ "tokio-io", "futures-io" ] }
regex = "1.2"
rustyline = "6"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
siphasher = "0.3" siphasher = "0.3"
syslog = "4.0" syslog = "4.0"
tokio = { version = "1.6", features = [ "fs", "io-util", "io-std", "macros", "net", "parking_lot", "process", "rt", "rt-multi-thread", "signal", "time" ] } tokio = { version = "0.2.9", features = [ "blocking", "fs", "dns", "io-util", "macros", "process", "rt-threaded", "signal", "stream", "tcp", "time", "uds" ] }
tokio-openssl = "0.6.1" tokio-openssl = "0.4.0"
tokio-stream = "0.1.0" tokio-util = { version = "0.3", features = [ "codec" ] }
tokio-util = { version = "0.7", features = [ "codec", "io" ] }
tower-service = "0.3.0" tower-service = "0.3.0"
udev = "0.4" udev = ">= 0.3, <0.5"
url = "2.1" url = "2.1"
#valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true } #valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true }
walkdir = "2" walkdir = "2"
xdg = "2.2" xdg = "2.2"
zstd = { version = "0.4", features = [ "bindgen" ] }
nom = "5.1" nom = "5.1"
crossbeam-channel = "0.5" crossbeam-channel = "0.4"
# Used only by examples currently:
zstd = { version = "0.6", features = [ "bindgen" ] }
pathpatterns = "0.1.2"
pxar = { version = "0.10.1", features = [ "tokio-io" ] }
proxmox-http = { version = "0.6.1", features = [ "client", "http-helpers", "websocket" ] }
proxmox-io = "1"
proxmox-lang = "1.1"
proxmox-router = { version = "1.2.2", features = [ "cli" ] }
proxmox-schema = { version = "1.3.1", features = [ "api-macro" ] }
proxmox-section-config = "1"
proxmox-tfa = { version = "2", features = [ "api", "api-types" ] }
proxmox-time = "1.1.2"
proxmox-uuid = "1"
proxmox-serde = "0.1"
proxmox-shared-memory = "0.2"
proxmox-sys = { version = "0.3", features = [ "sortable-macro" ] }
proxmox-compression = "0.1"
proxmox-acme-rs = "0.4"
proxmox-apt = "0.8.0"
proxmox-async = "0.4"
proxmox-openid = "0.9.0"
pbs-api-types = { path = "pbs-api-types" }
pbs-buildcfg = { path = "pbs-buildcfg" }
pbs-client = { path = "pbs-client" }
pbs-config = { path = "pbs-config" }
pbs-datastore = { path = "pbs-datastore" }
proxmox-rest-server = { path = "proxmox-rest-server" }
proxmox-rrd = { path = "proxmox-rrd" }
pbs-tools = { path = "pbs-tools" }
pbs-tape = { path = "pbs-tape" }
# Local path overrides
# NOTE: You must run `cargo update` after changing this for it to take effect!
[patch.crates-io]
#proxmox-acme-rs = { path = "../proxmox-acme-rs" }
#proxmox-apt = { path = "../proxmox-apt" }
#proxmox-async = { path = "../proxmox/proxmox-async" }
#proxmox-compression = { path = "../proxmox/proxmox-compression" }
#proxmox-borrow = { path = "../proxmox/proxmox-borrow" }
#proxmox-fuse = { path = "../proxmox-fuse" }
#proxmox-http = { path = "../proxmox/proxmox-http" }
#proxmox-io = { path = "../proxmox/proxmox-io" }
#proxmox-lang = { path = "../proxmox/proxmox-lang" }
#proxmox-openid = { path = "../proxmox-openid-rs" }
#proxmox-router = { path = "../proxmox/proxmox-router" }
#proxmox-schema = { path = "../proxmox/proxmox-schema" }
#proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
#proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
#proxmox-sys = { path = "../proxmox/proxmox-sys" }
#proxmox-serde = { path = "../proxmox/proxmox-serde" }
#proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
#proxmox-time = { path = "../proxmox/proxmox-time" }
#proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
#pxar = { path = "../pxar" }
[features] [features]
default = [] default = []

131
Makefile
View File

@ -9,44 +9,18 @@ SUBDIRS := etc www docs
# Binaries usable by users # Binaries usable by users
USR_BIN := \ USR_BIN := \
proxmox-backup-client \ proxmox-backup-client \
proxmox-file-restore \ pxar
pxar \
proxmox-tape \
pmtx \
pmt
# Binaries usable by admins # Binaries usable by admins
USR_SBIN := \ USR_SBIN := \
proxmox-backup-manager \ proxmox-backup-manager
proxmox-backup-debug \
# Binaries for services: # Binaries for services:
SERVICE_BIN := \ SERVICE_BIN := \
proxmox-backup-api \ proxmox-backup-api \
proxmox-backup-banner \ proxmox-backup-banner \
proxmox-backup-proxy \ proxmox-backup-proxy \
proxmox-daily-update proxmox-daily-update \
# Single file restore daemon
RESTORE_BIN := \
proxmox-restore-daemon
SUBCRATES := \
pbs-api-types \
pbs-buildcfg \
pbs-client \
pbs-config \
pbs-datastore \
pbs-fuse-loop \
proxmox-rest-server \
proxmox-rrd \
pbs-tape \
pbs-tools \
proxmox-backup-banner \
proxmox-backup-client \
proxmox-file-restore \
proxmox-restore-daemon \
pxar-bin
ifeq ($(BUILD_MODE), release) ifeq ($(BUILD_MODE), release)
CARGO_BUILD_ARGS += --release CARGO_BUILD_ARGS += --release
@ -62,7 +36,7 @@ endif
CARGO ?= cargo CARGO ?= cargo
COMPILED_BINS := \ COMPILED_BINS := \
$(addprefix $(COMPILEDIR)/,$(USR_BIN) $(USR_SBIN) $(SERVICE_BIN) $(RESTORE_BIN)) $(addprefix $(COMPILEDIR)/,$(USR_BIN) $(USR_SBIN) $(SERVICE_BIN))
export DEB_VERSION DEB_VERSION_UPSTREAM export DEB_VERSION DEB_VERSION_UPSTREAM
@ -70,20 +44,15 @@ SERVER_DEB=${PACKAGE}-server_${DEB_VERSION}_${ARCH}.deb
SERVER_DBG_DEB=${PACKAGE}-server-dbgsym_${DEB_VERSION}_${ARCH}.deb SERVER_DBG_DEB=${PACKAGE}-server-dbgsym_${DEB_VERSION}_${ARCH}.deb
CLIENT_DEB=${PACKAGE}-client_${DEB_VERSION}_${ARCH}.deb CLIENT_DEB=${PACKAGE}-client_${DEB_VERSION}_${ARCH}.deb
CLIENT_DBG_DEB=${PACKAGE}-client-dbgsym_${DEB_VERSION}_${ARCH}.deb CLIENT_DBG_DEB=${PACKAGE}-client-dbgsym_${DEB_VERSION}_${ARCH}.deb
RESTORE_DEB=proxmox-backup-file-restore_${DEB_VERSION}_${ARCH}.deb
RESTORE_DBG_DEB=proxmox-backup-file-restore-dbgsym_${DEB_VERSION}_${ARCH}.deb
DOC_DEB=${PACKAGE}-docs_${DEB_VERSION}_all.deb DOC_DEB=${PACKAGE}-docs_${DEB_VERSION}_all.deb
DEBS=${SERVER_DEB} ${SERVER_DBG_DEB} ${CLIENT_DEB} ${CLIENT_DBG_DEB} \ DEBS=${SERVER_DEB} ${SERVER_DBG_DEB} ${CLIENT_DEB} ${CLIENT_DBG_DEB}
${RESTORE_DEB} ${RESTORE_DBG_DEB} ${DEBUG_DEB} ${DEBUG_DBG_DEB}
DSC = rust-${PACKAGE}_${DEB_VERSION}.dsc DSC = rust-${PACKAGE}_${DEB_VERSION}.dsc
DESTDIR= DESTDIR=
tests ?= --workspace all: cargo-build $(SUBDIRS)
all: $(SUBDIRS)
.PHONY: $(SUBDIRS) .PHONY: $(SUBDIRS)
$(SUBDIRS): $(SUBDIRS):
@ -95,23 +64,19 @@ test:
$(CARGO) test $(tests) $(CARGO_BUILD_ARGS) $(CARGO) test $(tests) $(CARGO_BUILD_ARGS)
doc: doc:
$(CARGO) doc --workspace --no-deps $(CARGO_BUILD_ARGS) $(CARGO) doc --no-deps $(CARGO_BUILD_ARGS)
# always re-create this dir # always re-create this dir
.PHONY: build .PHONY: build
build: build:
@echo "Setting pkg-buildcfg version to: $(DEB_VERSION_UPSTREAM)"
sed -i -e 's/^version =.*$$/version = "$(DEB_VERSION_UPSTREAM)"/' \
pbs-buildcfg/Cargo.toml
rm -rf build rm -rf build
mkdir build rm -f debian/control
cp -a debian \ debcargo package --config debian/debcargo.toml --changelog-ready --no-overlay-write-back --directory build proxmox-backup $(shell dpkg-parsechangelog -l debian/changelog -SVersion | sed -e 's/-.*//')
Cargo.toml src \ sed -e '1,/^$$/ ! d' build/debian/control > build/debian/control.src
$(SUBCRATES) \ cat build/debian/control.src build/debian/control.in > build/debian/control
docs etc examples tests www zsh-completions \ rm build/debian/control.in build/debian/control.src
defines.mk Makefile \ cp build/debian/control debian/control
./build/ rm build/Cargo.lock
rm -f build/Cargo.lock
find build/debian -name "*.hint" -delete find build/debian -name "*.hint" -delete
$(foreach i,$(SUBDIRS), \ $(foreach i,$(SUBDIRS), \
$(MAKE) -C build/$(i) clean ;) $(MAKE) -C build/$(i) clean ;)
@ -131,9 +96,7 @@ deb: build
lintian $(DEBS) lintian $(DEBS)
.PHONY: deb-all .PHONY: deb-all
deb-all: build deb-all: $(DOC_DEB) $(DEBS)
cd build; dpkg-buildpackage -b -us -uc --no-pre-clean
lintian $(DEBS) $(DOC_DEB)
.PHONY: dsc .PHONY: dsc
dsc: $(DSC) dsc: $(DSC)
@ -141,61 +104,27 @@ $(DSC): build
cd build; dpkg-buildpackage -S -us -uc -d -nc cd build; dpkg-buildpackage -S -us -uc -d -nc
lintian $(DSC) lintian $(DSC)
.PHONY: clean distclean deb clean
distclean: clean distclean: clean
clean: clean-deb
clean:
$(foreach i,$(SUBDIRS), \ $(foreach i,$(SUBDIRS), \
$(MAKE) -C $(i) clean ;) $(MAKE) -C $(i) clean ;)
$(CARGO) clean $(CARGO) clean
rm -f .do-cargo-build rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes build
find . -name '*~' -exec rm {} ';' find . -name '*~' -exec rm {} ';'
# allows one to avoid running cargo clean when one just wants to tidy up after a packgae build
clean-deb:
rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes build/
.PHONY: dinstall .PHONY: dinstall
dinstall: ${SERVER_DEB} ${SERVER_DBG_DEB} ${CLIENT_DEB} ${CLIENT_DBG_DEB} \ dinstall: ${DEBS}
${DEBUG_DEB} ${DEBUG_DBG_DEB} dpkg -i ${DEBS}
dpkg -i $^
# make sure we build binaries before docs # make sure we build binaries before docs
docs: $(COMPILEDIR)/dump-catalog-shell-cli $(COMPILEDIR)/docgen docs: cargo-build
.PHONY: cargo-build .PHONY: cargo-build
cargo-build: cargo-build:
rm -f .do-cargo-build $(CARGO) build $(CARGO_BUILD_ARGS)
$(MAKE) $(COMPILED_BINS)
$(COMPILED_BINS) $(COMPILEDIR)/dump-catalog-shell-cli $(COMPILEDIR)/docgen: .do-cargo-build
.do-cargo-build:
$(CARGO) build $(CARGO_BUILD_ARGS) \
--package proxmox-backup-banner \
--bin proxmox-backup-banner \
--package proxmox-backup-client \
--bin proxmox-backup-client \
--bin dump-catalog-shell-cli \
--bin proxmox-backup-debug \
--package proxmox-file-restore \
--bin proxmox-file-restore \
--package pxar-bin \
--bin pxar \
--package pbs-tape \
--bin pmt \
--bin pmtx \
--package proxmox-restore-daemon \
--bin proxmox-restore-daemon \
--package proxmox-backup \
--bin docgen \
--bin proxmox-backup-api \
--bin proxmox-backup-manager \
--bin proxmox-backup-proxy \
--bin proxmox-daily-update \
--bin proxmox-file-restore \
--bin proxmox-tape \
--bin sg-tape-cmd
touch "$@"
$(COMPILED_BINS): cargo-build
.PHONY: lint .PHONY: lint
lint: lint:
@ -212,22 +141,14 @@ install: $(COMPILED_BINS)
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(SBINDIR)/ ; \ install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(SBINDIR)/ ; \
install -m644 zsh-completions/_$(i) $(DESTDIR)$(ZSH_COMPL_DEST)/ ;) install -m644 zsh-completions/_$(i) $(DESTDIR)$(ZSH_COMPL_DEST)/ ;)
install -dm755 $(DESTDIR)$(LIBEXECDIR)/proxmox-backup install -dm755 $(DESTDIR)$(LIBEXECDIR)/proxmox-backup
install -dm755 $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/file-restore
$(foreach i,$(RESTORE_BIN), \
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/file-restore/ ;)
# install sg-tape-cmd as setuid binary
install -m4755 -o root -g root $(COMPILEDIR)/sg-tape-cmd $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/sg-tape-cmd
$(foreach i,$(SERVICE_BIN), \ $(foreach i,$(SERVICE_BIN), \
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;) install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
$(MAKE) -C www install $(MAKE) -C www install
$(MAKE) -C docs install $(MAKE) -C docs install
.PHONY: upload .PHONY: upload
upload: ${SERVER_DEB} ${CLIENT_DEB} ${RESTORE_DEB} ${DOC_DEB} ${DEBUG_DEB} upload: ${SERVER_DEB} ${CLIENT_DEB} ${DOC_DEB}
# check if working directory is clean # check if working directory is clean
git diff --exit-code --stat && git diff --exit-code --stat --staged git diff --exit-code --stat && git diff --exit-code --stat --staged
tar cf - ${SERVER_DEB} ${SERVER_DBG_DEB} ${DOC_DEB} ${CLIENT_DEB} \ tar cf - ${SERVER_DEB} ${SERVER_DBG_DEB} ${DOC_DEB} | ssh -X repoman@repo.proxmox.com upload --product pbs --dist buster
${CLIENT_DBG_DEB} ${DEBUG_DEB} ${DEBUG_DBG_DEB} \ tar cf - ${CLIENT_DEB} ${CLIENT_DBG_DEB} | ssh -X repoman@repo.proxmox.com upload --product "pbs,pve,pmg" --dist buster
| ssh -X repoman@repo.proxmox.com upload --product pbs --dist bullseye
tar cf - ${CLIENT_DEB} ${CLIENT_DBG_DEB} | ssh -X repoman@repo.proxmox.com upload --product "pve,pmg,pbs-client" --dist bullseye
tar cf - ${RESTORE_DEB} ${RESTORE_DBG_DEB} | ssh -X repoman@repo.proxmox.com upload --product "pve" --dist bullseye

View File

@ -1,7 +1,3 @@
Build & Release Notes
*********************
``rustup`` Toolchain ``rustup`` Toolchain
==================== ====================
@ -44,99 +40,16 @@ example for proxmox crate above).
Build Build
===== =====
on Debian 11 Bullseye on Debian Buster
Setup: Setup:
1. # echo 'deb http://download.proxmox.com/debian/devel/ bullseye main' | sudo tee /etc/apt/sources.list.d/proxmox-devel.list 1. # echo 'deb http://download.proxmox.com/debian/devel/ buster main' >> /etc/apt/sources.list.d/proxmox-devel.list
2. # sudo wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg 2. # sudo wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
3. # sudo apt update 3. # sudo apt update
4. # sudo apt install devscripts debcargo clang 4. # sudo apt install devscripts debcargo clang
5. # git clone git://git.proxmox.com/git/proxmox-backup.git 5. # git clone git://git.proxmox.com/git/proxmox-backup.git
6. # cd proxmox-backup; sudo mk-build-deps -ir 6. # sudo mk-build-deps -ir
Note: 2. may be skipped if you already added the PVE or PBS package repository Note: 2. may be skipped if you already added the PVE or PBS package repository
You are now able to build using the Makefile or cargo itself, e.g.:: You are now able to build using the Makefile or cargo itself.
# make deb-all
# # or for a non-package build
# cargo build --all --release
Design Notes
************
Here are some random thought about the software design (unless I find a better place).
Large chunk sizes
=================
It is important to notice that large chunk sizes are crucial for performance.
We have a multi-user system, where different people can do different operations
on a datastore at the same time, and most operation involves reading a series
of chunks.
So what is the maximal theoretical speed we can get when reading a series of
chunks? Reading a chunk sequence need the following steps:
- seek to the first chunk's start location
- read the chunk data
- seek to the next chunk's start location
- read the chunk data
- ...
Lets use the following disk performance metrics:
:AST: Average Seek Time (second)
:MRS: Maximum sequential Read Speed (bytes/second)
:ACS: Average Chunk Size (bytes)
The maximum performance you can get is::
MAX(ACS) = ACS /(AST + ACS/MRS)
Please note that chunk data is likely to be sequential arranged on disk, but
this it is sort of a best case assumption.
For a typical rotational disk, we assume the following values::
AST: 10ms
MRS: 170MB/s
MAX(4MB) = 115.37 MB/s
MAX(1MB) = 61.85 MB/s;
MAX(64KB) = 6.02 MB/s;
MAX(4KB) = 0.39 MB/s;
MAX(1KB) = 0.10 MB/s;
Modern SSD are much faster, lets assume the following::
max IOPS: 20000 => AST = 0.00005
MRS: 500Mb/s
MAX(4MB) = 474 MB/s
MAX(1MB) = 465 MB/s;
MAX(64KB) = 354 MB/s;
MAX(4KB) = 67 MB/s;
MAX(1KB) = 18 MB/s;
Also, the average chunk directly relates to the number of chunks produced by
a backup::
CHUNK_COUNT = BACKUP_SIZE / ACS
Here are some staticics from my developer worstation::
Disk Usage: 65 GB
Directories: 58971
Files: 726314
Files < 64KB: 617541
As you see, there are really many small files. If we would do file
level deduplication, i.e. generate one chunk per file, we end up with
more than 700000 chunks.
Instead, our current algorithm only produce large chunks with an
average chunks size of 4MB. With above data, this produce about 15000
chunks (factor 50 less chunks).

View File

@ -35,4 +35,3 @@ Chores:
Suggestions Suggestions
=========== ===========

1333
debian/changelog vendored

File diff suppressed because it is too large Load Diff

169
debian/control vendored
View File

@ -1,165 +1,118 @@
Source: rust-proxmox-backup Source: rust-proxmox-backup
Section: admin Section: admin
Priority: optional Priority: optional
Build-Depends: debhelper (>= 12), Build-Depends: debhelper (>= 11),
dh-cargo (>= 24), dh-cargo (>= 18),
cargo:native, cargo:native,
rustc:native, rustc:native,
libstd-rust-dev, libstd-rust-dev,
librust-anyhow-1+default-dev, librust-anyhow-1+default-dev,
librust-apt-pkg-native-0.3+default-dev (>= 0.3.2-~~), librust-apt-pkg-native-0.3+default-dev (>= 0.3.1-~~),
librust-base64-0.13+default-dev, librust-base64-0.12+default-dev,
librust-bitflags-1+default-dev (>= 1.2.1-~~), librust-bitflags-1+default-dev (>= 1.2.1-~~),
librust-bytes-1+default-dev, librust-bytes-0.5+default-dev,
librust-cidr-0.2+default-dev (>= 0.2.1-~~),
librust-crc32fast-1+default-dev, librust-crc32fast-1+default-dev,
librust-crossbeam-channel-0.5+default-dev, librust-crossbeam-channel-0.4+default-dev,
librust-endian-trait-0.6+arrays-dev, librust-endian-trait-0.6+arrays-dev,
librust-endian-trait-0.6+default-dev, librust-endian-trait-0.6+default-dev,
librust-env-logger-0.9+default-dev,
librust-flate2-1+default-dev,
librust-foreign-types-0.3+default-dev,
librust-futures-0.3+default-dev, librust-futures-0.3+default-dev,
librust-h2-0.3+default-dev, librust-h2-0.2+default-dev,
librust-h2-0.3+stream-dev, librust-h2-0.2+stream-dev,
librust-handlebars-3+default-dev, librust-handlebars-3+default-dev,
librust-hex-0.4+default-dev (>= 0.4.3-~~),
librust-hex-0.4+serde-dev (>= 0.4.3-~~),
librust-http-0.2+default-dev, librust-http-0.2+default-dev,
librust-hyper-0.14+default-dev (>= 0.14.5-~~), librust-hyper-0.13+default-dev (>= 0.13.6-~~),
librust-hyper-0.14+full-dev (>= 0.14.5-~~),
librust-lazy-static-1+default-dev (>= 1.4-~~), librust-lazy-static-1+default-dev (>= 1.4-~~),
librust-libc-0.2+default-dev, librust-libc-0.2+default-dev,
librust-log-0.4+default-dev (>= 0.4.17-~~) <!nocheck>, librust-log-0.4+default-dev,
librust-nix-0.24+default-dev, librust-nix-0.19+default-dev,
librust-nom-5+default-dev (>= 5.1-~~), librust-nom-5+default-dev (>= 5.1-~~),
librust-num-traits-0.2+default-dev, librust-num-traits-0.2+default-dev,
librust-once-cell-1+default-dev (>= 1.3.1-~~), librust-once-cell-1+default-dev (>= 1.3.1-~~),
librust-openssl-0.10+default-dev (>= 0.10.38-~~), librust-openssl-0.10+default-dev,
librust-pam-0.7+default-dev, librust-pam-0.7+default-dev,
librust-pam-sys-0.5+default-dev, librust-pam-sys-0.5+default-dev,
librust-pathpatterns-0.1+default-dev (>= 0.1.2-~~), librust-pathpatterns-0.1+default-dev (>= 0.1.2-~~),
librust-percent-encoding-2+default-dev (>= 2.1-~~), librust-percent-encoding-2+default-dev (>= 2.1-~~),
librust-pin-project-lite-0.2+default-dev, librust-pin-utils-0.1+default-dev,
librust-proxmox-acme-rs-0.4+default-dev, librust-proxmox-0.7+api-macro-dev,
librust-proxmox-apt-0.8+default-dev, librust-proxmox-0.7+default-dev,
librust-proxmox-async-0.4+default-dev, librust-proxmox-0.7+sortable-macro-dev,
librust-proxmox-borrow-1+default-dev, librust-proxmox-0.7+websocket-dev,
librust-proxmox-compression-0.1+default-dev (>= 0.1.1-~~), librust-proxmox-fuse-0.1+default-dev,
librust-proxmox-fuse-0.1+default-dev (>= 0.1.1-~~), librust-pxar-0.6+default-dev (>= 0.6.1-~~),
librust-proxmox-http-0.6+client-dev (>= 0.6.1-~~), librust-pxar-0.6+futures-io-dev (>= 0.6.1-~~),
librust-proxmox-http-0.6+default-dev (>= 0.6.1-~~), librust-pxar-0.6+tokio-io-dev (>= 0.6.1-~~),
librust-proxmox-http-0.6+http-helpers-dev (>= 0.6.1-~~), librust-regex-1+default-dev (>= 1.2-~~),
librust-proxmox-http-0.6+websocket-dev (>= 0.6.1-~~), librust-rustyline-6+default-dev,
librust-proxmox-io-1+default-dev (>= 1.0.1-~~),
librust-proxmox-io-1+tokio-dev (>= 1.0.1-~~),
librust-proxmox-lang-1+default-dev (>= 1.1-~~),
librust-proxmox-openid-0.9+default-dev,
librust-proxmox-router-1+cli-dev (>= 1.2-~~),
librust-proxmox-router-1+default-dev (>= 1.2.2-~~),
librust-proxmox-schema-1+api-macro-dev (>= 1.3.1-~~),
librust-proxmox-schema-1+default-dev (>= 1.3.1-~~),
librust-proxmox-schema-1+upid-api-impl-dev (>= 1.3.1-~~),
librust-proxmox-section-config-1+default-dev,
librust-proxmox-serde-0.1+default-dev,
librust-proxmox-shared-memory-0.2+default-dev,
librust-proxmox-sys-0.3+default-dev,
librust-proxmox-sys-0.3+logrotate-dev,
librust-proxmox-sys-0.3+sortable-macro-dev,
librust-proxmox-tfa-2+api-dev,
librust-proxmox-tfa-2+api-types-dev,
librust-proxmox-tfa-2+default-dev,
librust-proxmox-time-1+default-dev (>= 1.1.2-~~),
librust-proxmox-uuid-1+default-dev,
librust-proxmox-uuid-1+serde-dev,
librust-pxar-0.10+default-dev (>= 0.10.1-~~),
librust-pxar-0.10+tokio-io-dev (>= 0.10.1-~~),
librust-regex-1+default-dev (>= 1.5.5-~~),
librust-rustyline-9+default-dev,
librust-serde-1+default-dev, librust-serde-1+default-dev,
librust-serde-1+derive-dev, librust-serde-1+derive-dev,
librust-serde-cbor-0.11+default-dev (>= 0.11.1-~~),
librust-serde-json-1+default-dev, librust-serde-json-1+default-dev,
librust-siphasher-0.3+default-dev, librust-siphasher-0.3+default-dev,
librust-syslog-4+default-dev, librust-syslog-4+default-dev,
librust-thiserror-1+default-dev, librust-tokio-0.2+blocking-dev (>= 0.2.9-~~),
librust-tokio-1+default-dev (>= 1.6-~~), librust-tokio-0.2+default-dev (>= 0.2.9-~~),
librust-tokio-1+fs-dev (>= 1.6-~~), librust-tokio-0.2+dns-dev (>= 0.2.9-~~),
librust-tokio-1+io-std-dev (>= 1.6-~~), librust-tokio-0.2+fs-dev (>= 0.2.9-~~),
librust-tokio-1+io-util-dev (>= 1.6-~~), librust-tokio-0.2+io-util-dev (>= 0.2.9-~~),
librust-tokio-1+macros-dev (>= 1.6-~~), librust-tokio-0.2+macros-dev (>= 0.2.9-~~),
librust-tokio-1+net-dev (>= 1.6-~~), librust-tokio-0.2+process-dev (>= 0.2.9-~~),
librust-tokio-1+parking-lot-dev (>= 1.6-~~), librust-tokio-0.2+rt-threaded-dev (>= 0.2.9-~~),
librust-tokio-1+process-dev (>= 1.6-~~), librust-tokio-0.2+signal-dev (>= 0.2.9-~~),
librust-tokio-1+rt-dev (>= 1.6-~~), librust-tokio-0.2+stream-dev (>= 0.2.9-~~),
librust-tokio-1+rt-multi-thread-dev (>= 1.6-~~), librust-tokio-0.2+tcp-dev (>= 0.2.9-~~),
librust-tokio-1+signal-dev (>= 1.6-~~), librust-tokio-0.2+time-dev (>= 0.2.9-~~),
librust-tokio-1+sync-dev (>= 1.6-~~), librust-tokio-0.2+uds-dev (>= 0.2.9-~~),
librust-tokio-1+time-dev (>= 1.6-~~), librust-tokio-openssl-0.4+default-dev,
librust-tokio-openssl-0.6+default-dev (>= 0.6.1-~~), librust-tokio-util-0.3+codec-dev,
librust-tokio-stream-0.1+default-dev, librust-tokio-util-0.3+default-dev,
librust-tokio-util-0.7+codec-dev,
librust-tokio-util-0.7+default-dev,
librust-tokio-util-0.7+io-dev,
librust-tower-service-0.3+default-dev, librust-tower-service-0.3+default-dev,
librust-udev-0.4+default-dev, librust-udev-0.4+default-dev | librust-udev-0.3+default-dev,
librust-url-2+default-dev (>= 2.1-~~), librust-url-2+default-dev (>= 2.1-~~),
librust-walkdir-2+default-dev, librust-walkdir-2+default-dev,
librust-xdg-2+default-dev (>= 2.2-~~), librust-xdg-2+default-dev (>= 2.2-~~),
librust-zstd-0.6+bindgen-dev, librust-zstd-0.4+bindgen-dev,
librust-zstd-0.6+default-dev, librust-zstd-0.4+default-dev,
libacl1-dev, libacl1-dev,
libfuse3-dev, libfuse3-dev,
libsystemd-dev (>= 246-~~), libsystemd-dev,
uuid-dev, uuid-dev,
libsgutils2-dev,
bash-completion,
debhelper (>= 12~), debhelper (>= 12~),
bash-completion,
pve-eslint,
python3-docutils,
python3-pygments,
rsync,
fonts-dejavu-core <!nodoc>, fonts-dejavu-core <!nodoc>,
fonts-lato <!nodoc>, fonts-lato <!nodoc>,
fonts-open-sans <!nodoc>, fonts-open-sans <!nodoc>,
graphviz <!nodoc>, graphviz <!nodoc>,
latexmk <!nodoc>, latexmk <!nodoc>,
patchelf,
proxmox-widget-toolkit-dev <!nodoc>,
pve-eslint (>= 7.18.0-1),
python3-docutils,
python3-pygments,
python3-sphinx <!nodoc>, python3-sphinx <!nodoc>,
rsync,
texlive-fonts-extra <!nodoc>, texlive-fonts-extra <!nodoc>,
texlive-fonts-recommended <!nodoc>, texlive-fonts-recommended <!nodoc>,
texlive-xetex <!nodoc>, texlive-xetex <!nodoc>,
xindy <!nodoc> xindy <!nodoc>
Maintainer: Proxmox Support Team <support@proxmox.com> Maintainer: Proxmox Support Team <support@proxmox.com>
Standards-Version: 4.5.1 Standards-Version: 4.4.1
Vcs-Git: git://git.proxmox.com/git/proxmox-backup.git Vcs-Git:
Vcs-Browser: https://git.proxmox.com/?p=proxmox-backup.git;a=summary Vcs-Browser:
Homepage: https://www.proxmox.com Homepage: https://www.proxmox.com
Rules-Requires-Root: binary-targets
Package: proxmox-backup-server Package: proxmox-backup-server
Architecture: any Architecture: any
Depends: fonts-font-awesome, Depends: fonts-font-awesome,
libjs-extjs (>= 7~), libjs-extjs (>= 6.0.1),
libjs-qrcodejs (>= 1.20201119),
libproxmox-acme-plugins,
libsgutils2-2,
libzstd1 (>= 1.3.8), libzstd1 (>= 1.3.8),
lvm2, lvm2,
openssh-server,
pbs-i18n, pbs-i18n,
postfix | mail-transport-agent,
proxmox-backup-docs, proxmox-backup-docs,
proxmox-mini-journalreader, proxmox-mini-journalreader,
proxmox-widget-toolkit (>= 3.4-3), proxmox-widget-toolkit (>= 2.3-6),
pve-xtermjs (>= 4.7.0-1), pve-xtermjs (>= 4.7.0-1),
sg3-utils,
smartmontools, smartmontools,
${misc:Depends}, ${misc:Depends},
${shlibs:Depends}, ${shlibs:Depends},
Recommends: zfsutils-linux, Recommends: zfsutils-linux,
ifupdown2,
Description: Proxmox Backup Server daemon with tools and GUI Description: Proxmox Backup Server daemon with tools and GUI
This package contains the Proxmox Backup Server daemons and related This package contains the Proxmox Backup Server daemons and related
tools. This includes a web-based graphical user interface. tools. This includes a web-based graphical user interface.
@ -176,22 +129,8 @@ Description: Proxmox Backup Client tools
Package: proxmox-backup-docs Package: proxmox-backup-docs
Build-Profiles: <!nodoc> Build-Profiles: <!nodoc>
Section: doc Section: doc
Depends: fonts-font-awesome, Depends: libjs-extjs,
libjs-extjs,
libjs-mathjax,
${misc:Depends}, ${misc:Depends},
Architecture: all Architecture: all
Description: Proxmox Backup Documentation Description: Proxmox Backup Documentation
This package contains the Proxmox Backup Documentation files. This package contains the Proxmox Backup Documentation files.
Package: proxmox-backup-file-restore
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
Recommends: pve-qemu-kvm (>= 5.0.0-9),
proxmox-backup-restore-image,
Breaks: proxmox-backup-restore-image (<< 0.3.1)
Description: Proxmox Backup single file restore tools for pxar and block device backups
This package contains the Proxmox Backup single file restore client for
restoring individual files and folders from both host/container and VM/block
device backups. It includes a block device restore driver using QEMU.

36
debian/control.in vendored Normal file
View File

@ -0,0 +1,36 @@
Package: proxmox-backup-server
Architecture: any
Depends: fonts-font-awesome,
libjs-extjs (>= 6.0.1),
libzstd1 (>= 1.3.8),
lvm2,
pbs-i18n,
proxmox-backup-docs,
proxmox-mini-journalreader,
proxmox-widget-toolkit (>= 2.3-6),
pve-xtermjs (>= 4.7.0-1),
smartmontools,
${misc:Depends},
${shlibs:Depends},
Recommends: zfsutils-linux,
Description: Proxmox Backup Server daemon with tools and GUI
This package contains the Proxmox Backup Server daemons and related
tools. This includes a web-based graphical user interface.
Package: proxmox-backup-client
Architecture: any
Depends: qrencode,
${misc:Depends},
${shlibs:Depends},
Description: Proxmox Backup Client tools
This package contains the Proxmox Backup client, which provides a
simple command line tool to create and restore backups.
Package: proxmox-backup-docs
Build-Profiles: <!nodoc>
Section: doc
Depends: libjs-extjs,
${misc:Depends},
Architecture: all
Description: Proxmox Backup Documentation
This package contains the Proxmox Backup Documentation files.

2
debian/copyright vendored
View File

@ -1,4 +1,4 @@
Copyright (C) 2019 - 2021 Proxmox Server Solutions GmbH Copyright (C) 2019 Proxmox Server Solutions GmbH
This software is written by Proxmox Server Solutions GmbH <support@proxmox.com> This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>

42
debian/debcargo.toml vendored Normal file
View File

@ -0,0 +1,42 @@
overlay = "."
crate_src_path = ".."
whitelist = ["tests/*.c"]
# needed for pinutils alpha
allow_prerelease_deps = true
[source]
# TODO: update once public
vcs_git = ""
vcs_browser = ""
maintainer = "Proxmox Support Team <support@proxmox.com>"
section = "admin"
build_depends = [
"debhelper (>= 12~)",
"bash-completion",
"pve-eslint",
"python3-docutils",
"python3-pygments",
"rsync",
"fonts-dejavu-core <!nodoc>",
"fonts-lato <!nodoc>",
"fonts-open-sans <!nodoc>",
"graphviz <!nodoc>",
"latexmk <!nodoc>",
"python3-sphinx <!nodoc>",
"texlive-fonts-extra <!nodoc>",
"texlive-fonts-recommended <!nodoc>",
"texlive-xetex <!nodoc>",
"xindy <!nodoc>",
]
build_depends_excludes = [
"debhelper (>=11)",
]
[packages.lib]
depends = [
"libacl1-dev",
"libfuse3-dev",
"libsystemd-dev",
"uuid-dev",
]

View File

@ -1,2 +1,2 @@
proxmox-backup-server: package-installs-apt-sources etc/apt/sources.list.d/pbs-enterprise.list proxmox-backup-server: package-installs-apt-sources etc/apt/sources.list.d/pbstest-beta.list
proxmox-backup-server: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/proxmox-backup-banner.service getty.target proxmox-backup-server: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/proxmox-backup-banner.service getty.target

3
debian/pmt.bc vendored
View File

@ -1,3 +0,0 @@
# pmt bash completion
complete -C 'pmt bashcomplete' pmt

3
debian/pmtx.bc vendored
View File

@ -1,3 +0,0 @@
# pmtx bash completion
complete -C 'pmtx bashcomplete' pmtx

63
debian/postinst vendored
View File

@ -4,73 +4,36 @@ set -e
#DEBHELPER# #DEBHELPER#
update_sync_job() {
job="$1"
echo "Updating sync job '$job' to make old 'remove-vanished' default explicit.."
proxmox-backup-manager sync-job update "$job" --remove-vanished true \
|| echo "Failed, please check sync.cfg manually!"
}
case "$1" in case "$1" in
configure) configure)
# need to have user backup in the tape group
usermod -a -G tape backup
# modeled after dh_systemd_start output # modeled after dh_systemd_start output
systemctl --system daemon-reload >/dev/null || true systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then if [ -n "$2" ]; then
if dpkg --compare-versions "$2" 'lt' '1.0.7-1'; then
# there was an issue with reloading and systemd being confused in older daemon versions
# so restart instead of reload if upgrading from there, see commit 0ec79339f7aebf9
# FIXME: remove with PBS 2.1
echo "Upgrading from older proxmox-backup-server: restart (not reload) daemons"
_dh_action=try-restart
else
_dh_action=try-reload-or-restart _dh_action=try-reload-or-restart
fi
else else
_dh_action=start _dh_action=start
fi fi
deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true
# FIXME: Remove with 1.1
if test -n "$2"; then if test -n "$2"; then
if dpkg --compare-versions "$2" 'lt' '0.9.4-1'; then
if grep -s -q -P -e '^\s+verify-schedule ' /etc/proxmox-backup/datastore.cfg; then
echo "NOTE: drop all verify schedules from datastore config."
echo "You can now add more flexible verify jobs"
flock -w 30 /etc/proxmox-backup/.datastore.lck \
sed -i '/^\s\+verify-schedule /d' /etc/proxmox-backup/datastore.cfg || true
fi
fi
if dpkg --compare-versions "$2" 'le' '0.9.5-1'; then
chown --quiet backup:backup /var/log/proxmox-backup/api/auth.log || true
fi
fi
# FIXME: Remove in future version once we're sure no broken entries remain in anyone's files # FIXME: Remove in future version once we're sure no broken entries remain in anyone's files
if grep -q -e ':termproxy::[^@]\+: ' /var/log/proxmox-backup/tasks/active; then if grep -q -e ':termproxy::[^@]\+: ' /var/log/proxmox-backup/tasks/active; then
echo "Fixing up termproxy user id in task log..." echo "Fixing up termproxy user id in task log..."
flock -w 30 /var/log/proxmox-backup/tasks/active.lock sed -i 's/:termproxy::\([^@]\+\): /:termproxy::\1@pam: /' /var/log/proxmox-backup/tasks/active || true flock -w 30 /var/log/proxmox-backup/tasks/active.lock sed -i 's/:termproxy::\([^@]\+\): /:termproxy::\1@pam: /' /var/log/proxmox-backup/tasks/active || true
fi fi
if dpkg --compare-versions "$2" 'lt' '2.2.2~'; then
echo "moving prune schedule from datacenter config to new prune job config"
proxmox-backup-manager update-to-prune-jobs-config \
|| echo "Failed to move prune jobs, please check manually"
true
fi
if dpkg --compare-versions "$2" 'lt' '2.1.3~' && test -e /etc/proxmox-backup/sync.cfg; then
prev_job=""
# read from HERE doc because POSIX sh limitations
while read -r key value; do
if test "$key" = "sync:"; then
if test -n "$prev_job"; then
# previous job doesn't have an explicit value
update_sync_job "$prev_job"
fi
prev_job=$value
else
prev_job=""
fi
done <<EOF
$(grep -e '^sync:' -e 'remove-vanished' /etc/proxmox-backup/sync.cfg)
EOF
if test -n "$prev_job"; then
# last job doesn't have an explicit value
update_sync_job "$prev_job"
fi
fi
fi
;; ;;
abort-upgrade|abort-remove|abort-deconfigure) abort-upgrade|abort-remove|abort-deconfigure)

View File

@ -1,8 +0,0 @@
# proxmox-backup-debug bash completion
# see http://tiswww.case.edu/php/chet/bash/FAQ
# and __ltrim_colon_completions() in /usr/share/bash-completion/bash_completion
# this modifies global var, but I found no better way
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
complete -C 'proxmox-backup-debug bashcomplete' proxmox-backup-debug

View File

@ -1,6 +1,2 @@
/usr/share/doc/proxmox-backup/proxmox-backup.pdf /usr/share/doc/proxmox-backup/html/proxmox-backup.pdf /usr/share/doc/proxmox-backup/proxmox-backup.pdf /usr/share/doc/proxmox-backup/html/proxmox-backup.pdf
/usr/share/javascript/extjs /usr/share/doc/proxmox-backup/html/prune-simulator/extjs /usr/share/javascript/extjs /usr/share/doc/proxmox-backup/html/prune-simulator/extjs
/usr/share/javascript/extjs /usr/share/doc/proxmox-backup/html/lto-barcode/extjs
/usr/share/fonts-font-awesome/ /usr/share/doc/proxmox-backup/html/lto-barcode/font-awesome
/usr/share/javascript/extjs /usr/share/doc/proxmox-backup/html/api-viewer/extjs
/usr/share/javascript/mathjax /usr/share/doc/proxmox-backup/html/_static/mathjax

View File

@ -1 +0,0 @@
debian/proxmox-file-restore.bc proxmox-file-restore

View File

@ -1,8 +0,0 @@
# proxmox-file-restore bash completion
# see http://tiswww.case.edu/php/chet/bash/FAQ
# and __ltrim_colon_completions() in /usr/share/bash-completion/bash_completion
# this modifies global var, but I found no better way
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
complete -C 'proxmox-file-restore bashcomplete' proxmox-file-restore

View File

@ -1,4 +0,0 @@
usr/bin/proxmox-file-restore
usr/share/man/man1/proxmox-file-restore.1
usr/share/zsh/vendor-completions/_proxmox-file-restore
usr/lib/x86_64-linux-gnu/proxmox-backup/file-restore/proxmox-restore-daemon

View File

@ -1,74 +0,0 @@
#!/bin/sh
set -e
update_initramfs() {
# regenerate initramfs for single file restore VM
INST_PATH="/usr/lib/x86_64-linux-gnu/proxmox-backup/file-restore"
CACHE_PATH="/var/cache/proxmox-backup/file-restore-initramfs.img"
CACHE_PATH_DBG="/var/cache/proxmox-backup/file-restore-initramfs-debug.img"
# cleanup first, in case proxmox-file-restore was uninstalled since we do
# not want an unuseable image lying around
rm -f "$CACHE_PATH"
if [ ! -f "$INST_PATH/initramfs.img" ]; then
echo "proxmox-backup-restore-image is not installed correctly, skipping update" >&2
exit 0
fi
echo "Updating file-restore initramfs..."
# avoid leftover temp file
cleanup() {
rm -f "$CACHE_PATH.tmp" "$CACHE_PATH_DBG.tmp"
}
trap cleanup EXIT
mkdir -p "/var/cache/proxmox-backup"
cp "$INST_PATH/initramfs.img" "$CACHE_PATH.tmp"
# cpio uses passed in path as offset inside the archive as well, so we need
# to be in the same dir as the daemon binary to ensure it's placed in /
( cd "$INST_PATH"; \
printf "./proxmox-restore-daemon" \
| cpio -o --format=newc -A -F "$CACHE_PATH.tmp" )
mv -f "$CACHE_PATH.tmp" "$CACHE_PATH"
if [ -f "$INST_PATH/initramfs-debug.img" ]; then
echo "Updating file-restore debug initramfs..."
cp "$INST_PATH/initramfs-debug.img" "$CACHE_PATH_DBG.tmp"
( cd "$INST_PATH"; \
printf "./proxmox-restore-daemon" \
| cpio -o --format=newc -A -F "$CACHE_PATH_DBG.tmp" )
mv -f "$CACHE_PATH_DBG.tmp" "$CACHE_PATH_DBG"
fi
trap - EXIT
}
case "$1" in
configure)
# in case restore daemon was updated
update_initramfs
;;
triggered)
if [ "$2" = "proxmox-backup-restore-image-update" ]; then
# in case base-image was updated
update_initramfs
else
echo "postinst called with unknown trigger name: \`$2'" >&2
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0

View File

@ -1 +0,0 @@
interest-noawait proxmox-backup-restore-image-update

View File

@ -1,5 +1 @@
debian/proxmox-backup-manager.bc proxmox-backup-manager debian/proxmox-backup-manager.bc proxmox-backup-manager
debian/proxmox-backup-debug.bc proxmox-backup-debug
debian/proxmox-tape.bc proxmox-tape
debian/pmtx.bc pmtx
debian/pmt.bc pmt

View File

@ -3,38 +3,17 @@ etc/proxmox-backup.service /lib/systemd/system/
etc/proxmox-backup-banner.service /lib/systemd/system/ etc/proxmox-backup-banner.service /lib/systemd/system/
etc/proxmox-backup-daily-update.service /lib/systemd/system/ etc/proxmox-backup-daily-update.service /lib/systemd/system/
etc/proxmox-backup-daily-update.timer /lib/systemd/system/ etc/proxmox-backup-daily-update.timer /lib/systemd/system/
etc/pbs-enterprise.list /etc/apt/sources.list.d/ etc/pbstest-beta.list /etc/apt/sources.list.d/
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-banner usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-banner
usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-daily-update usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-daily-update
usr/lib/x86_64-linux-gnu/proxmox-backup/sg-tape-cmd
usr/sbin/proxmox-backup-debug
usr/sbin/proxmox-backup-manager usr/sbin/proxmox-backup-manager
usr/bin/pmtx
usr/bin/pmt
usr/bin/proxmox-tape
usr/share/javascript/proxmox-backup/index.hbs usr/share/javascript/proxmox-backup/index.hbs
usr/share/javascript/proxmox-backup/css/ext6-pbs.css usr/share/javascript/proxmox-backup/css/ext6-pbs.css
usr/share/javascript/proxmox-backup/images usr/share/javascript/proxmox-backup/images/logo-128.png
usr/share/javascript/proxmox-backup/images/proxmox_logo.png
usr/share/javascript/proxmox-backup/js/proxmox-backup-gui.js usr/share/javascript/proxmox-backup/js/proxmox-backup-gui.js
usr/share/man/man1/proxmox-backup-debug.1
usr/share/man/man1/proxmox-backup-manager.1 usr/share/man/man1/proxmox-backup-manager.1
usr/share/man/man1/proxmox-backup-proxy.1 usr/share/man/man1/proxmox-backup-proxy.1
usr/share/man/man1/proxmox-tape.1
usr/share/man/man1/pmtx.1
usr/share/man/man1/pmt.1
usr/share/man/man5/acl.cfg.5
usr/share/man/man5/datastore.cfg.5
usr/share/man/man5/user.cfg.5
usr/share/man/man5/remote.cfg.5
usr/share/man/man5/sync.cfg.5
usr/share/man/man5/verification.cfg.5
usr/share/man/man5/media-pool.cfg.5
usr/share/man/man5/tape.cfg.5
usr/share/man/man5/tape-job.cfg.5
usr/share/zsh/vendor-completions/_proxmox-backup-debug
usr/share/zsh/vendor-completions/_proxmox-backup-manager usr/share/zsh/vendor-completions/_proxmox-backup-manager
usr/share/zsh/vendor-completions/_proxmox-tape
usr/share/zsh/vendor-completions/_pmtx
usr/share/zsh/vendor-completions/_pmt

View File

@ -1 +0,0 @@
rm_conffile /etc/apt/sources.list.d/pbstest-beta.list 1.0.0~ proxmox-backup-server

View File

@ -1,18 +0,0 @@
# do not edit this file, it will be overwritten on update
# persistent storage links: /dev/tape/{by-id,by-path}
ACTION=="remove", GOTO="persistent_storage_tape_end"
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_tape_end"
# also see: /lib/udev/rules.d/60-persistent-storage-tape.rules
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="1", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $devnode", \
SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}-sg"
# iSCSI devices from the same host have all the same ID_SERIAL,
# but additionally a property named ID_SCSI_SERIAL.
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="1", ENV{ID_SCSI_SERIAL}=="?*", \
SYMLINK+="tape/by-id/scsi-$env{ID_SCSI_SERIAL}-sg"
LABEL="persistent_storage_tape_end"

View File

@ -1,3 +0,0 @@
# proxmox-tape bash completion
complete -C 'proxmox-tape bashcomplete' proxmox-tape

16
debian/rules vendored
View File

@ -42,18 +42,10 @@ override_dh_installsystemd:
# note: we start/try-reload-restart services manually in postinst # note: we start/try-reload-restart services manually in postinst
dh_installsystemd --no-start --no-restart-after-upgrade dh_installsystemd --no-start --no-restart-after-upgrade
override_dh_fixperms: # workaround https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933541
dh_fixperms --exclude sg-tape-cmd # TODO: remove once available (Debian 11 ?)
override_dh_dwz:
override_dh_strip: dh_dwz --no-dwz-multifile
dh_strip
for exe in $$(find \
debian/proxmox-backup-client/usr \
debian/proxmox-backup-server/usr \
debian/proxmox-backup-file-restore \
-executable -type f); do \
debian/scripts/elf-strip-unused-dependencies.sh "$$exe" || true; \
done
override_dh_compress: override_dh_compress:
dh_compress -X.pdf dh_compress -X.pdf

View File

@ -1,20 +0,0 @@
#!/bin/bash
binary=$1
exec 3< <(ldd -u "$binary" | grep -oP '[^/:]+$')
patchargs=""
dropped=""
while read -r dep; do
dropped="$dep $dropped"
patchargs="--remove-needed $dep $patchargs"
done <&3
exec 3<&-
if [[ $dropped == "" ]]; then
exit 0
fi
echo -e "patchelf '$binary' - removing unused dependencies:\n $dropped"
patchelf $patchargs $binary

View File

@ -5,7 +5,6 @@ LIBDIR = $(PREFIX)/lib
LIBEXECDIR = $(LIBDIR) LIBEXECDIR = $(LIBDIR)
DATAROOTDIR = $(PREFIX)/share DATAROOTDIR = $(PREFIX)/share
MAN1DIR = $(PREFIX)/share/man/man1 MAN1DIR = $(PREFIX)/share/man/man1
MAN5DIR = $(PREFIX)/share/man/man5
DOCDIR = $(PREFIX)/share/doc/proxmox-backup DOCDIR = $(PREFIX)/share/doc/proxmox-backup
JSDIR = $(DATAROOTDIR)/javascript/proxmox-backup JSDIR = $(DATAROOTDIR)/javascript/proxmox-backup
SYSCONFDIR = /etc SYSCONFDIR = /etc

View File

@ -1,82 +1,24 @@
include ../defines.mk include ../defines.mk
GENERATED_SYNOPSIS := \ GENERATED_SYNOPSIS := \
proxmox-tape/synopsis.rst \
proxmox-backup-client/synopsis.rst \ proxmox-backup-client/synopsis.rst \
proxmox-backup-client/catalog-shell-synopsis.rst \ proxmox-backup-client/catalog-shell-synopsis.rst \
proxmox-backup-manager/synopsis.rst \ proxmox-backup-manager/synopsis.rst \
proxmox-backup-debug/synopsis.rst \
proxmox-file-restore/synopsis.rst \
pxar/synopsis.rst \ pxar/synopsis.rst \
pmtx/synopsis.rst \ backup-protocol-api.rst \
pmt/synopsis.rst \ reader-protocol-api.rst
config/media-pool/config.rst \
config/tape/config.rst \
config/tape-job/config.rst \
config/user/config.rst \
config/remote/config.rst \
config/sync/config.rst \
config/verification/config.rst \
config/acl/roles.rst \
config/datastore/config.rst
MAN1_PAGES := \ MANUAL_PAGES := \
pxar.1 \ pxar.1 \
pmtx.1 \
pmt.1 \
proxmox-tape.1 \
proxmox-backup-proxy.1 \ proxmox-backup-proxy.1 \
proxmox-backup-client.1 \ proxmox-backup-client.1 \
proxmox-backup-manager.1 \ proxmox-backup-manager.1
proxmox-file-restore.1 \
proxmox-backup-debug.1
MAN5_PAGES := \
media-pool.cfg.5 \
tape.cfg.5 \
tape-job.cfg.5 \
acl.cfg.5 \
user.cfg.5 \
remote.cfg.5 \
sync.cfg.5 \
verification.cfg.5 \
datastore.cfg.5
PRUNE_SIMULATOR_FILES := \ PRUNE_SIMULATOR_FILES := \
prune-simulator/index.html \ prune-simulator/index.html \
prune-simulator/documentation.html \ prune-simulator/documentation.html \
prune-simulator/clear-trigger.png \
prune-simulator/prune-simulator.js prune-simulator/prune-simulator.js
PRUNE_SIMULATOR_JS_SOURCE := \
/usr/share/javascript/proxmox-widget-toolkit-dev/Toolkit.js \
prune-simulator/prune-simulator_source.js
LTO_BARCODE_JS_SOURCE := \
/usr/share/javascript/proxmox-widget-toolkit-dev/Toolkit.js \
lto-barcode/code39.js \
lto-barcode/prefix-field.js \
lto-barcode/label-style.js \
lto-barcode/tape-type.js \
lto-barcode/paper-size.js \
lto-barcode/page-layout.js \
lto-barcode/page-calibration.js \
lto-barcode/label-list.js \
lto-barcode/label-setup.js \
lto-barcode/lto-barcode.js
LTO_BARCODE_FILES := \
lto-barcode/index.html \
lto-barcode/lto-barcode-generator.js
API_VIEWER_SOURCES= \
api-viewer/index.html \
api-viewer/apidoc.js
API_VIEWER_FILES := \
api-viewer/apidata.js \
/usr/share/javascript/proxmox-widget-toolkit-dev/APIViewer.js \
# Sphinx documentation setup # Sphinx documentation setup
SPHINXOPTS = SPHINXOPTS =
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
@ -93,7 +35,15 @@ endif
# Sphinx internal variables. # Sphinx internal variables.
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) . ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
all: ${MAN1_PAGES} ${MAN5_PAGES} all: ${MANUAL_PAGES}
# Extract backup protocol docs
backup-protocol-api.rst: ${COMPILEDIR}/dump-backup-api
${COMPILEDIR}/dump-backup-api >$@
# Extract reader protocol docs
reader-protocol-api.rst: ${COMPILEDIR}/dump-reader-api
${COMPILEDIR}/dump-backup-api >$@
# Build manual pages using rst2man # Build manual pages using rst2man
@ -103,80 +53,6 @@ pxar/synopsis.rst: ${COMPILEDIR}/pxar
pxar.1: pxar/man1.rst pxar/description.rst pxar/synopsis.rst pxar.1: pxar/man1.rst pxar/description.rst pxar/synopsis.rst
rst2man $< >$@ rst2man $< >$@
pmtx/synopsis.rst: ${COMPILEDIR}/pmtx
${COMPILEDIR}/pmtx printdoc > pmtx/synopsis.rst
pmtx.1: pmtx/man1.rst pmtx/description.rst pmtx/synopsis.rst
rst2man $< >$@
pmt/synopsis.rst: ${COMPILEDIR}/pmt
${COMPILEDIR}/pmt printdoc > pmt/synopsis.rst
pmt.1: pmt/man1.rst pmt/description.rst pmt/options.rst pmt/synopsis.rst
rst2man $< >$@
config/datastore/config.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen datastore.cfg >$@
datastore.cfg.5: config/datastore/man5.rst config/datastore/config.rst config/datastore/format.rst
rst2man $< >$@
config/user/config.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen user.cfg >$@
user.cfg.5: config/user/man5.rst config/user/config.rst config/user/format.rst
rst2man $< >$@
config/remote/config.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen remote.cfg >$@
remote.cfg.5: config/remote/man5.rst config/remote/config.rst config/remote/format.rst
rst2man $< >$@
config/sync/config.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen sync.cfg >$@
sync.cfg.5: config/sync/man5.rst config/sync/config.rst config/sync/format.rst
rst2man $< >$@
config/verification/config.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen verification.cfg >$@
verification.cfg.5: config/verification/man5.rst config/verification/config.rst config/verification/format.rst
rst2man $< >$@
config/acl/roles.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen "config::acl::Role" >$@
acl.cfg.5: config/acl/man5.rst config/acl/roles.rst config/acl/format.rst
rst2man $< >$@
config/media-pool/config.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen media-pool.cfg >$@
media-pool.cfg.5: config/media-pool/man5.rst config/media-pool/config.rst config/media-pool/format.rst
rst2man $< >$@
config/tape/config.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen tape.cfg >$@
tape.cfg.5: config/tape/man5.rst config/tape/config.rst config/tape/format.rst
rst2man $< >$@
config/tape-job/config.rst: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen tape-job.cfg >$@
tape-job.cfg.5: config/tape-job/man5.rst config/tape-job/config.rst config/tape-job/format.rst
rst2man $< >$@
proxmox-tape/synopsis.rst: ${COMPILEDIR}/proxmox-tape
${COMPILEDIR}/proxmox-tape printdoc > proxmox-tape/synopsis.rst
proxmox-tape.1: proxmox-tape/man1.rst proxmox-tape/description.rst proxmox-tape/synopsis.rst
rst2man $< >$@
proxmox-backup-client/synopsis.rst: ${COMPILEDIR}/proxmox-backup-client proxmox-backup-client/synopsis.rst: ${COMPILEDIR}/proxmox-backup-client
${COMPILEDIR}/proxmox-backup-client printdoc > proxmox-backup-client/synopsis.rst ${COMPILEDIR}/proxmox-backup-client printdoc > proxmox-backup-client/synopsis.rst
@ -195,49 +71,18 @@ proxmox-backup-manager.1: proxmox-backup-manager/man1.rst proxmox-backup-manage
proxmox-backup-proxy.1: proxmox-backup-proxy/man1.rst proxmox-backup-proxy/description.rst proxmox-backup-proxy.1: proxmox-backup-proxy/man1.rst proxmox-backup-proxy/description.rst
rst2man $< >$@ rst2man $< >$@
proxmox-file-restore/synopsis.rst: ${COMPILEDIR}/proxmox-file-restore
${COMPILEDIR}/proxmox-file-restore printdoc > proxmox-file-restore/synopsis.rst
proxmox-file-restore.1: proxmox-file-restore/man1.rst proxmox-file-restore/description.rst proxmox-file-restore/synopsis.rst
rst2man $< >$@
proxmox-backup-debug/synopsis.rst: ${COMPILEDIR}/proxmox-backup-debug
${COMPILEDIR}/proxmox-backup-debug printdoc > proxmox-backup-debug/synopsis.rst
proxmox-backup-debug.1: proxmox-backup-debug/man1.rst proxmox-backup-debug/description.rst proxmox-backup-debug/synopsis.rst
rst2man $< >$@
.PHONY: onlinehelpinfo .PHONY: onlinehelpinfo
onlinehelpinfo: onlinehelpinfo:
@echo "Generating OnlineHelpInfo.js..." @echo "Generating OnlineHelpInfo.js..."
$(SPHINXBUILD) -b proxmox-scanrefs -Q $(ALLSPHINXOPTS) $(BUILDDIR)/scanrefs $(SPHINXBUILD) -b proxmox-scanrefs $(ALLSPHINXOPTS) $(BUILDDIR)/scanrefs
@echo "Build finished. OnlineHelpInfo.js is in $(BUILDDIR)/scanrefs." @echo "Build finished. OnlineHelpInfo.js is in $(BUILDDIR)/scanrefs."
api-viewer/apidata.js: ${COMPILEDIR}/docgen
${COMPILEDIR}/docgen apidata.js >$@
api-viewer/apidoc.js: ${API_VIEWER_FILES}
cat ${API_VIEWER_FILES} >$@.tmp
mv $@.tmp $@
prune-simulator/prune-simulator.js: ${PRUNE_SIMULATOR_JS_SOURCE}
cat ${PRUNE_SIMULATOR_JS_SOURCE} >$@.tmp
mv $@.tmp $@
lto-barcode/lto-barcode-generator.js: ${LTO_BARCODE_JS_SOURCE}
cat ${LTO_BARCODE_JS_SOURCE} >$@.tmp
mv $@.tmp $@
.PHONY: html .PHONY: html
html: ${GENERATED_SYNOPSIS} images/proxmox-logo.svg custom.css conf.py ${PRUNE_SIMULATOR_FILES} ${LTO_BARCODE_FILES} ${API_VIEWER_SOURCES} html: ${GENERATED_SYNOPSIS} images/proxmox-logo.svg custom.css conf.py ${PRUNE_SIMULATOR_FILES}
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
install -m 0644 custom.js custom.css images/proxmox-logo.svg $(BUILDDIR)/html/_static/ install -m 0644 custom.js custom.css images/proxmox-logo.svg $(BUILDDIR)/html/_static/
install -dm 0755 $(BUILDDIR)/html/prune-simulator install -dm 0755 $(BUILDDIR)/html/prune-simulator
install -m 0644 ${PRUNE_SIMULATOR_FILES} $(BUILDDIR)/html/prune-simulator install -m 0644 ${PRUNE_SIMULATOR_FILES} $(BUILDDIR)/html/prune-simulator
install -dm 0755 $(BUILDDIR)/html/lto-barcode
install -m 0644 ${LTO_BARCODE_FILES} $(BUILDDIR)/html/lto-barcode
install -dm 0755 $(BUILDDIR)/html/api-viewer
install -m 0644 ${API_VIEWER_SOURCES} $(BUILDDIR)/html/api-viewer
@echo @echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html." @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@ -256,15 +101,12 @@ epub3: ${GENERATED_SYNOPSIS}
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
clean: clean:
rm -r -f *~ *.1 ${BUILDDIR} ${GENERATED_SYNOPSIS} api-viewer/apidata.js rm -r -f *~ *.1 ${BUILDDIR} ${GENERATED_SYNOPSIS}
rm -f api-viewer/apidoc.js lto-barcode/lto-barcode-generator.js prune-simulator/prune-simulator.js
install_manual_pages: ${MAN1_PAGES} ${MAN5_PAGES} install_manual_pages: ${MANUAL_PAGES}
install -dm755 $(DESTDIR)$(MAN1DIR) install -dm755 $(DESTDIR)$(MAN1DIR)
for i in ${MAN1_PAGES}; do install -m755 $$i $(DESTDIR)$(MAN1DIR)/ ; done for i in ${MANUAL_PAGES}; do install -m755 $$i $(DESTDIR)$(MAN1DIR)/ ; done
install -dm755 $(DESTDIR)$(MAN5DIR)
for i in ${MAN5_PAGES}; do install -m755 $$i $(DESTDIR)$(MAN5DIR)/ ; done
install_html: html install_html: html
install -dm755 $(DESTDIR)$(DOCDIR) install -dm755 $(DESTDIR)$(DOCDIR)

View File

@ -44,7 +44,7 @@ def scan_extjs_files(wwwdir="../www"): # a bit rough i know, but we can optimize
js_files.append(os.path.join(root, filename)) js_files.append(os.path.join(root, filename))
for js_file in js_files: for js_file in js_files:
fd = open(js_file).read() fd = open(js_file).read()
allmatch = re.findall("(?:onlineHelp:|get_help_tool\s*\()\s*[\'\"](.*?)[\'\"]", fd, re.M) allmatch = re.findall("onlineHelp:\s*[\'\"](.*?)[\'\"]", fd, re.M)
for match in allmatch: for match in allmatch:
anchor = match anchor = match
anchor = re.sub('_', '-', anchor) # normalize labels anchor = re.sub('_', '-', anchor) # normalize labels
@ -73,9 +73,7 @@ class ReflabelMapper(Builder):
'link': '/docs/index.html', 'link': '/docs/index.html',
'title': 'Proxmox Backup Server Documentation Index', 'title': 'Proxmox Backup Server Documentation Index',
} }
# Disabled until we find a sensible way to scan proxmox-widget-toolkit self.env.used_anchors = scan_extjs_files()
# as well
#self.env.used_anchors = scan_extjs_files()
if not os.path.isdir(self.outdir): if not os.path.isdir(self.outdir):
os.mkdir(self.outdir) os.mkdir(self.outdir)
@ -90,25 +88,11 @@ class ReflabelMapper(Builder):
if hasattr(node, 'expect_referenced_by_id') and len(node['ids']) > 1: # explicit labels if hasattr(node, 'expect_referenced_by_id') and len(node['ids']) > 1: # explicit labels
filename = self.env.doc2path(docname) filename = self.env.doc2path(docname)
filename_html = re.sub('.rst', '.html', filename) filename_html = re.sub('.rst', '.html', filename)
labelid = node['ids'][1] # [0] is predefined by sphinx, we need [1] for explicit ones
# node['ids'][0] contains a normalized version of the
# headline. If the ref and headline are the same
# (normalized) sphinx will set the node['ids'][1] to a
# generic id in the format `idX` where X is numeric. If the
# ref and headline are not the same, the ref name will be
# stored in node['ids'][1]
if re.match('^id[0-9]*$', node['ids'][1]):
labelid = node['ids'][0]
else:
labelid = node['ids'][1]
title = cast(nodes.title, node[0]) title = cast(nodes.title, node[0])
logger.info('traversing section {}'.format(title.astext())) logger.info('traversing section {}'.format(title.astext()))
ref_name = getattr(title, 'rawsource', title.astext()) ref_name = getattr(title, 'rawsource', title.astext())
if (ref_name[:7] == ':term:`'):
ref_name = ref_name[7:-1]
self.env.online_help[labelid] = {'link': '', 'title': ''} self.env.online_help[labelid] = {'link': '', 'title': ''}
self.env.online_help[labelid]['link'] = "/docs/" + os.path.basename(filename_html) + "#{}".format(labelid) self.env.online_help[labelid]['link'] = "/docs/" + os.path.basename(filename_html) + "#{}".format(labelid)
self.env.online_help[labelid]['title'] = ref_name self.env.online_help[labelid]['title'] = ref_name
@ -128,18 +112,15 @@ class ReflabelMapper(Builder):
def validate_anchors(self): def validate_anchors(self):
#pprint(self.env.online_help) #pprint(self.env.online_help)
to_remove = [] to_remove = []
for anchor in self.env.used_anchors:
# Disabled until we find a sensible way to scan proxmox-widget-toolkit if anchor not in self.env.online_help:
# as well logger.info("[-] anchor {} is missing from onlinehelp!".format(anchor))
#for anchor in self.env.used_anchors: for anchor in self.env.online_help:
# if anchor not in self.env.online_help: if anchor not in self.env.used_anchors and anchor != 'pbs_documentation_index':
# logger.info("[-] anchor {} is missing from onlinehelp!".format(anchor)) logger.info("[*] anchor {} not used! deleting...".format(anchor))
#for anchor in self.env.online_help: to_remove.append(anchor)
# if anchor not in self.env.used_anchors and anchor != 'pbs_documentation_index': for anchor in to_remove:
# logger.info("[*] anchor {} not used! deleting...".format(anchor)) self.env.online_help.pop(anchor, None)
# to_remove.append(anchor)
#for anchor in to_remove:
# self.env.online_help.pop(anchor, None)
return return
def finish(self): def finish(self):

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Proxmox Backup Server API Documentation</title>
<link rel="stylesheet" type="text/css" href="extjs/theme-crisp/resources/theme-crisp-all.css">
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript" src="apidoc.js"></script>
</head>
<body></body>
</html>

View File

@ -1,33 +1,30 @@
Backup Client Usage Backup Client Usage
=================== ===================
The command line client for Proxmox Backup Server is called The command line client is called :command:`proxmox-backup-client`.
:command:`proxmox-backup-client`.
.. _client_repository:
Backup Repository Locations Repository Locations
--------------------------- --------------------
The client uses the following format to specify a datastore repository The client uses the following notation to specify a datastore repository
on the backup server (where username is specified in the form of user@realm): on the backup server.
[[username@]server[:port]:]datastore [[username@]server[:port]:]datastore
The default value for ``username`` is ``root@pam``. If no server is specified, The default value for ``username`` is ``root@pam``. If no server is specified,
the default is the local host (``localhost``). the default is the local host (``localhost``).
You can specify a port if your backup server is only reachable on a non-default You can specify a port if your backup server is only reachable on a different
port (for example, with NAT and port forwarding configurations). port (e.g. with NAT and port forwarding).
Note that if the server uses an IPv6 address, you have to write it with square Note that if the server is an IPv6 address, you have to write it with square
brackets (for example, `[fe80::01]`). brackets (for example, `[fe80::01]`).
You can pass the repository with the ``--repository`` command line option, or You can pass the repository with the ``--repository`` command line option, or
by setting the ``PBS_REPOSITORY`` environment variable. by setting the ``PBS_REPOSITORY`` environment variable.
Below are some examples of valid repositories and their corresponding real Here some examples of valid repositories and the real values
values:
================================ ================== ================== =========== ================================ ================== ================== ===========
Example User Host:Port Datastore Example User Host:Port Datastore
@ -48,54 +45,61 @@ Environment Variables
The default backup repository. The default backup repository.
``PBS_PASSWORD`` ``PBS_PASSWORD``
When set, this value is used as the password for the backup server. When set, this value is used for the password required for the backup server.
You can also set this to an API token secret. You can also set this to a API token secret.
``PBS_PASSWORD_FD``, ``PBS_PASSWORD_FILE``, ``PBS_PASSWORD_CMD``
Like ``PBS_PASSWORD``, but read data from an open file descriptor, a file
name or from the `stdout` of a command, respectively. The first defined
environment variable from the order above is preferred.
``PBS_ENCRYPTION_PASSWORD`` ``PBS_ENCRYPTION_PASSWORD``
When set, this value is used to access the secret encryption key (if When set, this value is used to access the secret encryption key (if
protected by password). protected by password).
``PBS_ENCRYPTION_PASSWORD_FD``, ``PBS_ENCRYPTION_PASSWORD_FILE``, ``PBS_ENCRYPTION_PASSWORD_CMD`` ``PBS_FINGERPRINT`` When set, this value is used to verify the server
Like ``PBS_ENCRYPTION_PASSWORD``, but read data from an open file descriptor, certificate (only used if the system CA certificates cannot validate the
a file name or from the `stdout` of a command, respectively. The first certificate).
defined environment variable from the order above is preferred.
``PBS_FINGERPRINT``
When set, this value is used to verify the server certificate (only used if
the system CA certificates cannot validate the certificate).
.. Note:: Passwords must be valid UTF-8 and may not contain newlines. For your
convenience, Proxmox Backup Server only uses the first line as password, so
you can add arbitrary comments after the first newline.
Output Format Output Format
------------- -------------
.. include:: output-format.rst Most commands support the ``--output-format`` parameter. It accepts
the following values:
:``text``: Text format (default). Structured data is rendered as a table.
:``json``: JSON (single line).
:``json-pretty``: JSON (multiple lines, nicely formatted).
.. _client_creating_backups: Please use the following environment variables to modify output behavior:
``PROXMOX_OUTPUT_FORMAT``
Defines the default output format.
``PROXMOX_OUTPUT_NO_BORDER``
If set (to any value), do not render table borders.
``PROXMOX_OUTPUT_NO_HEADER``
If set (to any value), do not render table headers.
.. note:: The ``text`` format is designed to be human readable, and
not meant to be parsed by automation tools. Please use the ``json``
format if you need to process the output.
.. _creating-backups:
Creating Backups Creating Backups
---------------- ----------------
This section explains how to create a backup from within the machine. This can This section explains how to create a backup from within the machine. This can
be a physical host, a virtual machine, or a container. Such backups may contain be a physical host, a virtual machine, or a container. Such backups may contain file
file and image archives. There are no restrictions in this case. and image archives. There are no restrictions in this case.
.. Note:: If you want to backup virtual machines or containers on Proxmox VE, .. note:: If you want to backup virtual machines or containers on Proxmox VE, see :ref:`pve-integration`.
see :ref:`pve-integration`.
For the following example, you need to have a backup server set up, have working For the following example you need to have a backup server set up, working
credentials, and know the repository name. credentials and need to know the repository name.
In the following examples, we use ``backup-server:store1``. In the following examples we use ``backup-server:store1``.
.. code-block:: console .. code-block:: console
@ -109,32 +113,32 @@ In the following examples, we use ``backup-server:store1``.
Uploaded 12129 chunks in 87 seconds (564 MB/s). Uploaded 12129 chunks in 87 seconds (564 MB/s).
End Time: 2019-12-03T10:36:29+01:00 End Time: 2019-12-03T10:36:29+01:00
This will prompt you for a password, then upload a file archive named This will prompt you for a password and then uploads a file archive named
``root.pxar`` containing all the files in the ``/`` directory. ``root.pxar`` containing all the files in the ``/`` directory.
.. Caution:: Please note that proxmox-backup-client does not .. Caution:: Please note that the proxmox-backup-client does not
automatically include mount points. Instead, you will see a short automatically include mount points. Instead, you will see a short
``skip mount point`` message for each of them. The idea is to ``skip mount point`` notice for each of them. The idea is to
create a separate file archive for each mounted disk. You can create a separate file archive for each mounted disk. You can
explicitly include them using the ``--include-dev`` option explicitly include them using the ``--include-dev`` option
(i.e. ``--include-dev /boot/efi``). You can use this option (i.e. ``--include-dev /boot/efi``). You can use this option
multiple times for each mount point that should be included. multiple times for each mount point that should be included.
The ``--repository`` option can get quite long and is used by all commands. You The ``--repository`` option can get quite long and is used by all
can avoid having to enter this value by setting the environment variable commands. You can avoid having to enter this value by setting the
``PBS_REPOSITORY``. Note that if you would like this to remain set over environment variable ``PBS_REPOSITORY``. Note that if you would like this to remain set
multiple sessions, you should instead add the below line to your ``.bashrc`` over multiple sessions, you should instead add the below line to your
file. ``.bashrc`` file.
.. code-block:: console .. code-block:: console
# export PBS_REPOSITORY=backup-server:store1 # export PBS_REPOSITORY=backup-server:store1
After this, you can execute all commands without having to specify the After this you can execute all commands without specifying the ``--repository``
``--repository`` option. option.
A single backup is allowed to contain more than one archive. For example, if One single backup is allowed to contain more than one archive. For example, if
you want to back up two disks mounted at ``/mnt/disk1`` and ``/mnt/disk2``: you want to backup two disks mounted at ``/mnt/disk1`` and ``/mnt/disk2``:
.. code-block:: console .. code-block:: console
@ -142,71 +146,59 @@ you want to back up two disks mounted at ``/mnt/disk1`` and ``/mnt/disk2``:
This creates a backup of both disks. This creates a backup of both disks.
If you want to use a namespace for the backup target you can add the `--ns` The backup command takes a list of backup specifications, which
parameter: include the archive name on the server, the type of the archive, and the
archive source at the client. The format is:
.. code-block:: console
# proxmox-backup-client backup disk1.pxar:/mnt/disk1 disk2.pxar:/mnt/disk2 --ns a/b/c
The backup command takes a list of backup specifications, which include the
archive name on the server, the type of the archive, and the archive source at
the client. The format is:
<archive-name>.<type>:<source-path> <archive-name>.<type>:<source-path>
Common types are ``.pxar`` for file archives and ``.img`` for block Common types are ``.pxar`` for file archives, and ``.img`` for block
device images. To create a backup of a block device, run the following command: device images. To create a backup of a block device run the following command:
.. code-block:: console .. code-block:: console
# proxmox-backup-client backup mydata.img:/dev/mylvm/mydata # proxmox-backup-client backup mydata.img:/dev/mylvm/mydata
Excluding Files/Directories from a Backup Excluding files/folders from a backup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sometimes it is desired to exclude certain files or directories from a backup Sometimes it is desired to exclude certain files or folders from a backup archive.
archive. To tell the Proxmox Backup client when and how to ignore files and To tell the Proxmox Backup client when and how to ignore files and directories,
directories, place a text file named ``.pxarexclude`` in the filesystem place a text file called ``.pxarexclude`` in the filesystem hierarchy.
hierarchy. Whenever the backup client encounters such a file in a directory, Whenever the backup client encounters such a file in a directory, it interprets
it interprets each line as a glob match pattern for files and directories that each line as glob match patterns for files and directories that are to be excluded
are to be excluded from the backup. from the backup.
The file must contain a single glob pattern per line. Empty lines and lines The file must contain a single glob pattern per line. Empty lines are ignored.
starting with ``#`` (indicating a comment) are ignored. The same is true for lines starting with ``#``, which indicates a comment.
A ``!`` at the beginning of a line reverses the glob match pattern from an A ``!`` at the beginning of a line reverses the glob match pattern from an exclusion
exclusion to an explicit inclusion. This makes it possible to exclude all to an explicit inclusion. This makes it possible to exclude all entries in a
entries in a directory except for a few single files/subdirectories. directory except for a few single files/subdirectories.
Lines ending in ``/`` match only on directories. Lines ending in ``/`` match only on directories.
The directory containing the ``.pxarexclude`` file is considered to be the root The directory containing the ``.pxarexclude`` file is considered to be the root of
of the given patterns. It is only possible to match files in this directory and the given patterns. It is only possible to match files in this directory and its subdirectories.
its subdirectories.
.. Note:: Patterns without a leading ``/`` will also match in subdirectories,
while patterns with a leading ``/`` will only match in the current directory.
``\`` is used to escape special glob characters. ``\`` is used to escape special glob characters.
``?`` matches any single character. ``?`` matches any single character.
``*`` matches any character, including an empty string. ``*`` matches any character, including an empty string.
``**`` is used to match current directory and subdirectories. For example, with ``**`` is used to match subdirectories. It can be used to, for example, exclude
the pattern ``**/*.tmp``, it would exclude all files ending in ``.tmp`` within all files ending in ``.tmp`` within the directory or subdirectories with the
a directory and its subdirectories. following pattern ``**/*.tmp``.
``[...]`` matches a single character from any of the provided characters within ``[...]`` matches a single character from any of the provided characters within
the brackets. ``[!...]`` does the complementary and matches any single the brackets. ``[!...]`` does the complementary and matches any single character
character not contained within the brackets. It is also possible to specify not contained within the brackets. It is also possible to specify ranges with two
ranges with two characters separated by ``-``. For example, ``[a-z]`` matches characters separated by ``-``. For example, ``[a-z]`` matches any lowercase
any lowercase alphabetic character, and ``[0-9]`` matches any single digit. alphabetic character and ``[0-9]`` matches any one single digit.
The order of the glob match patterns defines whether a file is included or The order of the glob match patterns defines whether a file is included or
excluded, that is to say, later entries override earlier ones. excluded, that is to say later entries override previous ones.
This is also true for match patterns encountered deeper down the directory This is also true for match patterns encountered deeper down the directory tree,
tree, which can override a previous exclusion. which can override a previous exclusion.
Be aware that excluded directories will **not** be read by the backup client.
.. Note:: Excluded directories will **not** be read by the backup client. Thus, Thus, a ``.pxarexclude`` file in an excluded subdirectory will have no effect.
a ``.pxarexclude`` file in an excluded subdirectory will have no effect. ``.pxarexclude`` files are treated as regular files and will be included in the
``.pxarexclude`` files are treated as regular files and will be included in backup archive.
the backup archive.
For example, consider the following directory structure: For example, consider the following directory structure:
@ -254,7 +246,7 @@ Restoring this backup will result in:
. .. file2 . .. file2
.. _client_encryption: .. _encryption:
Encryption Encryption
---------- ----------
@ -294,7 +286,7 @@ You can avoid entering the passwords by setting the environment
variables ``PBS_PASSWORD`` and ``PBS_ENCRYPTION_PASSWORD``. variables ``PBS_PASSWORD`` and ``PBS_ENCRYPTION_PASSWORD``.
Using a Master Key to Store and Recover Encryption Keys Using a master key to store and recover encryption keys
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can also use ``proxmox-backup-client key`` to create an RSA public/private You can also use ``proxmox-backup-client key`` to create an RSA public/private
@ -361,10 +353,8 @@ To set up a master key:
.. code-block:: console .. code-block:: console
# proxmox-backup-client key import-with-master-key /path/to/target --master-keyfile /path/to/master-private.pem --encrypted-keyfile /path/to/rsa-encrypted.key # openssl rsautl -decrypt -inkey master-private.pem -in rsa-encrypted.key -out /path/to/target
Master Key Password: ****** Enter pass phrase for ./master-private.pem: *********
New Password: ******
Verify Password: ******
7. The target file will now contain the encryption key information in plain 7. The target file will now contain the encryption key information in plain
text. The success of this can be confirmed by passing the resulting ``json`` text. The success of this can be confirmed by passing the resulting ``json``
@ -374,39 +364,26 @@ To set up a master key:
keep keys ordered and in a place that is separate from the contents being keep keys ordered and in a place that is separate from the contents being
backed up. It can happen, for example, that you back up an entire system, using backed up. It can happen, for example, that you back up an entire system, using
a key on that system. If the system then becomes inaccessible for any reason a key on that system. If the system then becomes inaccessible for any reason
and needs to be restored, this will not be possible, as the encryption key will be and needs to be restored, this will not be possible as the encryption key will be
lost along with the broken system. lost along with the broken system. In preparation for the worst case scenario,
you should consider keeping a paper copy of this key locked away in
It is recommended that you keep your master key safe, but easily accessible, in a safe place.
order for quick disaster recovery. For this reason, the best place to store it
is in your password manager, where it is immediately recoverable. As a backup to
this, you should also save the key to a USB drive and store that in a secure
place. This way, it is detached from any system, but is still easy to recover
from, in case of emergency. Finally, in preparation for the worst case scenario,
you should also consider keeping a paper copy of your master key locked away in
a safe place. The ``paperkey`` subcommand can be used to create a QR encoded
version of your master key. The following command sends the output of the
``paperkey`` command to a text file, for easy printing.
.. code-block:: console
proxmox-backup-client key paperkey --output-format text > qrkey.txt
Restoring Data Restoring Data
-------------- --------------
The regular creation of backups is a necessary step in avoiding data loss. More The regular creation of backups is a necessary step to avoiding data
importantly, however, is the restoration. It is good practice to perform loss. More importantly, however, is the restoration. It is good practice to perform
periodic recovery tests to ensure that you can access the data in case of periodic recovery tests to ensure that you can access the data in
disaster. case of problems.
First, you need to find the snapshot which you want to restore. The snapshot First, you need to find the snapshot which you want to restore. The snapshot
list command provides a list of all the snapshots on the server: command provides a list of all the snapshots on the server:
.. code-block:: console .. code-block:: console
# proxmox-backup-client snapshot list # proxmox-backup-client snapshots
┌────────────────────────────────┬─────────────┬────────────────────────────────────┐ ┌────────────────────────────────┬─────────────┬────────────────────────────────────┐
│ snapshot │ size │ files │ │ snapshot │ size │ files │
╞════════════════════════════════╪═════════════╪════════════════════════════════════╡ ╞════════════════════════════════╪═════════════╪════════════════════════════════════╡
@ -416,11 +393,6 @@ list command provides a list of all the snapshots on the server:
├────────────────────────────────┼─────────────┼────────────────────────────────────┤ ├────────────────────────────────┼─────────────┼────────────────────────────────────┤
... ...
.. tip:: List will by default only output the backup snapshots of the root
namespace itself. To list backups from another namespace use the ``--ns
<ns>`` option
You can inspect the catalog to find specific files. You can inspect the catalog to find specific files.
.. code-block:: console .. code-block:: console
@ -463,22 +435,23 @@ to use the interactive recovery shell.
The interactive recovery shell is a minimal command line interface that The interactive recovery shell is a minimal command line interface that
utilizes the metadata stored in the catalog to quickly list, navigate and utilizes the metadata stored in the catalog to quickly list, navigate and
search for files in a file archive. search files in a file archive.
To restore files, you can select them individually or match them with a glob To restore files, you can select them individually or match them with a glob
pattern. pattern.
Using the catalog for navigation reduces the overhead considerably because only Using the catalog for navigation reduces the overhead considerably because only
the catalog needs to be downloaded and, optionally, decrypted. the catalog needs to be downloaded and, optionally, decrypted.
The actual chunks are only accessed if the metadata in the catalog is The actual chunks are only accessed if the metadata in the catalog is not enough
insufficient or for the actual restore. or for the actual restore.
Similar to common UNIX shells, ``cd`` and ``ls`` are the commands used to change Similar to common UNIX shells ``cd`` and ``ls`` are the commands used to change
working directory and list directory contents in the archive. working directory and list directory contents in the archive.
``pwd`` shows the full path of the current working directory with respect to the ``pwd`` shows the full path of the current working directory with respect to the
archive root. archive root.
The ability to quickly search the contents of the archive is a commonly required Being able to quickly search the contents of the archive is a commonly needed feature.
feature. That's where the catalog is most valuable. For example: That's where the catalog is most valuable.
For example:
.. code-block:: console .. code-block:: console
@ -489,24 +462,25 @@ feature. That's where the catalog is most valuable. For example:
pxar:/ > restore-selected /target/path pxar:/ > restore-selected /target/path
... ...
This will find and print all files ending in ``.txt`` located in ``etc/`` or its This will find and print all files ending in ``.txt`` located in ``etc/`` or a
subdirectories, and add the corresponding pattern to the list for subsequent restores. subdirectory and add the corresponding pattern to the list for subsequent restores.
``list-selected`` shows these patterns and ``restore-selected`` finally restores ``list-selected`` shows these patterns and ``restore-selected`` finally restores
all files in the archive matching the patterns to ``/target/path`` on the local all files in the archive matching the patterns to ``/target/path`` on the local
host. This will scan the whole archive. host. This will scan the whole archive.
The ``restore`` command can be used to restore all the files contained within With ``restore /target/path`` you can restore the sub-archive given by the current
the backup archive. This is most helpful when paired with the ``--pattern working directory to the local target path ``/target/path`` on your host.
<glob>`` option, as it allows you to restore all files matching a specific By additionally passing a glob pattern with ``--pattern <glob>``, the restore is
pattern. For example, if you wanted to restore configuration files further limited to files matching the pattern.
located in ``/etc``, you could do the following: For example:
.. code-block:: console .. code-block:: console
pxar:/ > restore target/ --pattern etc/**/*.conf pxar:/ > cd /etc/
pxar:/etc/ > restore /target/ --pattern **/*.conf
... ...
The above will scan through all the directories below ``/etc`` and restore all The above will scan trough all the directories below ``/etc`` and restore all
files ending in ``.conf``. files ending in ``.conf``.
.. todo:: Explain interactive restore in more detail .. todo:: Explain interactive restore in more detail
@ -515,7 +489,7 @@ Mounting of Archives via FUSE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The :term:`FUSE` implementation for the pxar archive allows you to mount a The :term:`FUSE` implementation for the pxar archive allows you to mount a
file archive as a read-only filesystem to a mount point on your host. file archive as a read-only filesystem to a mountpoint on your host.
.. code-block:: console .. code-block:: console
@ -531,7 +505,7 @@ This allows you to access the full contents of the archive in a seamless manner.
load on your host, depending on the operations you perform on the mounted load on your host, depending on the operations you perform on the mounted
filesystem. filesystem.
To unmount the filesystem, use the ``umount`` command on the mount point: To unmount the filesystem use the ``umount`` command on the mountpoint:
.. code-block:: console .. code-block:: console
@ -540,7 +514,7 @@ To unmount the filesystem, use the ``umount`` command on the mount point:
Login and Logout Login and Logout
---------------- ----------------
The client tool prompts you to enter the login password as soon as you The client tool prompts you to enter the logon password as soon as you
want to access the backup server. The server checks your credentials want to access the backup server. The server checks your credentials
and responds with a ticket that is valid for two hours. The client and responds with a ticket that is valid for two hours. The client
tool automatically stores that ticket and uses it for further requests tool automatically stores that ticket and uses it for further requests
@ -578,10 +552,10 @@ user that has ``Datastore.Modify`` privileges on the datastore.
# proxmox-backup-client change-owner vm/103 john@pbs # proxmox-backup-client change-owner vm/103 john@pbs
This can also be done from within the web interface, by navigating to the This can also be done from within the web interface, by navigating to the
`Content` section of the datastore that contains the backup group and selecting `Content` section of the datastore that contains the backup group and
the user icon under the `Actions` column. Common cases for this could be to selecting the user icon under the `Actions` column. Common cases for this could
change the owner of a sync job from ``root@pam``, or to repurpose a backup be to change the owner of a sync job from ``root@pam``, or to repurpose a
group. backup group.
.. _backup-pruning: .. _backup-pruning:
@ -589,24 +563,16 @@ group.
Pruning and Removing Backups Pruning and Removing Backups
---------------------------- ----------------------------
You can manually delete a backup snapshot using the ``forget`` command: You can manually delete a backup snapshot using the ``forget``
command:
.. code-block:: console .. code-block:: console
# proxmox-backup-client snapshot forget <snapshot> # proxmox-backup-client forget <snapshot>
.. caution:: This command removes all archives in this backup snapshot. They
will be inaccessible and *unrecoverable*.
Don't forget to add the namespace ``--ns`` parameter if you want to forget a
snapshot that is contained in the root namespace:
.. code-block:: console
# proxmox-backup-client snapshot forget <snapshot> --ns <ns>
.. caution:: This command removes all archives in this backup
snapshot. They will be inaccessible and unrecoverable.
Although manual removal is sometimes required, the ``prune`` Although manual removal is sometimes required, the ``prune``
@ -676,29 +642,10 @@ shows the list of existing snapshots and what actions prune would take.
.. note:: Neither the ``prune`` command nor the ``forget`` command free space .. note:: Neither the ``prune`` command nor the ``forget`` command free space
in the chunk-store. The chunk-store still contains the data blocks. To free in the chunk-store. The chunk-store still contains the data blocks. To free
space you need to perform :ref:`client_garbage-collection`. space you need to perform :ref:`garbage-collection`.
It is also possible to protect single snapshots from being pruned or deleted:
.. code-block:: console .. _garbage-collection:
# proxmox-backup-client snapshot protected update <snapshot> true
This will set the protected flag on the snapshot and prevent pruning or manual
deletion of this snapshot untilt he flag is removed again with:
.. code-block:: console
# proxmox-backup-client snapshot protected update <snapshot> false
When a group is with a protected snapshot is deleted, only the non-protected
ones are removed and the group will remain.
.. note:: This flag will not be synced when using pull or sync jobs. If you
want to protect a synced snapshot, you have to manually to this again on
the target backup server.
.. _client_garbage-collection:
Garbage Collection Garbage Collection
------------------ ------------------
@ -722,7 +669,7 @@ unused data blocks are removed.
(access time) property. Filesystems are mounted with the ``relatime`` option (access time) property. Filesystems are mounted with the ``relatime`` option
by default. This results in a better performance by only updating the by default. This results in a better performance by only updating the
``atime`` property if the last access has been at least 24 hours ago. The ``atime`` property if the last access has been at least 24 hours ago. The
downside is that touching a chunk within these 24 hours will not always downside is, that touching a chunk within these 24 hours will not always
update its ``atime`` property. update its ``atime`` property.
Chunks in the grace period will be logged at the end of the garbage Chunks in the grace period will be logged at the end of the garbage
@ -746,53 +693,45 @@ unused data blocks are removed.
Average chunk size: 2486565 Average chunk size: 2486565
TASK OK TASK OK
Garbage collection can also be scheduled using ``promxox-backup-manager`` or
from the Proxmox Backup Server's web interface. .. todo:: howto run garbage-collection at regular intervals (cron)
Benchmarking Benchmarking
------------ ------------
The backup client also comes with a benchmarking tool. This tool measures The backup client also comes with a benchmarking tool. This tool measures
various metrics relating to compression and encryption speeds. If a Proxmox various metrics relating to compression and encryption speeds. You can run a
Backup repository (remote or local) is specified, the TLS upload speed will get benchmark using the ``benchmark`` subcommand of ``proxmox-backup-client``:
measured too.
You can run a benchmark using the ``benchmark`` subcommand of
``proxmox-backup-client``:
.. note:: The TLS speed test is only included if a :ref:`backup server
repository is specified <client_repository>`.
.. code-block:: console .. code-block:: console
# proxmox-backup-client benchmark # proxmox-backup-client benchmark
Uploaded 1517 chunks in 5 seconds. Uploaded 656 chunks in 5 seconds.
Time per request: 3309 microseconds. Time per request: 7659 microseconds.
TLS speed: 1267.41 MB/s TLS speed: 547.60 MB/s
SHA256 speed: 2066.73 MB/s SHA256 speed: 585.76 MB/s
Compression speed: 775.11 MB/s Compression speed: 1923.96 MB/s
Decompress speed: 1233.35 MB/s Decompress speed: 7885.24 MB/s
AES256/GCM speed: 3688.27 MB/s AES256/GCM speed: 3974.03 MB/s
Verify speed: 783.43 MB/s
┌───────────────────────────────────┬─────────────────────┐ ┌───────────────────────────────────┬─────────────────────┐
│ Name │ Value │ │ Name │ Value │
╞═══════════════════════════════════╪═════════════════════╡ ╞═══════════════════════════════════╪═════════════════════╡
│ TLS (maximal backup upload speed) │ 1267.41 MB/s (103%) │ TLS (maximal backup upload speed) │ 547.60 MB/s (93%)
├───────────────────────────────────┼─────────────────────┤ ├───────────────────────────────────┼─────────────────────┤
│ SHA256 checksum computation speed │ 2066.73 MB/s (102%) │ SHA256 checksum computation speed │ 585.76 MB/s (28%)
├───────────────────────────────────┼─────────────────────┤ ├───────────────────────────────────┼─────────────────────┤
│ ZStd level 1 compression speed │ 775.11 MB/s (103%) │ │ ZStd level 1 compression speed │ 1923.96 MB/s (89%) │
├───────────────────────────────────┼─────────────────────┤ ├───────────────────────────────────┼─────────────────────┤
│ ZStd level 1 decompression speed │ 1233.35 MB/s (103%) │ ZStd level 1 decompression speed │ 7885.24 MB/s (98%)
├───────────────────────────────────┼─────────────────────┤ ├───────────────────────────────────┼─────────────────────┤
│ Chunk verification speed │ 783.43 MB/s (103%) │ │ AES256 GCM encryption speed │ 3974.03 MB/s (104%) │
├───────────────────────────────────┼─────────────────────┤
│ AES256 GCM encryption speed │ 3688.27 MB/s (101%) │
└───────────────────────────────────┴─────────────────────┘ └───────────────────────────────────┴─────────────────────┘
.. note:: The percentages given in the output table correspond to a .. note:: The percentages given in the output table correspond to a
comparison against a Ryzen 7 2700X. comparison against a Ryzen 7 2700X. The TLS test connects to the
local host, so there is no network involved.
You can also pass the ``--output-format`` parameter to output stats in ``json``, You can also pass the ``--output-format`` parameter to output stats in ``json``,
rather than the default table format. rather than the default table format.

View File

@ -1,141 +1,19 @@
Backup Protocol Backup Protocol
=============== ===============
Proxmox Backup Server uses a REST-based API. While the management .. todo:: add introduction to HTTP2 based backup protocols
interface uses normal HTTP, the actual backup and restore interface uses
HTTP/2 for improved performance. Both HTTP and HTTP/2 are well known
standards, so the following section assumes that you are familiar with
how to use them.
Backup Protocol API Backup Protocol API
------------------- -------------------
To start a new backup, the API call ``GET /api2/json/backup`` needs to .. todo:: describe backup writer protocol
be upgraded to a HTTP/2 connection using
``proxmox-backup-protocol-v1`` as the protocol name::
GET /api2/json/backup HTTP/1.1 .. include:: backup-protocol-api.rst
UPGRADE: proxmox-backup-protocol-v1
The server replies with the ``HTTP 101 Switching Protocol`` status code,
and you can then issue REST commands on the updated HTTP/2 connection.
The backup protocol allows you to upload three different kind of files:
- Chunks and blobs (binary data)
- Fixed indexes (List of chunks with fixed size)
- Dynamic indexes (List of chunks with variable size)
The following section provides a short introduction on how to upload such
files. Please use the `API Viewer <api-viewer/index.html>`_ for
details about the available REST commands.
Upload Blobs Reader Protocol API
~~~~~~~~~~~~ -------------------
Blobs are uploaded using ``POST /blob``. The HTTP body contains the .. todo:: describe backup reader protocol
data encoded as :ref:`Data Blob <data-blob-format>`.
The file name must end with ``.blob``, and is automatically added .. include:: reader-protocol-api.rst
to the backup manifest, following the call to ``POST /finish``.
Upload Chunks
~~~~~~~~~~~~~
Chunks belong to an index, so you first need to open an index (see
below). After that, you can upload chunks using ``POST /fixed_chunk``
and ``POST /dynamic_chunk``. The HTTP body contains the chunk data
encoded as :ref:`Data Blob <data-blob-format>`).
Upload Fixed Indexes
~~~~~~~~~~~~~~~~~~~~
Fixed indexes are used to store VM image data. The VM image is split
into equally sized chunks, which are uploaded individually. The index
file simply contains a list of chunk digests.
You create a fixed index with ``POST /fixed_index``. Then, upload
chunks with ``POST /fixed_chunk``, and append them to the index with
``PUT /fixed_index``. When finished, you need to close the index using
``POST /fixed_close``.
The file name needs to end with ``.fidx``, and is automatically added
to the backup manifest, following the call to ``POST /finish``.
Upload Dynamic Indexes
~~~~~~~~~~~~~~~~~~~~~~
Dynamic indexes are used to store file archive data. The archive data
is split into dynamically sized chunks, which are uploaded
individually. The index file simply contains a list of chunk digests
and offsets.
You can create a dynamically sized index with ``POST /dynamic_index``. Then,
upload chunks with ``POST /dynamic_chunk``, and append them to the index with
``PUT /dynamic_index``. When finished, you need to close the index using
``POST /dynamic_close``.
The filename needs to end with ``.didx``, and is automatically added
to the backup manifest, following the call to ``POST /finish``.
Finish Backup
~~~~~~~~~~~~~
Once you have uploaded all data, you need to call ``POST /finish``. This
commits all data and ends the backup protocol.
Restore/Reader Protocol API
---------------------------
To start a new reader, the API call ``GET /api2/json/reader`` needs to
be upgraded to a HTTP/2 connection using
``proxmox-backup-reader-protocol-v1`` as protocol name::
GET /api2/json/reader HTTP/1.1
UPGRADE: proxmox-backup-reader-protocol-v1
The server replies with the ``HTTP 101 Switching Protocol`` status code,
and you can then issue REST commands on that updated HTTP/2 connection.
The reader protocol allows you to download three different kinds of files:
- Chunks and blobs (binary data)
- Fixed indexes (list of chunks with fixed size)
- Dynamic indexes (list of chunks with variable size)
The following section provides a short introduction on how to download such
files. Please use the `API Viewer <api-viewer/index.html>`_ for details about
the available REST commands.
Download Blobs
~~~~~~~~~~~~~~
Blobs are downloaded using ``GET /download``. The HTTP body contains the
data encoded as :ref:`Data Blob <data-blob-format>`.
Download Chunks
~~~~~~~~~~~~~~~
Chunks are downloaded using ``GET /chunk``. The HTTP body contains the
data encoded as :ref:`Data Blob <data-blob-format>`.
Download Index Files
~~~~~~~~~~~~~~~~~~~~
Index files are downloaded using ``GET /download``. The HTTP body
contains the data encoded as :ref:`Fixed Index <fixed-index-format>`
or :ref:`Dynamic Index <dynamic-index-format>`.

View File

@ -1,4 +1,5 @@
.. _calendar-event-scheduling:
.. _calendar-events:
Calendar Events Calendar Events
=============== ===============
@ -37,7 +38,7 @@ Each field can contain multiple values in the following formats:
* and a combination of the above: e.g., 01,05..10,12/02 * and a combination of the above: e.g., 01,05..10,12/02
* or a `*` for every possible value: e.g., \*:00 * or a `*` for every possible value: e.g., \*:00
There are some special values that have a specific meaning: There are some special values that have specific meaning:
================================= ============================== ================================= ==============================
Value Syntax Value Syntax
@ -81,19 +82,19 @@ Not all features of systemd calendar events are implemented:
* no Unix timestamps (e.g. `@12345`): instead use date and time to specify * no Unix timestamps (e.g. `@12345`): instead use date and time to specify
a specific point in time a specific point in time
* no timezone: all schedules use the timezone of the server * no timezone: all schedules use the set timezone on the server
* no sub-second resolution * no sub-second resolution
* no reverse day syntax (e.g. 2020-03~01) * no reverse day syntax (e.g. 2020-03~01)
* no repetition of ranges (e.g. 1..10/2) * no repetition of ranges (e.g. 1..10/2)
Notes on Scheduling Notes on scheduling
------------------- -------------------
In `Proxmox Backup`_, scheduling for most tasks is done in the In `Proxmox Backup`_ scheduling for most tasks is done in the
`proxmox-backup-proxy`. This daemon checks all job schedules `proxmox-backup-proxy`. This daemon checks all job schedules
every minute, to see if any are due. This means that even though if they are due every minute. This means that even if
`calendar events` can contain seconds, it will only be checked `calendar events` can contain seconds, it will only be checked
once per minute. once a minute.
Also, all schedules will be checked against the timezone set Also, all schedules will be checked against the timezone set
in the `Proxmox Backup`_ server. in the `Proxmox Backup`_ server.

View File

@ -1,333 +0,0 @@
.. _sysadmin_certificate_management:
Certificate Management
----------------------
Access to the API and thus the web-based administration interface is always
encrypted through ``https``. Each `Proxmox Backup`_ host creates by default its
own (self-signed) certificate. This certificate is used for encrypted
communication with the hosts ``proxmox-backup-proxy`` service, for any API
call between a user or backup-client and the web-interface.
Certificate verification when sending backups to a `Proxmox Backup`_ server
is either done based on pinning the certificate fingerprints in the storage/remote
configuration, or by using certificates, signed by a trusted certificate authority.
.. _sysadmin_certs_api_gui:
Certificates for the API and SMTP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`Proxmox Backup`_ stores it certificate and key in:
- ``/etc/proxmox-backup/proxy.pem``
- ``/etc/proxmox-backup/proxy.key``
You have the following options for the certificate:
1. Keep using the default self-signed certificate in
``/etc/proxmox-backup/proxy.pem``.
2. Use an externally provided certificate (for example, signed by a
commercial Certificate Authority (CA)).
3. Use an ACME provider like Lets Encrypt to get a trusted certificate
with automatic renewal; this is also integrated in the `Proxmox Backup`_
API and web interface.
Certificates are managed through the `Proxmox Backup`_
web-interface/API or using the the ``proxmox-backup-manager`` CLI tool.
.. _sysadmin_certs_upload_custom:
Upload Custom Certificate
~~~~~~~~~~~~~~~~~~~~~~~~~
If you already have a certificate which you want to use for a Proxmox
Mail Gateway host, you can simply upload that certificate over the web
interface.
.. image:: images/screenshots/pbs-gui-certs-upload-custom.png
:align: right
:alt: Upload a custom certificate
Note that any certificate key files must not be password protected.
.. _sysadmin_certs_get_trusted_acme_cert:
Trusted certificates via Lets Encrypt (ACME)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`Proxmox Backup`_ includes an implementation of the **A**\ utomatic
**C**\ ertificate **M**\ anagement **E**\ nvironment (**ACME**)
protocol, allowing `Proxmox Backup`_ admins to use an ACME provider
like Lets Encrypt for easy setup of TLS certificates, which are
accepted and trusted by modern operating systems and web browsers out of
the box.
Currently, the two ACME endpoints implemented are the `Lets Encrypt
(LE) <https://letsencrypt.org>`_ production and staging environments.
Our ACME client supports validation of ``http-01`` challenges using a
built-in web server and validation of ``dns-01`` challenges using a DNS
plugin supporting all the DNS API endpoints
`acme.sh <https://acme.sh>`_ does.
.. _sysadmin_certs_acme_account:
ACME Account
^^^^^^^^^^^^
.. image:: images/screenshots/pbs-gui-acme-create-account.png
:align: right
:alt: Create ACME Account
You need to register an ACME account per cluster, with the endpoint you
want to use. The email address used for that account will serve as the
contact point for renewal-due or similar notifications from the ACME
endpoint.
You can register or deactivate ACME accounts over the web interface
``Certificates -> ACME Accounts`` or using the ``proxmox-backup-manager`` command
line tool.
::
proxmox-backup-manager acme account register <account-name> <mail@example.com>
.. tip::
Because of
`rate-limits <https://letsencrypt.org/docs/rate-limits/>`_ you
should use LE ``staging`` for experiments or if you use ACME for the
very first time until all is working there, and only then switch over
to the production directory.
.. _sysadmin_certs_acme_plugins:
ACME Plugins
^^^^^^^^^^^^
The ACME plugins role is to provide automatic verification that you,
and thus the `Proxmox Backup`_ server under your operation, are the
real owner of a domain. This is the basic building block of automatic
certificate management.
The ACME protocol specifies different types of challenges, for example
the ``http-01``, where a web server provides a file with a specific
token to prove that it controls a domain. Sometimes this isnt possible,
either because of technical limitations or if the address of a record is
not reachable from the public internet. The ``dns-01`` challenge can be
used in such cases. This challenge is fulfilled by creating a certain
DNS record in the domains zone.
.. image:: images/screenshots/pbs-gui-acme-create-challenge-plugin.png
:align: right
:alt: Create ACME Account
`Proxmox Backup`_ supports both of those challenge types out of the
box, you can configure plugins either over the web interface under
``Certificates -> ACME Challenges``, or using the
``proxmox-backup-manager acme plugin add`` command.
ACME Plugin configurations are stored in ``/etc/proxmox-backup/acme/plugins.cfg``.
.. _domains:
Domains
^^^^^^^
You can add new or manage existing domain entries under
``Certificates``, or using the ``proxmox-backup-manager`` command.
.. image:: images/screenshots/pbs-gui-acme-add-domain.png
:align: right
:alt: Add a Domain for ACME verification
After configuring the desired domain(s) for a node and ensuring that the
desired ACME account is selected, you can order your new certificate
over the web-interface. On success, the interface will reload after
roughly 10 seconds.
Renewal will happen `automatically <#sysadmin-certs-acme-automatic-renewal>`_
.. _sysadmin_certs_acme_http_challenge:
ACME HTTP Challenge Plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always an implicitly configured ``standalone`` plugin for
validating ``http-01`` challenges via the built-in web server spawned on
port 80.
.. note::
The name ``standalone`` means that it can provide the validation on
its own, without any third party service.
There are a few prerequisites to use this for certificate management
with Lets Encrypts ACME.
- You have to accept the ToS of Lets Encrypt to register an account.
- **Port 80** of the node needs to be reachable from the internet.
- There **must** be no other listener on port 80.
- The requested (sub)domain needs to resolve to a public IP of the
`Proxmox Backup`_ host.
.. _sysadmin_certs_acme_dns_challenge:
ACME DNS API Challenge Plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On systems where external access for validation via the ``http-01``
method is not possible or desired, it is possible to use the ``dns-01``
validation method. This validation method requires a DNS server that
allows provisioning of ``TXT`` records via an API.
.. _sysadmin_certs_acme_dns_api_config:
Configuring ACME DNS APIs for validation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`Proxmox Backup`_ re-uses the DNS plugins developed for the
``acme.sh`` [1]_ project. Please refer to its documentation for details
on configuration of specific APIs.
The easiest way to configure a new plugin with the DNS API is using the
web interface (``Certificates -> ACME Accounts/Challenges``).
Here you can add a new challenge plugin by selecting your API provider
and entering the credential data to access your account over their API.
.. tip::
See the acme.sh `How to use DNS
API <https://github.com/acmesh-official/acme.sh/wiki/dnsapi#how-to-use-dns-api>`_
wiki for more detailed information about getting API credentials for
your provider. Configuration values do not need to be quoted with
single or double quotes; for some plugins that is even an error.
As there are many DNS providers and API endpoints, `Proxmox Backup`_
automatically generates the form for the credentials, but not all
providers are annotated yet. For those you will see a bigger text area,
into which you simply need to copy all the credentials
``KEY``\ =\ ``VALUE`` pairs.
.. _dns_validation_through_cname_alias:
DNS Validation through CNAME Alias
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A special ``alias`` mode can be used to handle validation on a different
domain/DNS server, in case your primary/real DNS does not support
provisioning via an API. Manually set up a permanent ``CNAME`` record
for ``_acme-challenge.domain1.example`` pointing to
``_acme-challenge.domain2.example``, and set the ``alias`` property in
the `Proxmox Backup`_ node configuration file ``/etc/proxmox-backup/node.cfg``
to ``domain2.example`` to allow the DNS server of ``domain2.example`` to
validate all challenges for ``domain1.example``.
.. _sysadmin_certs_acme_dns_wildcard:
Wildcard Certificates
^^^^^^^^^^^^^^^^^^^^^
Wildcard DNS names start with a ``*.`` prefix and are considered valid
for all (one-level) subdomain names of the verified domain. So a
certificate for ``*.domain.example`` is valid for ``foo.domain.example``
and ``bar.domain.example``, but not for ``baz.foo.domain.example``.
Currently, you can only create wildcard certificates with the `DNS
challenge
type <https://letsencrypt.org/docs/challenge-types/#dns-01-challenge>`_.
.. _combination_of_plugins:
Combination of Plugins
^^^^^^^^^^^^^^^^^^^^^^
Combining ``http-01`` and ``dns-01`` validation is possible in case your
node is reachable via multiple domains with different requirements / DNS
provisioning capabilities. Mixing DNS APIs from multiple providers or
instances is also possible by specifying different plugin instances per
domain.
.. tip::
Accessing the same service over multiple domains increases complexity
and should be avoided if possible.
.. _sysadmin_certs_acme_automatic_renewal:
Automatic renewal of ACME certificates
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If a node has been successfully configured with an ACME-provided
certificate (either via ``proxmox-backup-manager`` or via the web-interface/API), the
certificate will be renewed automatically by the ``proxmox-backup-daily-update.service``.
Currently, renewal is triggered if the certificate either has already
expired or if it will expire in the next 30 days.
.. _manually_change_certificate_over_command_line:
Manually Change Certificate over Command-Line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you want to get rid of certificate verification warnings, you have to
generate a valid certificate for your server.
Log in to your `Proxmox Backup`_ via ssh or use the console:
::
openssl req -newkey rsa:2048 -nodes -keyout key.pem -out req.pem
Follow the instructions on the screen, for example:
::
Country Name (2 letter code) [AU]: AT
State or Province Name (full name) [Some-State]:Vienna
Locality Name (eg, city) []:Vienna
Organization Name (eg, company) [Internet Widgits Pty Ltd]: Proxmox GmbH
Organizational Unit Name (eg, section) []:Proxmox Backup
Common Name (eg, YOUR name) []: yourproxmox.yourdomain.com
Email Address []:support@yourdomain.com
Please enter the following 'extra' attributes to be sent with your certificate request
A challenge password []: not necessary
An optional company name []: not necessary
After you have finished the certificate request, you have to send the
file ``req.pem`` to your Certification Authority (CA). The CA will issue
the certificate (BASE64 encoded), based on your request save this file
as ``cert.pem`` to your `Proxmox Backup`_.
To activate the new certificate, do the following on your `Proxmox Backup`_
::
cp key.pem /etc/proxmox-backup/proxy.key
cp cert.pem /etc/proxmox-backup/proxy.pem
Then restart the API servers:
::
systemctl restart proxmox-backup-proxy
Test your new certificate, using your browser.
.. note::
To transfer files to and from your `Proxmox Backup`_, you can use
secure copy: If your desktop runs Linux, you can use the ``scp``
command line tool. If your desktop PC runs windows, please use an scp
client like WinSCP (see https://winscp.net/).
.. [1]
acme.sh https://github.com/acmesh-official/acme.sh

View File

@ -11,32 +11,8 @@ Command Line Tools
.. include:: proxmox-backup-manager/description.rst .. include:: proxmox-backup-manager/description.rst
``proxmox-tape``
~~~~~~~~~~~~~~~~
.. include:: proxmox-tape/description.rst
``pmt``
~~~~~~~
.. include:: pmt/description.rst
``pmtx``
~~~~~~~~
.. include:: pmtx/description.rst
``pxar`` ``pxar``
~~~~~~~~ ~~~~~~~~
.. include:: pxar/description.rst .. include:: pxar/description.rst
``proxmox-file-restore``
~~~~~~~~~~~~~~~~~~~~~~~~~
.. include:: proxmox-file-restore/description.rst
``proxmox-backup-debug``
~~~~~~~~~~~~~~~~~~~~~~~~
.. include:: proxmox-backup-debug/description.rst

View File

@ -10,7 +10,7 @@ Command Syntax
Catalog Shell Commands Catalog Shell Commands
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
The following commands are available in an interactive restore shell: Those command are available when you start an interactive restore shell:
.. code-block:: console .. code-block:: console
@ -26,38 +26,7 @@ The following commands are available in an interactive restore shell:
.. include:: proxmox-backup-manager/synopsis.rst .. include:: proxmox-backup-manager/synopsis.rst
``proxmox-tape``
----------------
.. include:: proxmox-tape/synopsis.rst
``pmt``
-------
.. include:: pmt/options.rst
....
.. include:: pmt/synopsis.rst
``pmtx``
--------
.. include:: pmtx/synopsis.rst
``pxar`` ``pxar``
-------- --------
.. include:: pxar/synopsis.rst .. include:: pxar/synopsis.rst
``proxmox-file-restore``
------------------------
.. include:: proxmox-file-restore/synopsis.rst
``proxmox-backup-debug``
------------------------
.. include:: proxmox-backup-debug/synopsis.rst

View File

@ -49,7 +49,7 @@ PygmentsBridge.latex_formatter = CustomLatexFormatter
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = ["sphinx.ext.graphviz", 'sphinx.ext.mathjax', "sphinx.ext.todo", "proxmox-scanrefs"] extensions = ["sphinx.ext.graphviz", "sphinx.ext.todo", "proxmox-scanrefs"]
todo_link_only = True todo_link_only = True
@ -74,10 +74,10 @@ rst_epilog = epilog_file.read()
# General information about the project. # General information about the project.
project = 'Proxmox Backup' project = 'Proxmox Backup'
copyright = '2019-2021, Proxmox Server Solutions GmbH' copyright = '2019-2020, Proxmox Server Solutions GmbH'
author = 'Proxmox Support Team' author = 'Proxmox Support Team'
# The version info for the project you're documenting, acts as a replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
@ -107,15 +107,14 @@ today_fmt = '%A, %d %B %Y'
# This patterns also effect to html_static_path and html_extra_path # This patterns also effect to html_static_path and html_extra_path
exclude_patterns = [ exclude_patterns = [
'_build', 'Thumbs.db', '.DS_Store', '_build', 'Thumbs.db', '.DS_Store',
'*/man1.rst', 'proxmox-backup-client/man1.rst',
'certificate-management.rst', 'proxmox-backup-manager/man1.rst',
'config/*/man5.rst', 'proxmox-backup-proxy/man1.rst',
'pxar/man1.rst',
'epilog.rst', 'epilog.rst',
'pbs-copyright.rst', 'pbs-copyright.rst',
'local-zfs.rst', 'local-zfs.rst'
'package-repositories.rst', 'package-repositories.rst',
'system-booting.rst',
'traffic-control.rst',
] ]
# The reST default role (used for this markup: `text`) to use for all # The reST default role (used for this markup: `text`) to use for all
@ -172,9 +171,7 @@ html_theme_options = {
'extra_nav_links': { 'extra_nav_links': {
'Proxmox Homepage': 'https://proxmox.com', 'Proxmox Homepage': 'https://proxmox.com',
'PDF': 'proxmox-backup.pdf', 'PDF': 'proxmox-backup.pdf',
'API Viewer' : 'api-viewer/index.html',
'Prune Simulator' : 'prune-simulator/index.html', 'Prune Simulator' : 'prune-simulator/index.html',
'LTO Barcode Generator' : 'lto-barcode/index.html',
}, },
'sidebar_width': '320px', 'sidebar_width': '320px',
@ -248,8 +245,10 @@ html_js_files = [
# #
# html_last_updated_fmt = None # html_last_updated_fmt = None
# We need to disable smatquotes, else Option Lists do not display long options # If true, SmartyPants will be used to convert quotes and dashes to
smartquotes = False # typographically correct entities.
#
# html_use_smartypants = True
# Additional templates that should be rendered to pages, maps page names to # Additional templates that should be rendered to pages, maps page names to
# template names. # template names.
@ -310,9 +309,6 @@ html_show_sourcelink = False
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'ProxmoxBackupdoc' htmlhelp_basename = 'ProxmoxBackupdoc'
# use local mathjax package, symlink comes from debian/proxmox-backup-docs.links
mathjax_path = "mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
# -- Options for LaTeX output --------------------------------------------- # -- Options for LaTeX output ---------------------------------------------
latex_engine = 'xelatex' latex_engine = 'xelatex'

View File

@ -1,22 +0,0 @@
This file contains the access control list for the Proxmox Backup
Server API.
Each line starts with ``acl:``, followed by 4 additional values
separated by colon.
:propagate: Propagate permissions down the hierarchy
:path: The object path
:User/Token: List of users and tokens
:Role: List of assigned roles
Here is an example list::
acl:1:/:root@pam!test:Admin
acl:1:/datastore/store1:user1@pbs:DatastoreAdmin
You can use the ``proxmox-backup-manager acl`` command to manipulate
this file.

View File

@ -1,35 +0,0 @@
==========================
acl.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
Access Control Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file /etc/proxmox-backup/user.cfg is a configuration file for Proxmox
Backup Server. It contains the access control configuration for the API.
File Format
===========
.. include:: format.rst
Roles
=====
The following roles exist:
.. include:: roles.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,18 +0,0 @@
This file contains a list of datastore configuration sections. Each
section starts with the header ``datastore: <name>``, followed by the
datastore configuration options.
::
datastore: <name1>
path <path1>
<option1> <value1>
...
datastore: <name2>
path <path2>
...
You can use the ``proxmox-backup-manager datastore`` command to manipulate
this file.

View File

@ -1,33 +0,0 @@
==========================
datastore.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
Datastore Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file /etc/proxmox-backup/datastore.cfg is a configuration file for Proxmox
Backup Server. It contains the Datastore configuration.
File Format
===========
.. include:: format.rst
Options
=======
.. include:: config.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,13 +0,0 @@
Each entry starts with the header ``pool: <name>``, followed by the
media pool configuration options.
::
pool: company1
allocation always
retention overwrite
pool: ...
You can use the ``proxmox-tape pool`` command to manipulate this file.

View File

@ -1,35 +0,0 @@
==========================
media-pool.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
Media Pool Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file /etc/proxmox-backup/media-pool.cfg is a configuration file
for Proxmox Backup Server. It contains the medila pool configuration
for tape backups.
File Format
===========
.. include:: format.rst
Options
=======
.. include:: config.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,17 +0,0 @@
This file contains information used to access remote servers.
Each entry starts with the header ``remote: <name>``, followed by the
remote configuration options.
::
remote: server1
host server1.local
auth-id sync@pbs
...
remote: ...
You can use the ``proxmox-backup-manager remote`` command to manipulate
this file.

View File

@ -1,35 +0,0 @@
==========================
remote.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
Remote Server Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file /etc/proxmox-backup/remote.cfg is a configuration file for
Proxmox Backup Server. It contains information about remote servers,
usable for synchronization jobs.
File Format
===========
.. include:: format.rst
Options
=======
.. include:: config.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,15 +0,0 @@
Each entry starts with the header ``sync: <name>``, followed by the
job configuration options.
::
sync: job1
store store1
remote-store store1
remote lina
sync: ...
You can use the ``proxmox-backup-manager sync-job`` command to manipulate
this file.

View File

@ -1,35 +0,0 @@
==========================
sync.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
Synchronization Job Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file /etc/proxmox-backup/sync.cfg is a configuration file for
Proxmox Backup Server. It contains the synchronization job
configuration.
File Format
===========
.. include:: format.rst
Options
=======
.. include:: config.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,16 +0,0 @@
Each entry starts with the header ``backup: <name>``, followed by the
job configuration options.
::
backup: job1
drive hh8
pool p4
store store3
schedule daily
backup: ...
You can use the ``proxmox-tape backup-job`` command to manipulate
this file.

View File

@ -1,34 +0,0 @@
==========================
tape-job.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
Tape Job Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file ``/etc/proxmox-backup/tape-job.cfg`` is a configuration file for
Proxmox Backup Server. It contains the tape job configuration.
File Format
===========
.. include:: format.rst
Options
=======
.. include:: config.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,22 +0,0 @@
Each LTO drive configuration section starts with the header ``lto: <name>``,
followed by the drive configuration options.
Tape changer configurations start with the header ``changer: <name>``,
followed by the changer configuration options.
::
lto: hh8
changer sl3
path /dev/tape/by-id/scsi-10WT065325-nst
changer: sl3
export-slots 14,15,16
path /dev/tape/by-id/scsi-CJ0JBE0059
You can use the ``proxmox-tape drive`` and ``proxmox-tape changer``
commands to manipulate this file.
.. NOTE:: The ``virtual:`` drive type is experimental and should only be used
for debugging.

View File

@ -1,33 +0,0 @@
==========================
tape.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
Tape Drive and Changer Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file /etc/proxmox-backup/tape.cfg is a configuration file for Proxmox
Backup Server. It contains the tape drive and changer configuration.
File Format
===========
.. include:: format.rst
Options
=======
.. include:: config.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,28 +0,0 @@
This file contains the list of API users and API tokens.
Each user configuration section starts with the header ``user: <name>``,
followed by the user configuration options.
API token configuration starts with the header ``token:
<userid!token_name>``, followed by the token configuration. The data
used to authenticate tokens is stored in a separate file
(``token.shadow``).
::
user: root@pam
comment Superuser
email test@example.local
...
token: root@pam!token1
comment API test token
enable true
expire 0
user: ...
You can use the ``proxmox-backup-manager user`` command to manipulate
this file.

View File

@ -1,33 +0,0 @@
==========================
user.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
User Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file /etc/proxmox-backup/user.cfg is a configuration file for Proxmox
Backup Server. It contains the user configuration.
File Format
===========
.. include:: format.rst
Options
=======
.. include:: config.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,16 +0,0 @@
Each entry starts with the header ``verification: <name>``, followed by the
job configuration options.
::
verification: verify-store2
ignore-verified true
outdated-after 7
schedule daily
store store2
verification: ...
You can use the ``proxmox-backup-manager verify-job`` command to manipulate
this file.

View File

@ -1,35 +0,0 @@
==========================
verification.cfg
==========================
.. include:: ../../epilog.rst
-------------------------------------------------------------
Verification Job Configuration
-------------------------------------------------------------
:Author: |AUTHOR|
:Version: Version |VERSION|
:Manual section: 5
Description
===========
The file /etc/proxmox-backup/sync.cfg is a configuration file for
Proxmox Backup Server. It contains the verification job
configuration.
File Format
===========
.. include:: format.rst
Options
=======
.. include:: config.rst
.. include:: ../../pbs-copyright.rst

View File

@ -1,142 +0,0 @@
Configuration Files
===================
All Proxmox Backup Server configuration files reside in the directory
``/etc/proxmox-backup/``.
``acl.cfg``
~~~~~~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/acl/format.rst
Roles
^^^^^
The following roles exist:
.. include:: config/acl/roles.rst
``datastore.cfg``
~~~~~~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/datastore/format.rst
Options
^^^^^^^
.. include:: config/datastore/config.rst
``media-pool.cfg``
~~~~~~~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/media-pool/format.rst
Options
^^^^^^^
.. include:: config/media-pool/config.rst
``tape.cfg``
~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/tape/format.rst
Options
^^^^^^^
.. include:: config/tape/config.rst
``tape-job.cfg``
~~~~~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/tape-job/format.rst
Options
^^^^^^^
.. include:: config/tape-job/config.rst
``user.cfg``
~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/user/format.rst
Options
^^^^^^^
.. include:: config/user/config.rst
``remote.cfg``
~~~~~~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/remote/format.rst
Options
^^^^^^^
.. include:: config/remote/config.rst
``sync.cfg``
~~~~~~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/sync/format.rst
Options
^^^^^^^
.. include:: config/sync/config.rst
``verification.cfg``
~~~~~~~~~~~~~~~~~~~~
File Format
^^^^^^^^^^^
.. include:: config/verification/format.rst
Options
^^^^^^^
.. include:: config/verification/config.rst

View File

@ -14,10 +14,6 @@ pre {
padding: 5px 10px; padding: 5px 10px;
} }
div.topic {
background-color: #FAFAFA;
}
li a.current { li a.current {
font-weight: bold; font-weight: bold;
border-bottom: 1px solid #000; border-bottom: 1px solid #000;
@ -29,23 +25,6 @@ ul li.toctree-l1 > a {
color: #000; color: #000;
} }
div.sphinxsidebar ul {
color: #444;
}
div.sphinxsidebar ul ul {
list-style: circle;
}
div.sphinxsidebar ul ul ul {
list-style: square;
}
div.sphinxsidebar ul a code {
font-weight: normal;
}
div.sphinxsidebar ul ul a {
border-bottom: 1px dotted #CCC;
}
div.sphinxsidebar form.search { div.sphinxsidebar form.search {
margin-bottom: 5px; margin-bottom: 5px;
} }
@ -57,11 +36,6 @@ div.sphinxsidebar h3 {
div.sphinxsidebar h1.logo-name { div.sphinxsidebar h1.logo-name {
display: none; display: none;
} }
div.document, div.footer {
width: min(100%, 1320px);
}
@media screen and (max-width: 875px) { @media screen and (max-width: 875px) {
div.sphinxsidebar p.logo { div.sphinxsidebar p.logo {
display: initial; display: initial;
@ -70,19 +44,9 @@ div.document, div.footer {
display: block; display: block;
} }
div.sphinxsidebar span { div.sphinxsidebar span {
color: #EEE; color: #AAA;
} }
.sphinxsidebar ul li.toctree-l1 > a, div.sphinxsidebar a { ul li.toctree-l1 > a {
color: #FFF; color: #FFF;
} }
div.sphinxsidebar {
background-color: #555;
}
div.body {
min-width: 300px;
}
div.footer {
display: block;
margin: 15px auto 0px auto;
}
} }

View File

@ -13,6 +13,7 @@
.. _Proxmox: https://www.proxmox.com .. _Proxmox: https://www.proxmox.com
.. _Proxmox Community Forum: https://forum.proxmox.com .. _Proxmox Community Forum: https://forum.proxmox.com
.. _Proxmox Virtual Environment: https://www.proxmox.com/proxmox-ve .. _Proxmox Virtual Environment: https://www.proxmox.com/proxmox-ve
.. FIXME
.. _Proxmox Backup: https://pbs.proxmox.com/wiki/index.php/Main_Page .. _Proxmox Backup: https://pbs.proxmox.com/wiki/index.php/Main_Page
.. _PBS Development List: https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel .. _PBS Development List: https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html .. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html
@ -22,7 +23,6 @@
.. _Virtual machine: https://en.wikipedia.org/wiki/Virtual_machine .. _Virtual machine: https://en.wikipedia.org/wiki/Virtual_machine
.. _APT: http://en.wikipedia.org/wiki/Advanced_Packaging_Tool .. _APT: http://en.wikipedia.org/wiki/Advanced_Packaging_Tool
.. _QEMU: https://www.qemu.org/ .. _QEMU: https://www.qemu.org/
.. _LXC: https://linuxcontainers.org/lxc/introduction/
.. _Client-server model: https://en.wikipedia.org/wiki/Client-server_model .. _Client-server model: https://en.wikipedia.org/wiki/Client-server_model
.. _AE: https://en.wikipedia.org/wiki/Authenticated_encryption .. _AE: https://en.wikipedia.org/wiki/Authenticated_encryption
@ -35,7 +35,7 @@
.. _ZFS: https://en.wikipedia.org/wiki/ZFS .. _ZFS: https://en.wikipedia.org/wiki/ZFS
.. _Proxmox VE: https://pve.proxmox.com .. _Proxmox VE: https://pve.proxmox.com
.. _RFC3339: https://tools.ietf.org/html/rfc3339 .. _RFC3399: https://tools.ietf.org/html/rfc3339
.. _UTC: https://en.wikipedia.org/wiki/Coordinated_Universal_Time .. _UTC: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
.. _ISO Week date: https://en.wikipedia.org/wiki/ISO_week_date .. _ISO Week date: https://en.wikipedia.org/wiki/ISO_week_date

View File

@ -24,13 +24,11 @@ future plans to support 32-bit processors.
How long will my Proxmox Backup Server version be supported? How long will my Proxmox Backup Server version be supported?
------------------------------------------------------------ ------------------------------------------------------------
+-----------------------+----------------------+---------------+------------+--------------------+ +-----------------------+--------------------+---------------+------------+--------------------+
|Proxmox Backup Version | Debian Version | First Release | Debian EOL | Proxmox Backup EOL | |Proxmox Backup Version | Debian Version | First Release | Debian EOL | Proxmox Backup EOL |
+=======================+======================+===============+============+====================+ +=======================+====================+===============+============+====================+
|Proxmox Backup 2.x | Debian 11 (Bullseye) | 2021-07 | tba | tba | |Proxmox Backup 1.x | Debian 10 (Buster) | tba | tba | tba |
+-----------------------+----------------------+---------------+------------+--------------------+ +-----------------------+--------------------+---------------+------------+--------------------+
|Proxmox Backup 1.x | Debian 10 (Buster) | 2020-11 | 2022-08 | 2022-07 |
+-----------------------+----------------------+---------------+------------+--------------------+
Can I copy or synchronize my datastore to another location? Can I copy or synchronize my datastore to another location?
@ -55,20 +53,19 @@ checksums. This manifest file is used to verify the integrity of each backup.
When backing up to remote servers, do I have to trust the remote server? When backing up to remote servers, do I have to trust the remote server?
------------------------------------------------------------------------ ------------------------------------------------------------------------
Proxmox Backup Server transfers data via `Transport Layer Security (TLS) Proxmox Backup Server supports client-side encryption, meaning your data is
<https://en.wikipedia.org/wiki/Transport_Layer_Security>`_ and additionally encrypted before it reaches the server. Thus, in the event that an attacker
supports client-side encryption. This means that data is transferred securely gains access to the server, they will not be able to read the data.
and can be encrypted before it reaches the server. Thus, in the event that an
attacker gains access to the server or any point of the network, they will not
be able to read the data.
.. note:: Encryption is not enabled by default. To set up encryption, see the .. note:: Encryption is not enabled by default. To set up encryption, see the
:ref:`backup client encryption section <client_encryption>`. `Encryption
<https://pbs.proxmox.com/docs/administration-guide.html#encryption>`_ section
of the Proxmox Backup Server Administration Guide.
Is the backup incremental/deduplicated? Is the backup incremental/deduplicated?
--------------------------------------- ---------------------------------------
With Proxmox Backup Server, backups are sent incrementally to the server, and With Proxmox Backup Server, backups are sent incremental and data is
data is then deduplicated on the server. This minimizes both the storage deduplicated on the server.
consumed and the impact on the network. This minimizes both the storage consumed and the network impact.

View File

@ -6,115 +6,7 @@ File Formats
Proxmox File Archive Format (``.pxar``) Proxmox File Archive Format (``.pxar``)
--------------------------------------- ---------------------------------------
.. graphviz:: pxar-format-overview.dot .. graphviz:: pxar-format-overview.dot
.. _data-blob-format:
Data Blob Format (``.blob``)
----------------------------
The data blob format is used to store small binary data. The magic number
decides the exact format:
.. list-table::
:widths: auto
* - ``[66, 171, 56, 7, 190, 131, 112, 161]``
- unencrypted
- uncompressed
* - ``[49, 185, 88, 66, 111, 182, 163, 127]``
- unencrypted
- compressed
* - ``[123, 103, 133, 190, 34, 45, 76, 240]``
- encrypted
- uncompressed
* - ``[230, 89, 27, 191, 11, 191, 216, 11]``
- encrypted
- compressed
The compression algorithm used is ``zstd``. The encryption cipher is
``AES_256_GCM``.
Unencrypted blobs use the following format:
.. list-table::
:widths: auto
* - ``MAGIC: [u8; 8]``
* - ``CRC32: [u8; 4]``
* - ``Data: (max 16MiB)``
Encrypted blobs additionally contain a 16 byte initialization vector (IV),
followed by a 16 byte authenticated encryption (AE) tag, followed by the
encrypted data:
.. list-table::
* - ``MAGIC: [u8; 8]``
* - ``CRC32: [u8; 4]``
* - ``IV: [u8; 16]``
* - ``TAG: [u8; 16]``
* - ``Data: (max 16MiB)``
.. _fixed-index-format:
Fixed Index Format (``.fidx``)
-------------------------------
All numbers are stored as little-endian.
.. list-table::
* - ``MAGIC: [u8; 8]``
- ``[47, 127, 65, 237, 145, 253, 15, 205]``
* - ``uuid: [u8; 16]``,
- Unique ID
* - ``ctime: i64``,
- Creation Time (epoch)
* - ``index_csum: [u8; 32]``,
- SHA-256 over the index (without header) ``SHA256(digest1||digest2||...)``
* - ``size: u64``,
- Image size
* - ``chunk_size: u64``,
- Chunk size
* - ``reserved: [u8; 4016]``,
- Overall header size is one page (4096 bytes)
* - ``digest1: [u8; 32]``
- First chunk digest
* - ``digest2: [u8; 32]``
- Second chunk digest
* - ...
- Next chunk digest ...
.. _dynamic-index-format:
Dynamic Index Format (``.didx``)
--------------------------------
All numbers are stored as little-endian.
.. list-table::
* - ``MAGIC: [u8; 8]``
- ``[28, 145, 78, 165, 25, 186, 179, 205]``
* - ``uuid: [u8; 16]``,
- Unique ID
* - ``ctime: i64``,
- Creation Time (epoch)
* - ``index_csum: [u8; 32]``,
- SHA-256 over the index (without header) ``SHA256(offset1||digest1||offset2||digest2||...)``
* - ``reserved: [u8; 4032]``,
- Overall header size is one page (4096 bytes)
* - ``offset1: u64``
- End of first chunk
* - ``digest1: [u8; 32]``
- First chunk digest
* - ``offset2: u64``
- End of second chunk
* - ``digest2: [u8; 32]``
- Second chunk digest
* - ...
- Next chunk offset/digest

View File

@ -11,7 +11,7 @@ Glossary
`Container`_ `Container`_
A container is an isolated user space. Programs run directly on A container is an isolated user space. Programs run directly on
the host's kernel, but with limited access to the host's resources. the host's kernel, but with limited access to the host resources.
Datastore Datastore
@ -23,19 +23,19 @@ Glossary
Rust is a new, fast and memory-efficient system programming Rust is a new, fast and memory-efficient system programming
language. It has no runtime or garbage collector. Rusts rich type language. It has no runtime or garbage collector. Rusts rich type
system and ownership model guarantee memory-safety and system and ownership model guarantee memory-safety and
thread-safety. This can eliminate many classes of bugs thread-safety. I can eliminate many classes of bugs
at compile-time. at compile-time.
`Sphinx`_ `Sphinx`_
Is a tool that makes it easy to create intelligent and nicely formatted Is a tool that makes it easy to create intelligent and
documentation. It was originally created for the documentation of the beautiful documentation. It was originally created for the
Python programming language. It has excellent facilities for the documentation of the Python programming language. It has excellent facilities for the
documentation of software projects in a range of languages. documentation of software projects in a range of languages.
`reStructuredText`_ `reStructuredText`_
Is an easy-to-read, what-you-see-is-what-you-get, plaintext Is an easy-to-read, what-you-see-is-what-you-get plaintext
markup syntax and parser system. markup syntax and parser system.
`FUSE` `FUSE`

View File

@ -8,9 +8,8 @@ tools. The web interface also provides a built-in console, so if you prefer the
command line or need some extra control, you have this option. command line or need some extra control, you have this option.
The web interface can be accessed via https://youripaddress:8007. The default The web interface can be accessed via https://youripaddress:8007. The default
login is `root`, and the password is either the one specified during the login is `root`, and the password is the one specified during the installation
installation process or the password of the root user, in case of installation process.
on top of Debian.
Features Features
@ -49,13 +48,12 @@ GUI Overview
The Proxmox Backup Server web interface consists of 3 main sections: The Proxmox Backup Server web interface consists of 3 main sections:
* **Header**: At the top. This shows version information and contains buttons to * **Header**: At the top. This shows version information, and contains buttons to view
view documentation, monitor running tasks, set the language, configure various documentation, monitor running tasks, set the language and logout.
display settings, and logout. * **Sidebar**: On the left. This contains the configuration options for
* **Sidebar**: On the left. This contains the administration options for
the server. the server.
* **Configuration Panel**: In the center. This contains the respective control * **Configuration Panel**: In the center. This contains the control interface for the
interfaces for the administration options in the *Sidebar*. configuration options in the *Sidebar*.
Sidebar Sidebar
@ -76,14 +74,12 @@ previous and currently running tasks, and subscription information.
Configuration Configuration
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
The Configuration section contains some system options, such as time, network, The Configuration section contains some system configuration options, such as
WebAuthn, and HTTP proxy configuration. It also contains the following time and network configuration. It also contains the following subsections:
subsections:
* **Access Control**: Add and manage users, API tokens, and the permissions * **Access Control**: Add and manage users, API tokens, and the permissions
associated with these items associated with these items
* **Remotes**: Add, edit and remove remotes (see :term:`Remote`) * **Remotes**: Add, edit and remove remotes (see :term:`Remote`)
* **Certificates**: Manage ACME accounts and create SSL certificates.
* **Subscription**: Upload a subscription key, view subscription status and * **Subscription**: Upload a subscription key, view subscription status and
access a text-based system report. access a text-based system report.
@ -102,7 +98,6 @@ tasks and information. These are:
resource usage statistics resource usage statistics
* **Services**: Manage and monitor system services * **Services**: Manage and monitor system services
* **Updates**: An interface for upgrading packages * **Updates**: An interface for upgrading packages
* **Repositories**: An interface for configuring APT repositories
* **Syslog**: View log messages from the server * **Syslog**: View log messages from the server
* **Tasks**: Task history with multiple filter options * **Tasks**: Task history with multiple filter options
@ -117,27 +112,6 @@ The administration menu item also contains a disk management subsection:
* **Directory**: Create and view information on *ext4* and *xfs* disks * **Directory**: Create and view information on *ext4* and *xfs* disks
* **ZFS**: Create and view information on *ZFS* disks * **ZFS**: Create and view information on *ZFS* disks
Tape Backup
^^^^^^^^^^^
.. image:: images/screenshots/pbs-gui-tape-changer-overview.png
:align: right
:alt: Tape Backup: Tape changer overview
The `Tape Backup`_ section contains a top panel, with options for managing tape
media sets, inventories, drives, changers, encryption keys, and the tape backup
jobs itself. The tabs are as follows:
* **Content**: Information on the contents of the tape backup
* **Inventory**: Manage the tapes attached to the system
* **Changers**: Manage tape loading devices
* **Drives**: Manage drives used for reading and writing to tapes
* **Media Pools**: Manage logical pools of tapes
* **Encryption Keys**: Manage tape backup encryption keys
* **Backup Jobs**: Manage tape backup jobs
The section also contains a subsection per standalone drive and per changer,
with a status and management view for those devices.
Datastore Datastore
^^^^^^^^^ ^^^^^^^^^
@ -147,18 +121,16 @@ Datastore
:alt: Datastore Configuration :alt: Datastore Configuration
The Datastore section contains interfaces for creating and managing The Datastore section contains interfaces for creating and managing
datastores. It also contains a button for creating a new datastore on the datastores. It contains a button to create a new datastore on the server, as
server, as well as a subsection for each datastore on the system, in which you well as a subsection for each datastore on the system, in which you can use the
can use the top panel to view: top panel to view:
* **Summary**: Access a range of datastore usage statistics * **Summary**: Access a range of datastore usage statistics
* **Content**: Information on the datastore's backup groups and their respective * **Content**: Information on the datastore's backup groups and their respective
contents contents
* **Prune & GC**: Schedule :ref:`pruning <backup-pruning>` and :ref:`garbage * **Prune & GC**: Schedule :ref:`pruning <backup-pruning>` and :ref:`garbage
collection <client_garbage-collection>` operations, and run garbage collection collection <garbage-collection>` operations, and run garbage collection
manually manually
* **Sync Jobs**: Create, manage and run :ref:`syncjobs` from remote servers * **Sync Jobs**: Create, manage and run :ref:`syncjobs` from remote servers
* **Verify Jobs**: Create, manage and run :ref:`maintenance_verification` jobs * **Verify Jobs**: Create, manage and run :ref:`verification` jobs on the
on the datastore datastore
* **Options**: Configure notification and verification settings
* **Permissions**: Manage permissions on the datastore

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Some files were not shown because too many files have changed in this diff Show More