update 1.2.2.2 beta

This commit is contained in:
MacRimi
2026-07-04 21:37:39 +02:00
parent 29ebfdc324
commit 66dd3ec014
66 changed files with 6114 additions and 83 deletions

View File

@@ -6671,11 +6671,14 @@ function ManualJobWatchModal({
// PbsKeyfileRecoveryDialog
// ──────────────────────────────────────────────────────────────
// Drops the missing PBS keyfile back onto disk by pulling the escrow
// blob from a `proxmenux-keyrecovery-<host>` snapshot and decrypting
// it with the operator's recovery passphrase. Mirrors the shell's
// hb_pbs_try_keyfile_recovery flow. Triggered from the banner in
// DestinationsSection when the local keyfile is missing but at least
// one escrow snapshot is present on a configured PBS.
// blob from a keyrecovery backup and decrypting it with the operator's
// recovery passphrase. Mirrors the shell's hb_pbs_try_keyfile_recovery
// flow. Triggered from the banner in DestinationsSection when the
// local keyfile is missing but at least one escrow backup is present
// on a configured PBS. The backend endpoint surfaces both the current
// `hostcfg-<host>-keyrecovery` and the legacy
// `proxmenux-keyrecovery-<host>` naming, so pre-1.2.2.2 escrow blobs
// stay recoverable without manual migration.
// ──────────────────────────────────────────────────────────────
function PbsKeyfileRecoveryDialog({
open,

View File

@@ -3669,6 +3669,25 @@ def _get_smart_data_uncached(disk_name):
['smartctl', '-a', '-d', 'sat,16', f'/dev/{disk_name}'], # Text SAT with 16-byte commands
]
# USB-NVMe bridges (ASMedia ASM2362/ASM2464PD, JMicron JMS583/JMS586,
# Realtek RTL9210): the plain `-a` variant answers with the *bridge*
# identity (e.g. "ASMT 2462 NVME") and no temperature, because the
# bridge exposes itself as generic USB storage. Only `-d snt*`
# passes through to the actual NVMe controller and returns real
# model, serial, temperature and health.
#
# For removable disks we prepend the three snt* variants so the
# cascade tries them FIRST — otherwise the plain variant "succeeds"
# (>50 chars of bridge chatter), the probe cache locks it in, and
# temperature is never seen. For non-removable disks the cascade
# is unchanged (zero regression risk on internal SATA/NVMe).
if is_disk_removable(disk_name):
all_commands = [
['smartctl', '-a', '-j', '-d', 'sntasmedia', f'/dev/{disk_name}'],
['smartctl', '-a', '-j', '-d', 'sntjmicron', f'/dev/{disk_name}'],
['smartctl', '-a', '-j', '-d', 'sntrealtek', f'/dev/{disk_name}'],
] + all_commands
# Probe-cache: if we already know which command works for this
# disk, try that first. The fallback chain is still kept after
# in case the cached probe stops working (kernel upgrade swapped
@@ -13808,15 +13827,40 @@ def api_pbs_recovery_setup():
return jsonify({'status': 'ok', 'recovery_path': _PBS_RECOVERY_ENC_PATH})
def _is_pbs_keyrecovery_backup_id(bid: str) -> bool:
"""Match both the current `hostcfg-<host>-keyrecovery` naming
and the legacy `proxmenux-keyrecovery-<host>` naming so escrow
blobs uploaded by pre-1.2.2.2 builds remain discoverable and
stay hidden from the main host-backup list."""
if not bid:
return False
if bid.startswith('proxmenux-keyrecovery-'):
return True
return bid.startswith('hostcfg-') and bid.endswith('-keyrecovery')
def _pbs_keyrecovery_source_host(bid: str) -> str:
"""Extract the source hostname from either keyrecovery naming."""
if bid.startswith('hostcfg-') and bid.endswith('-keyrecovery'):
return bid[len('hostcfg-'):-len('-keyrecovery')]
if bid.startswith('proxmenux-keyrecovery-'):
return bid[len('proxmenux-keyrecovery-'):]
return bid
@app.route('/api/host-backups/pbs-recovery/available', methods=['GET'])
@require_auth
def api_pbs_recovery_available():
"""List `host/proxmenux-keyrecovery-*` snapshots across every
configured PBS repository. The restore flow uses this when the
local keyfile is missing — the operator picks a snapshot, types
the recovery passphrase, and the keyfile is rebuilt from the
decrypted blob. Returns the freshest snapshot per backup-id +
repo so multi-host environments don't bury each other."""
"""List keyrecovery backup groups across every configured PBS
repository. Two naming patterns are surfaced: the current
`hostcfg-<host>-keyrecovery` (paired with the main backup group
for visual adjacency in the PBS UI) and the legacy
`proxmenux-keyrecovery-<host>` used by pre-1.2.2.2 builds. The
restore flow uses this when the local keyfile is missing — the
operator picks a backup, types the recovery passphrase, and the
keyfile is rebuilt from the decrypted blob. Returns the freshest
backup per backup-id + repo so multi-host environments don't
bury each other."""
out: list = []
errors: list = []
for repo in _list_pbs_destinations():
@@ -13851,7 +13895,7 @@ def api_pbs_recovery_available():
if it.get('backup-type') != 'host':
continue
bid = it.get('backup-id') or ''
if not bid.startswith('proxmenux-keyrecovery-'):
if not _is_pbs_keyrecovery_backup_id(bid):
continue
t = it.get('backup-time', 0)
# ISO timestamp — proxmox-backup-client rejects the
@@ -13866,7 +13910,7 @@ def api_pbs_recovery_available():
'repo_name': repo['name'],
'repo_repository': repo['repository'],
'backup_id': bid,
'source_host': bid[len('proxmenux-keyrecovery-'):],
'source_host': _pbs_keyrecovery_source_host(bid),
'backup_time': t,
'snapshot': f"host/{bid}/{iso}",
}
@@ -15853,10 +15897,13 @@ def _list_pbs_snapshots_for_repo(repo: dict, timeout: int = 15) -> tuple[list, s
if backup_type != 'host':
continue
backup_id = it.get('backup-id', '')
# Hide internal keyrecovery escrow snapshots — they're a
# Hide internal keyrecovery escrow backups — they're a
# ProxMenux implementation detail, not user-facing backups.
# See _PBS_RECOVERY_ENC_PATH and the runner upload step.
if backup_id.startswith('proxmenux-keyrecovery-'):
# Matches both current `hostcfg-<host>-keyrecovery` and
# legacy `proxmenux-keyrecovery-<host>` naming so escrow
# blobs from either build stay hidden from the main list.
if _is_pbs_keyrecovery_backup_id(backup_id):
continue
backup_time = it.get('backup-time', 0)
# proxmox-backup-client expects the timestamp portion as an

View File

@@ -58,6 +58,31 @@ def _perf_log(section: str, elapsed_ms: float):
if DEBUG_PERF:
print(f"[PERF] {section} = {elapsed_ms:.1f}ms")
# USB-NVMe bridges (ASMedia, JMicron, Realtek) answer plain smartctl with
# the *bridge* identity — model shows as "ASMT 2462 NVME" and there is no
# temperature. Only `-d snt*` passes through to the actual NVMe controller
# behind the bridge. For removable disks we try the snt* variants first
# so both identity and health reflect the drive, not the enclosure.
_USB_NVME_DRIVERS = ('sntasmedia', 'sntjmicron', 'sntrealtek')
def _disk_base_for_sysfs(name: str) -> str:
"""Normalize `/dev/sda` / `sda` to just `sda` for `/sys/block/<name>` lookups."""
if name.startswith('/dev/'):
return name[5:]
return name
def _is_disk_removable(disk_name: str) -> bool:
"""True if `/sys/block/<disk>/removable` reads 1. USB-attached storage."""
try:
base = _disk_base_for_sysfs(disk_name)
with open(f'/sys/block/{base}/removable') as f:
return f.read().strip() == '1'
except Exception:
return False
class HealthMonitor:
"""
Monitors system health across multiple components with minimal impact.
@@ -2405,15 +2430,33 @@ class HealthMonitor:
result = {'serial': '', 'model': '', '_fp': fp}
try:
dev_path = f'/dev/{disk_name}' if not disk_name.startswith('/') else disk_name
proc = subprocess.run(
['smartctl', '-i', '-j', dev_path],
capture_output=True, text=True, timeout=5
)
if proc.returncode in (0, 4):
import json as _json
data = _json.loads(proc.stdout)
result['serial'] = data.get('serial_number', '')
result['model'] = data.get('model_name', '') or data.get('model_family', '')
# Removable disks may be USB-NVMe bridges: try the snt* driver
# variants first so identity reflects the drive (Samsung 990 PRO)
# rather than the enclosure (ASMT 2462 NVME). If all snt* fail,
# fall through to the plain call — that's still correct for
# USB-SATA sticks and non-USB devices.
attempts = []
if _is_disk_removable(disk_name):
for drv in _USB_NVME_DRIVERS:
attempts.append(['smartctl', '-i', '-j', '-d', drv, dev_path])
attempts.append(['smartctl', '-i', '-j', dev_path])
import json as _json
for cmd in attempts:
proc = subprocess.run(cmd, capture_output=True, text=True, timeout=5)
if proc.returncode not in (0, 4):
continue
try:
data = _json.loads(proc.stdout)
except Exception:
continue
serial = data.get('serial_number', '')
model = data.get('model_name', '') or data.get('model_family', '')
if serial or model:
result['serial'] = serial
result['model'] = model
break
except Exception:
pass
@@ -2451,28 +2494,44 @@ class HealthMonitor:
# from spinning up HDDs that hdparm / hd-idle just put to
# sleep — issue #232. The "UNKNOWN" branch below correctly
# keeps the previous cached result alive on exit code 2.
result = subprocess.run(
['smartctl', '-n', 'standby', '--health', '-j', dev_path],
capture_output=True, text=True, timeout=5
)
if result.returncode == 2:
# Drive in standby — reuse the previous health state
# if we have one, otherwise report UNKNOWN. Either way,
# don't refresh the cache TTL so we retry on the next
# cycle (a drive can come out of standby at any time).
if cached:
return cached['result']
return 'UNKNOWN'
#
# Removable disks may be USB-NVMe bridges: try snt* drivers
# first so health reflects the actual NVMe controller. A
# bridge that fakes "PASSED" while the drive behind it is
# failing is exactly the false-negative we want to avoid.
attempts = []
if _is_disk_removable(disk_name):
for drv in _USB_NVME_DRIVERS:
attempts.append(['smartctl', '-n', 'standby', '--health', '-j', '-d', drv, dev_path])
attempts.append(['smartctl', '-n', 'standby', '--health', '-j', dev_path])
import json as _json
data = _json.loads(result.stdout)
passed = data.get('smart_status', {}).get('passed', None)
if passed is True:
smart_result = 'PASSED'
elif passed is False:
smart_result = 'FAILED'
else:
smart_result = None
for cmd in attempts:
result = subprocess.run(cmd, capture_output=True, text=True, timeout=5)
if result.returncode == 2:
# Drive in standby — reuse the previous health state
# if we have one, otherwise report UNKNOWN. Either way,
# don't refresh the cache TTL so we retry on the next
# cycle (a drive can come out of standby at any time).
if cached:
return cached['result']
return 'UNKNOWN'
try:
data = _json.loads(result.stdout)
except Exception:
continue
passed = data.get('smart_status', {}).get('passed', None)
if passed is True:
smart_result = 'PASSED'
break
if passed is False:
smart_result = 'FAILED'
break
# No opinion yet — next attempt (fallthrough to plain).
if smart_result is None:
smart_result = 'UNKNOWN'
# Cache the result with the device fingerprint for hot-swap invalidation
self._smart_cache[cache_key] = {'result': smart_result, 'time': current_time, 'fp': fp}
return smart_result

View File

@@ -157,7 +157,7 @@ _bk_pbs() {
# that case the blob does not describe this snapshot and
# uploading it as a paired recovery would be misleading.
# This runs as a SEPARATE backup group
# (`host/proxmenux-keyrecovery-<host>`) with NO --keyfile,
# (`host/hostcfg-<host>-keyrecovery`) with NO --keyfile,
# so PBS stores it as a plain (non-PBS-encrypted) blob that
# can be retrieved during fresh-install recovery. The blob
# is still passphrase-protected by openssl.
@@ -841,7 +841,13 @@ _rs_extract_pbs() {
proxmox-backup-client snapshot list \
--repository "$HB_PBS_REPOSITORY" \
--output-format json 2>/dev/null \
| jq -r '.[] | select(."backup-type" == "host" and ((."backup-id" | startswith("proxmenux-keyrecovery-")) | not)) | "\(."backup-type")|\(."backup-id")|\(."backup-time")"' 2>/dev/null \
| jq -r '.[]
| select(."backup-type" == "host"
and not (
(."backup-id" | startswith("proxmenux-keyrecovery-"))
or ((."backup-id" | startswith("hostcfg-")) and (."backup-id" | endswith("-keyrecovery")))
))
| "\(."backup-type")|\(."backup-id")|\(."backup-time")"' 2>/dev/null \
| while IFS='|' read -r _type _id _epoch; do
local _iso
_iso=$(date -u -d "@${_epoch}" '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null \

View File

@@ -304,7 +304,7 @@ _create_job_attached() {
_create_job() {
local id backend on_calendar profile_mode
id=$(dialog --backtitle "ProxMenux" --title "$(translate "New backup job")" \
--inputbox "$(translate "Job ID (letters, numbers, - _)")" 9 68 "hostcfg-daily" 3>&1 1>&2 2>&3) || return 1
--inputbox "$(translate "Job ID (letters, numbers, - _)")" 9 68 "my-host-backup" 3>&1 1>&2 2>&3) || return 1
[[ -z "$id" ]] && return 1
id=$(echo "$id" | tr -cs '[:alnum:]_-' '-' | sed 's/^-*//; s/-*$//')
[[ -z "$id" ]] && return 1

View File

@@ -331,21 +331,75 @@ _sb_run_pbs() {
# without the keyfile, which is the whole point of the escrow.
local recovery_enc="/usr/local/share/proxmenux/pbs-key.recovery.enc"
if [[ -n "${PBS_KEYFILE:-}" && -f "$recovery_enc" ]]; then
local keyrec_id
keyrec_id="hostcfg-$(hostname)-keyrecovery"
env PBS_PASSWORD="$PBS_PASSWORD" \
PBS_FINGERPRINT="${PBS_FINGERPRINT:-}" \
proxmox-backup-client backup \
"keyrecovery.conf:${recovery_enc}" \
--repository "$PBS_REPOSITORY" \
--backup-type host \
--backup-id "proxmenux-keyrecovery-$(hostname)" \
--backup-id "$keyrec_id" \
--backup-time "$epoch" \
2>&1 || true
# Prune the paired keyrecovery group with the SAME retention
# values as the main backup. Without this the keyrecovery snapshots
# accumulate one per run while the main group is pruned to keep-*,
# cluttering the datastore over time. Any single keyrecovery snapshot
# is sufficient to reconstruct the keyfile — but matching retention
# keeps the two groups aligned in count and makes cleanup obvious.
env PBS_PASSWORD="$PBS_PASSWORD" \
PBS_FINGERPRINT="${PBS_FINGERPRINT:-}" \
proxmox-backup-client prune "host/${keyrec_id}" --repository "$PBS_REPOSITORY" \
${KEEP_LAST:+--keep-last "$KEEP_LAST"} \
${KEEP_HOURLY:+--keep-hourly "$KEEP_HOURLY"} \
${KEEP_DAILY:+--keep-daily "$KEEP_DAILY"} \
${KEEP_WEEKLY:+--keep-weekly "$KEEP_WEEKLY"} \
${KEEP_MONTHLY:+--keep-monthly "$KEEP_MONTHLY"} \
${KEEP_YEARLY:+--keep-yearly "$KEEP_YEARLY"} \
2>&1 || true
fi
echo "PBS_SNAPSHOT=host/${backup_id}/${epoch}"
return 0
}
# For attached jobs, re-read the parent vzdump job's prune-backups
# live from /etc/pve/jobs.cfg every run and rewrite KEEP_*. The .env
# only carries a snapshot of the parent's retention at creation time,
# so if the parent later gained (or changed) prune-backups the child
# would silently accumulate. Attached mode is authoritative from the
# parent by design — that's the whole point of "attached".
_sb_hydrate_attached_retention() {
local parent="${PVE_PARENT_JOB:-}"
[[ -z "$parent" ]] && return 0
local cfg=/etc/pve/jobs.cfg
[[ -f "$cfg" ]] || return 0
local prune
prune=$(awk -v pid="$parent" '
/^vzdump:[[:space:]]/ { in_block=($2==pid); next }
/^[a-z]+:/ { in_block=0; next }
in_block && /^[[:space:]]+prune-backups[[:space:]]/ {
sub(/^[[:space:]]+prune-backups[[:space:]]+/, "");
print; exit
}
' "$cfg")
# Clear any KEEP_* the .env may have — those are the create-time
# snapshot and are now stale. If the parent later removed prune-
# backups altogether, this correctly stops pruning the child too.
unset KEEP_LAST KEEP_HOURLY KEEP_DAILY KEEP_WEEKLY KEEP_MONTHLY KEEP_YEARLY
[[ -z "$prune" ]] && return 0
local kv
while IFS= read -r kv; do
[[ -n "$kv" ]] && export "${kv?}"
done < <(hb_pve_prune_to_keep_env "$prune")
}
main() {
local job_id="${1:-}"
[[ -z "$job_id" ]] && { echo "Usage: $0 <job_id>" >&2; exit 1; }
@@ -356,6 +410,11 @@ main() {
# shellcheck source=/dev/null
source "$job_file"
# Attached jobs: re-read retention from the PVE parent live (see
# _sb_hydrate_attached_retention above for the why). Standalone
# jobs keep whatever KEEP_* the .env has.
_sb_hydrate_attached_retention
local lock_file="${LOCK_DIR}/proxmenux-backup-${job_id}.lock"
if command -v flock >/dev/null 2>&1; then
exec 9>"$lock_file" || exit 1

View File

@@ -62,8 +62,7 @@
"root_fs": { "enum": ["ext4", "xfs", "btrfs", "zfs"] },
"cpu_model": { "type": "string" },
"cpu_arch": { "enum": ["x86_64", "aarch64"] },
"memory_kb": { "type": "integer", "minimum": 0 },
"subscription_status": { "type": ["string", "null"] }
"memory_kb": { "type": "integer", "minimum": 0 }
}
},

View File

@@ -0,0 +1,473 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import Image from "next/image"
import { Link } from "@/i18n/navigation"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.creatingBackups.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox interactive backup",
"proxmenux backup menu",
"backup profile default custom",
"hb_prepare_staging",
"proxmenux backup wizard",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/creating-backups" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/creating-backups",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type EntryRow = { entry: string; path: string; detail: string }
type MatrixRow = { combo: string; destination: string; profile: string; action: string }
type StepRow = { step: string; name: string; detail: string }
type WritingRow = { topic: string; detail: string }
type WhereNextItem = { label: string; href: string; tail: string }
export default async function CreatingBackupsPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.creatingBackups" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { creatingBackups: {
entryPoints: { rows: EntryRow[] }
matrix: { rows: MatrixRow[] }
commonPipeline: { steps: StepRow[] }
included: {
globalItems: string[]
rootItems: string[]
proxmenuxItems: string[]
notInProfileItems: string[]
}
writing: { rows: WritingRow[] }
whereNext: { items: WhereNextItem[] }
} } }
}
const cb = messages.docs.backupRestore.creatingBackups
const entryRows = cb.entryPoints.rows
const matrixRows = cb.matrix.rows
const pipelineSteps = cb.commonPipeline.steps
const globalItems = cb.included.globalItems
const rootItems = cb.included.rootItems
const proxmenuxItems = cb.included.proxmenuxItems
const notInProfileItems = cb.included.notInProfileItems
const writingRows = cb.writing.rows
const whereNextItems = cb.whereNext.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={9}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, em, strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("entryPoints.heading")}
</h2>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Entry point</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Path</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{entryRows.map((row, idx) => (
<tr key={row.entry} className={idx < entryRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.entry}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap">{row.path}</td>
<td className="px-3 py-2 align-top">{t.rich(`entryPoints.rows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("modes.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("modes.body", { code, strong })}
</p>
<p className="mb-4 text-gray-800 leading-relaxed">
<Link href="/docs/backup-restore/scheduled-jobs" className="text-blue-600 hover:underline font-medium">
{t("modes.seeAlso")}
</Link>
</p>
<figure className="my-6">
<a
href="/images/docs/backup-restore/scheduled-backup-monitor.png"
target="_blank"
rel="noopener noreferrer"
className="block cursor-zoom-in group"
aria-label={t("modes.monitorAlt")}
>
<Image
src="/images/docs/backup-restore/scheduled-backup-monitor.png"
alt={t("modes.monitorAlt")}
width={1400}
height={700}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto transition group-hover:shadow-md"
/>
</a>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("modes.monitorCaption")}
</figcaption>
</figure>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("matrix.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("matrix.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">#</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Destination</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Profile</th>
<th className="text-left px-3 py-2 border-b border-gray-200">What it does</th>
</tr>
</thead>
<tbody className="text-gray-800">
{matrixRows.map((row, idx) => (
<tr key={row.combo} className={idx < matrixRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.combo}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap">{row.destination}</td>
<td className="px-3 py-2 align-top whitespace-nowrap">{row.profile}</td>
<td className="px-3 py-2 align-top">{t.rich(`matrix.rows.${idx}.action`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("profiles.heading")}
</h2>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("profiles.defaultTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("profiles.defaultBody", { code, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("profiles.customTitle")}
</h3>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("profiles.customBody", { code, em })}
</p>
<figure className="my-6">
<a
href="/images/docs/backup-restore/custom-picker.png"
target="_blank"
rel="noopener noreferrer"
className="block cursor-zoom-in group"
aria-label={t("profiles.customPickerAlt")}
>
<Image
src="/images/docs/backup-restore/custom-picker.png"
alt={t("profiles.customPickerAlt")}
width={1400}
height={700}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto transition group-hover:shadow-md"
/>
</a>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("profiles.customPickerCaption")}
</figcaption>
</figure>
<figure className="my-6">
<a
href="/images/docs/backup-restore/manage-custom-paths.png"
target="_blank"
rel="noopener noreferrer"
className="block cursor-zoom-in group"
aria-label={t("profiles.manageCustomAlt")}
>
<Image
src="/images/docs/backup-restore/manage-custom-paths.png"
alt={t("profiles.manageCustomAlt")}
width={1400}
height={700}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto transition group-hover:shadow-md"
/>
</a>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("profiles.manageCustomCaption")}
</figcaption>
</figure>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("commonPipeline.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("commonPipeline.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">#</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Step</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{pipelineSteps.map((row, idx) => (
<tr key={row.step} className={idx < pipelineSteps.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.step}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.name}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`commonPipeline.steps.${idx}.detail`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("included.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("included.intro", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t.rich("included.globalTitle", { code })}
</h3>
<ul className="mb-6 space-y-1">
{globalItems.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed pl-1">
<span className="text-gray-400 mr-2"></span>
{t.rich(`included.globalItems.${idx}`, { code })}
</li>
))}
</ul>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t.rich("included.rootTitle", { code })}
</h3>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("included.rootBody", { code })}
</p>
<ul className="mb-6 space-y-1">
{rootItems.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed pl-1">
<span className="text-gray-400 mr-2"></span>
{t.rich(`included.rootItems.${idx}`, { code })}
</li>
))}
</ul>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t.rich("included.proxmenuxTitle", { code })}
</h3>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("included.proxmenuxBody", { code })}
</p>
<ul className="mb-6 space-y-1">
{proxmenuxItems.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed pl-1">
<span className="text-gray-400 mr-2"></span>
{t.rich(`included.proxmenuxItems.${idx}`, { code })}
</li>
))}
</ul>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("included.notInProfileTitle")}
</h3>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("included.notInProfileBody", { code })}
</p>
<ul className="mb-6 space-y-2">
{notInProfileItems.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed pl-1">
<span className="text-gray-400 mr-2"></span>
{t.rich(`included.notInProfileItems.${idx}`, { code, strong })}
</li>
))}
</ul>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("included.customPathsTitle")}
</h3>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("included.customPathsBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("archiveStructure.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("archiveStructure.intro", { code })}
</p>
<pre className="bg-gray-50 border border-gray-200 rounded-md p-4 text-sm font-mono text-gray-800 overflow-x-auto whitespace-pre leading-relaxed mb-6">
{t("archiveStructure.tree")}
</pre>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("confirmation.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("confirmation.body", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("writing.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("writing.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Topic</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{writingRows.map((row, idx) => (
<tr key={row.topic} className={idx < writingRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.topic}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`writing.rows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("finishedScreens.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t("finishedScreens.intro")}
</p>
<figure className="my-6">
<a
href="/images/docs/backup-restore/backup-finished-scripts.png"
target="_blank"
rel="noopener noreferrer"
className="block cursor-zoom-in group"
aria-label={t("finishedScreens.scriptsAlt")}
>
<Image
src="/images/docs/backup-restore/backup-finished-scripts.png"
alt={t("finishedScreens.scriptsAlt")}
width={1400}
height={700}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto transition group-hover:shadow-md"
/>
</a>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("finishedScreens.scriptsCaption")}
</figcaption>
</figure>
<figure className="my-6">
<a
href="/images/docs/backup-restore/backup-finished-monitor.png"
target="_blank"
rel="noopener noreferrer"
className="block cursor-zoom-in group"
aria-label={t("finishedScreens.monitorAlt")}
>
<Image
src="/images/docs/backup-restore/backup-finished-monitor.png"
alt={t("finishedScreens.monitorAlt")}
width={1400}
height={700}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto transition group-hover:shadow-md"
/>
</a>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("finishedScreens.monitorCaption")}
</figcaption>
</figure>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whereNext.heading")}
</h2>
<ul className="mb-6 space-y-2">
{whereNextItems.map((item) => (
<li key={item.href} className="text-gray-800 leading-relaxed">
<Link href={item.href} className="text-blue-600 hover:underline font-medium">
{item.label}
</Link>
<span>{item.tail}</span>
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,293 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { AlertTriangle } from "lucide-react"
import { Link } from "@/i18n/navigation"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.crossKernel.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox cross-kernel restore",
"bk_older bk_newer safe subset",
"IOMMU VFIO hydration",
"kernel-agnostic restore",
"hb_unsafe_paths_cross_version",
"HB_HYDRATION_APPLIED",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/cross-kernel" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/cross-kernel",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type DirectionRow = { direction: string; condition: string; behavior: string }
type CategoryRow = { category: string; paths: string; reason: string }
type PhaseRow = { phase: string; detail: string }
type ScenarioRow = { scenario: string; detail: string }
type CodeRefRow = { component: string; location: string }
type WhereNextItem = { label: string; href: string; tail: string }
export default async function CrossKernelPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.crossKernel" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { crossKernel: {
directionCheck: { rows: DirectionRow[] }
safeSubsetFilter: { categoryRows: CategoryRow[] }
hydration: { phaseRows: PhaseRow[] }
concreteExamples: { rows: ScenarioRow[] }
codeReference: { rows: CodeRefRow[] }
whereNext: { items: WhereNextItem[] }
} } }
}
const ck = messages.docs.backupRestore.crossKernel
const directionRows = ck.directionCheck.rows
const categoryRows = ck.safeSubsetFilter.categoryRows
const phaseRows = ck.hydration.phaseRows
const scenarioRows = ck.concreteExamples.rows
const codeRefRows = ck.codeReference.rows
const whereNextItems = ck.whereNext.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={16}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, strong, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("directionCheck.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("directionCheck.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Direction</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Condition</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Behaviour</th>
</tr>
</thead>
<tbody className="text-gray-800">
{directionRows.map((row, idx) => (
<tr key={row.direction} className={idx < directionRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.direction}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`directionCheck.rows.${idx}.condition`, { code })}</td>
<td className="px-3 py-2 align-top">{t.rich(`directionCheck.rows.${idx}.behavior`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whyBkNewerIsSafe.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("whyBkNewerIsSafe.body", { code, em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("safeSubsetFilter.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("safeSubsetFilter.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Category</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Paths</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Why they are skipped</th>
</tr>
</thead>
<tbody className="text-gray-800">
{categoryRows.map((row, idx) => (
<tr key={row.category} className={idx < categoryRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.category}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`safeSubsetFilter.categoryRows.${idx}.paths`, { code })}</td>
<td className="px-3 py-2 align-top">{t.rich(`safeSubsetFilter.categoryRows.${idx}.reason`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("safeSubsetFilter.outroBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("hydration.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("hydration.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Phase</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{phaseRows.map((row, idx) => (
<tr key={row.phase} className={idx < phaseRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.phase}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`hydration.phaseRows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("planCommit.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("planCommit.body", { code, em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("flowDiagram.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("flowDiagram.intro")}
</p>
<pre className="bg-gray-50 border border-gray-200 rounded-md p-4 text-xs sm:text-sm font-mono text-gray-800 overflow-x-auto whitespace-pre leading-relaxed mb-6">
{t("flowDiagram.diagram")}
</pre>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("concreteExamples.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("concreteExamples.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Scenario</th>
<th className="text-left px-3 py-2 border-b border-gray-200">What hydration does</th>
</tr>
</thead>
<tbody className="text-gray-800">
{scenarioRows.map((row, idx) => (
<tr key={row.scenario} className={idx < scenarioRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.scenario}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`concreteExamples.rows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<div className="my-8 rounded-lg border border-amber-200 bg-amber-50 p-5">
<div className="flex items-start gap-3">
<AlertTriangle className="h-5 w-5 text-amber-600 shrink-0 mt-0.5" aria-hidden="true" />
<div>
<h3 className="text-base font-semibold text-amber-900 mb-1">
{t("callout.warningTitle")}
</h3>
<p className="text-sm text-amber-900/90 leading-relaxed">
{t.rich("callout.warningBody", { code })}
</p>
</div>
</div>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("codeReference.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("codeReference.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Component</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Location</th>
</tr>
</thead>
<tbody className="text-gray-800">
{codeRefRows.map((row, idx) => (
<tr key={row.component} className={idx < codeRefRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.component}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`codeReference.rows.${idx}.location`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whereNext.heading")}
</h2>
<ul className="mb-6 space-y-2">
{whereNextItems.map((item) => (
<li key={item.href} className="text-gray-800 leading-relaxed">
<Link href={item.href} className="text-blue-600 hover:underline font-medium">
{item.label}
</Link>
<span>{item.tail}</span>
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,396 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { ExternalLink } from "lucide-react"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.destinations.borg.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"borg backup proxmox",
"borg repository",
"borg ssh",
"borg repokey",
"borg serve restrict-to-path",
"borg-linux64",
"borgbackup deduplication",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/destinations/borg" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/destinations/borg",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type PriorityRow = { priority: string; source: string; detail: string }
type RepoTypeRow = { type: string; url: string; detail: string }
type StrategyRow = { mode: string; label: string; detail: string }
type FileRow = { file: string; content: string }
type EnvRow = { var: string; value: string; purpose: string }
type ReferenceItem = { label: string; href: string; tail: string }
type RequirementRow = { requirement: string; detail: string }
export default async function BorgDestinationPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.destinations.borg" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { destinations: { borg: {
binarySourcing: { rows: PriorityRow[] }
repoTypes: { rows: RepoTypeRow[] }
serverSetup: { hostChoicesItems: string[]; requirementsRows: RequirementRow[] }
sshAuth: { strategyRows: StrategyRow[] }
savedTargets: { rows: FileRow[] }
runtimeEnv: { rows: EnvRow[] }
references: { items: ReferenceItem[] }
} } } }
}
const borg = messages.docs.backupRestore.destinations.borg
const binaryRows = borg.binarySourcing.rows
const repoTypeRows = borg.repoTypes.rows
const hostChoicesItems = borg.serverSetup.hostChoicesItems
const requirementsRows = borg.serverSetup.requirementsRows
const strategyRows = borg.sshAuth.strategyRows
const savedTargetRows = borg.savedTargets.rows
const envRows = borg.runtimeEnv.rows
const references = borg.references.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={13}
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("aboutBorg.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("aboutBorg.body", { code })}
</p>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("binarySourcing.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("binarySourcing.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">#</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Source</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{binaryRows.map((row, idx) => (
<tr key={row.priority} className={idx < binaryRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.priority}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap">{t.rich(`binarySourcing.rows.${idx}.source`, { code })}</td>
<td className="px-3 py-2 align-top">{t.rich(`binarySourcing.rows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("repoTypes.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("repoTypes.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Type</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Repository URL</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{repoTypeRows.map((row, idx) => (
<tr key={row.type} className={idx < repoTypeRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.type}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap">{row.url}</td>
<td className="px-3 py-2 align-top">{t.rich(`repoTypes.rows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("serverSetup.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("serverSetup.intro", { code, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("serverSetup.hostChoicesTitle")}
</h3>
<p className="mb-3 text-gray-800 leading-relaxed">
{t("serverSetup.hostChoicesBody")}
</p>
<ul className="mb-4 space-y-2">
{hostChoicesItems.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed pl-1">
<span className="text-gray-400 mr-2"></span>
{t.rich(`serverSetup.hostChoicesItems.${idx}`, { code, em })}
</li>
))}
</ul>
<Callout variant="warning" title={t("serverSetup.lxcWarningTitle")}>
{t("serverSetup.lxcWarningBody")}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("serverSetup.requirementsTitle")}
</h3>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Requirement</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{requirementsRows.map((row, idx) => (
<tr key={idx} className={idx < requirementsRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top">{t.rich(`serverSetup.requirementsRows.${idx}.requirement`, { code })}</td>
<td className="px-3 py-2 align-top">{t.rich(`serverSetup.requirementsRows.${idx}.detail`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("serverSetup.minimalSetupTitle")}
</h3>
<p className="mb-3 text-gray-800 leading-relaxed">
{t("serverSetup.minimalSetupBody")}
</p>
<CopyableCode code={t("serverSetup.minimalSetupCmd")} language="bash" />
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
{t.rich("serverSetup.minimalSetupNote", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("sshAuth.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("sshAuth.intro", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("sshAuth.strategiesTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("sshAuth.strategiesIntro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Mode</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Best for</th>
<th className="text-left px-3 py-2 border-b border-gray-200">What it does</th>
</tr>
</thead>
<tbody className="text-gray-800">
{strategyRows.map((row, idx) => (
<tr key={row.mode} className={idx < strategyRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.mode}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap">{row.label}</td>
<td className="px-3 py-2 align-top">{t.rich(`sshAuth.strategyRows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("sshAuth.restrictTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("sshAuth.restrictBody", { code })}
</p>
<CopyableCode code={t("sshAuth.restrictLine")} language="text" />
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
{t.rich("sshAuth.restrictNote", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("savedTargets.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("savedTargets.intro")}
</p>
<div className="overflow-x-auto mb-4">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">File</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Content</th>
</tr>
</thead>
<tbody className="text-gray-800">
{savedTargetRows.map((row, idx) => (
<tr key={row.file} className={idx < savedTargetRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.file}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`savedTargets.rows.${idx}.content`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-6 text-gray-800 leading-relaxed">
{t("savedTargets.outro")}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("encryption.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("encryption.body", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("runtimeEnv.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("runtimeEnv.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Variable</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Value</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Purpose</th>
</tr>
</thead>
<tbody className="text-gray-800">
{envRows.map((row, idx) => (
<tr key={row.var} className={idx < envRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.var}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs">{row.value}</td>
<td className="px-3 py-2 align-top">{t.rich(`runtimeEnv.rows.${idx}.purpose`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("archiveFormat.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("archiveFormat.intro")}
</p>
<CopyableCode code={t("archiveFormat.namePattern")} language="text" />
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
{t.rich("archiveFormat.retentionBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("restoreAccess.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("restoreAccess.body", { code, em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("references.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("references.intro")}
</p>
<ul className="mb-6 space-y-2">
{references.map((item) => (
<li key={item.href} className="text-gray-800 leading-relaxed">
<a
href={item.href}
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:underline font-medium inline-flex items-center gap-1"
>
{item.label}
<ExternalLink className="h-3 w-3" aria-hidden="true" />
</a>
<span>{item.tail}</span>
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,196 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.destinations.local.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox local backup",
"tar.zst archive",
"proxmox backup usb",
"proxmenux local destination",
"proxmox backup to usb drive",
"vzdump directory",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/destinations/local" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/destinations/local",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type OptionItem = string
type StateRow = { state: string; shown: string; action: string }
export default async function LocalDestinationPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.destinations.local" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { destinations: { local: {
targetConfig: { options: OptionItem[] }
usbFlow: { stateRows: StateRow[] }
} } } }
}
const loc = messages.docs.backupRestore.destinations.local
const options = loc.targetConfig.options
const stateRows = loc.usbFlow.stateRows
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={7}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("targetConfig.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("targetConfig.intro", { code, strong, em })}
</p>
<ul className="mb-6 space-y-3">
{options.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed pl-1">
<span className="text-gray-400 mr-2"></span>
{t.rich(`targetConfig.options.${idx}`, { code, strong })}
</li>
))}
</ul>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("usbFlow.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("usbFlow.intro", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("usbFlow.statesTitle")}
</h3>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">State</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Menu entry</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Action</th>
</tr>
</thead>
<tbody className="text-gray-800">
{stateRows.map((row, idx) => (
<tr key={row.state} className={idx < stateRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.state}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs">{row.shown}</td>
<td className="px-3 py-2 align-top">{t.rich(`usbFlow.stateRows.${idx}.action`, { code, strong })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="text-sm text-gray-700 mb-6 leading-relaxed">
{t.rich("usbFlow.notMountedFallback", { code, em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("safetyCheck.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("safetyCheck.body", { code, strong })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("archiveFormat.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("archiveFormat.intro", { code, strong })}
</p>
<CopyableCode code={t("archiveFormat.namePattern")} language="text" />
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("archiveFormat.compressionTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("archiveFormat.compressionBody", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("archiveFormat.sourceTitle")}
</h3>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("archiveFormat.sourceBody", { code, strong })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("sidecar.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("sidecar.intro", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("sidecar.contentTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("sidecar.contentBody", { code })}
</p>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("sidecar.whyBody", { code, strong })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("restoreAccess.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("restoreAccess.body", { code, strong })}
</p>
</div>
)
}

View File

@@ -0,0 +1,180 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.destinations.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox backup destinations",
"proxmox local backup",
"proxmox backup server",
"borg backup proxmox",
"tar zst backup",
"pbs snapshot",
"borg repository",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/destinations" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/destinations",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type ComparisonRow = {
feature: string
local: string
pbs: string
borg: string
}
type WhereNextItem = { label: string; href: string; tail: string }
export default async function DestinationsIndexPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.destinations" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { destinations: {
comparison: { rows: ComparisonRow[] }
whereNext: { items: WhereNextItem[] }
} } }
}
const dest = messages.docs.backupRestore.destinations
const rows = dest.comparison.rows
const whereNextItems = dest.whereNext.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={9}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("comparison.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("comparison.intro", { strong })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">
{t("comparison.captionCode")}
</th>
<th className="text-left px-3 py-2 border-b border-gray-200">
{t("comparison.captionLocal")}
</th>
<th className="text-left px-3 py-2 border-b border-gray-200">
{t("comparison.captionPbs")}
</th>
<th className="text-left px-3 py-2 border-b border-gray-200">
{t("comparison.captionBorg")}
</th>
</tr>
</thead>
<tbody className="text-gray-800">
{rows.map((row, idx) => (
<tr key={row.feature} className={idx < rows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.feature}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`comparison.rows.${idx}.local`, { code })}</td>
<td className="px-3 py-2 align-top">{t.rich(`comparison.rows.${idx}.pbs`, { code })}</td>
<td className="px-3 py-2 align-top">{t.rich(`comparison.rows.${idx}.borg`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("sameArchive.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("sameArchive.body", { code, em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("extractStandalone.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("extractStandalone.intro", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("comparison.captionLocal")}
</h3>
<CopyableCode code={t("extractStandalone.localCmd")} language="bash" />
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("comparison.captionPbs")}
</h3>
<CopyableCode code={t("extractStandalone.pbsCmd")} language="bash" />
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("comparison.captionBorg")}
</h3>
<CopyableCode code={t("extractStandalone.borgCmd")} language="bash" />
<p className="mt-4 mb-6 text-sm text-gray-600 italic">
{t.rich("extractStandalone.note", { em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whereNext.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("whereNext.intro", { em })}
</p>
<ul className="mb-6 space-y-2">
{whereNextItems.map((item) => (
<li key={item.href} className="text-gray-800 leading-relaxed">
<Link href={item.href} className="text-blue-600 hover:underline font-medium">
{item.label}
</Link>
<span>{item.tail}</span>
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,262 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Star, ExternalLink } from "lucide-react"
import Image from "next/image"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.destinations.pbs.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox backup server",
"pbs encryption keyfile",
"pbs recovery passphrase",
"proxmox-backup-client",
"pxar snapshot",
"pbs chunk deduplication",
"proxmenux pbs",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/destinations/pbs" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/destinations/pbs",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type SourceRow = { source: string; path: string; content: string }
type ReferenceItem = { label: string; href: string; tail: string }
export default async function PbsDestinationPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.destinations.pbs" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { destinations: { pbs: {
repoSelection: { sourceRows: SourceRow[] }
references: { items: ReferenceItem[] }
} } } }
}
const sourceRows = messages.docs.backupRestore.destinations.pbs.repoSelection.sourceRows
const references = messages.docs.backupRestore.destinations.pbs.references.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={11}
/>
<div className="mb-6 -mt-3">
<span className="inline-flex items-center gap-1.5 rounded-full border border-emerald-200 bg-emerald-50 px-2.5 py-0.5 text-xs font-semibold uppercase tracking-wide text-emerald-800">
<Star className="h-3.5 w-3.5 fill-current" aria-hidden="true" />
{t("recommendedBadge")}
</span>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("aboutPbs.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("aboutPbs.body", { code })}
</p>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("repoSelection.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("repoSelection.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Source</th>
<th className="text-left px-3 py-2 border-b border-gray-200">On-disk state</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Content</th>
</tr>
</thead>
<tbody className="text-gray-800">
{sourceRows.map((row, idx) => (
<tr key={row.source} className={idx < sourceRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.source}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs">{row.path}</td>
<td className="px-3 py-2 align-top">{t.rich(`repoSelection.sourceRows.${idx}.content`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("repoSelection.menuTitle")}
</h3>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("repoSelection.menuBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("backupCommand.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("backupCommand.intro", { code })}
</p>
<CopyableCode code={t("backupCommand.cmd")} language="bash" />
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("backupCommand.backupIdTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("backupCommand.backupIdBody", { code, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("backupCommand.pxarTitle")}
</h3>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("backupCommand.pxarBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("encryption.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("encryption.intro", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("encryption.keyfileTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("encryption.keyfileBody", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("encryption.recoveryTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("encryption.recoveryBody", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("encryption.blobUploadTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("encryption.blobUploadBody1", { code })}
</p>
<figure className="my-6">
<a
href="/images/docs/backup-restore/pbs-paired-backup-groups.png"
target="_blank"
rel="noopener noreferrer"
className="block cursor-zoom-in group"
aria-label={t("encryption.blobUploadImageAlt")}
>
<Image
src="/images/docs/backup-restore/pbs-paired-backup-groups.png"
alt={t("encryption.blobUploadImageAlt")}
width={1400}
height={700}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto transition group-hover:shadow-md"
/>
</a>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("encryption.blobUploadImageCaption")}
</figcaption>
</figure>
<h4 className="text-base font-semibold mt-6 mb-2 text-gray-900">
{t("encryption.blobUploadConstraintTitle")}
</h4>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("encryption.blobUploadConstraintBody", { code, strong, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("encryption.recoverTitle")}
</h3>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("encryption.recoverBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("restoreAccess.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("restoreAccess.body", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("references.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("references.intro")}
</p>
<ul className="mb-6 space-y-2">
{references.map((item) => (
<li key={item.href} className="text-gray-800 leading-relaxed">
<a
href={item.href}
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:underline font-medium inline-flex items-center gap-1"
>
{item.label}
<ExternalLink className="h-3 w-3" aria-hidden="true" />
</a>
<span>{item.tail}</span>
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,310 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.howItWorks.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox backup internals",
"proxmox manifest json",
"proxmox backup collectors",
"packages.manual.list",
"components_status.json",
"proxmenux rootfs",
"proxmox rsync backup",
"apply_cluster_postboot",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/how-it-works" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/how-it-works",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type CategoryRow = { category: string; paths: string; why: string }
type CollectorRow = { collector: string; produces: string; content: string }
type InstallerRow = { component: string; installer: string; action: string }
type StageRow = { stage: string; name: string; reads: string; action: string }
export default async function HowItWorksPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.howItWorks" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { howItWorks: {
rootfs: { categoryRows: CategoryRow[] }
manifest: { collectorRows: CollectorRow[] }
applications: { installerRows: InstallerRow[] }
restoreFlow: { stageRows: StageRow[] }
} } }
}
const hw = messages.docs.backupRestore.howItWorks
const categoryRows = hw.rootfs.categoryRows
const collectorRows = hw.manifest.collectorRows
const installerRows = hw.applications.installerRows
const stageRows = hw.restoreFlow.stageRows
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={14}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("layout.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("layout.intro", { code, strong })}
</p>
<figure className="my-6">
<pre className="bg-gray-50 border border-gray-200 rounded-md p-4 text-sm font-mono text-gray-800 overflow-x-auto whitespace-pre leading-relaxed">
{t("layout.tree")}
</pre>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("layout.treeCaption")}
</figcaption>
</figure>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("rootfs.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rootfs.intro", { code, strong, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("rootfs.defaultProfileTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rootfs.defaultProfileBody", { code, strong })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">{t("rootfs.categoriesTitle")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Paths</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Why</th>
</tr>
</thead>
<tbody className="text-gray-800">
{categoryRows.map((row, idx) => (
<tr key={row.category} className={idx < categoryRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.category}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs text-gray-700 leading-relaxed">{row.paths}</td>
<td className="px-3 py-2 align-top">{t.rich(`rootfs.categoryRows.${idx}.why`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("rootfs.customTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rootfs.customBody", { code, em, strong })}
</p>
<h4 className="text-base font-semibold mt-5 mb-2 text-gray-900">
{t("rootfs.customExtrasTitle")}
</h4>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rootfs.customExtrasBody", { code, em, strong })}
</p>
<h4 className="text-base font-semibold mt-5 mb-2 text-gray-900">
{t("rootfs.customModeTitle")}
</h4>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rootfs.customModeBody", { code, em, strong })}
</p>
<h4 className="text-base font-semibold mt-5 mb-2 text-gray-900">
{t("rootfs.customMissingTitle")}
</h4>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rootfs.customMissingBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("manifest.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("manifest.intro", { code, strong })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Collector</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Produces</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Content</th>
</tr>
</thead>
<tbody className="text-gray-800">
{collectorRows.map((row, idx) => (
<tr key={row.collector} className={idx < collectorRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.collector}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap">{row.produces}</td>
<td className="px-3 py-2 align-top">{t.rich(`manifest.collectorRows.${idx}.content`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="text-sm text-gray-500 italic text-center mb-6">
{t("manifest.orchestratorCaption")}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("manifest.schemaTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("manifest.schemaBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("applications.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("applications.intro", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("applications.packagesTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("applications.packagesBody", { code, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("applications.componentsTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("applications.componentsBody", { code, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-3 text-gray-900">
{t("applications.componentInstallersTitle")}
</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("applications.componentInstallersBody", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Component</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Installer</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Action on <code>--auto-reinstall</code></th>
</tr>
</thead>
<tbody className="text-gray-800">
{installerRows.map((row, idx) => (
<tr key={row.component} className={idx < installerRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.component}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap">{row.installer}</td>
<td className="px-3 py-2 align-top">{t.rich(`applications.installerRows.${idx}.action`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("restoreFlow.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("restoreFlow.intro", { code, strong })}
</p>
<div className="overflow-x-auto mb-2">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">#</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Stage</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Reads</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Action</th>
</tr>
</thead>
<tbody className="text-gray-800">
{stageRows.map((row, idx) => (
<tr key={row.stage} className={idx < stageRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs"><strong>{row.stage}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.name}</strong></td>
<td className="px-3 py-2 align-top font-mono text-xs">{row.reads}</td>
<td className="px-3 py-2 align-top">{t.rich(`restoreFlow.stageRows.${idx}.action`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="text-sm text-gray-500 italic text-center mb-6">
{t("restoreFlow.stagesCaption")}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whyItWorks.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("whyItWorks.body", { code, strong })}
</p>
</div>
)
}

View File

@@ -0,0 +1,162 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import { DataFlowDiagram } from "@/components/ui/data-flow-diagram"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox backup",
"proxmox host backup",
"proxmox restore",
"proxmox backup server",
"borg backup proxmox",
"cross-kernel restore",
"proxmox host restore",
"vzdump alternative",
"proxmenux backup",
"proxmox migration",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type WhatItIsNotItem = string
type WhereNextItem = { label: string; href: string; tail: string }
export default async function BackupRestoreOverviewPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: {
whatItIsNot: { items: WhatItIsNotItem[] }
whereNext: { items: WhereNextItem[] }
} }
}
const br = messages.docs.backupRestore
const whatItIsNotItems = br.whatItIsNot.items
const whereNextItems = br.whereNext.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={8}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whatItIsNot.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("whatItIsNot.intro", { strong })}
</p>
<ul className="mb-6 space-y-3">
{whatItIsNotItems.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed pl-1">
<span className="text-gray-400 mr-2"></span>
{t.rich(`whatItIsNot.items.${idx}`, { code, strong })}
</li>
))}
</ul>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("threePillars.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("threePillars.intro", { strong })}
</p>
<DataFlowDiagram
nodes={[
{ variant: "source", label: t("threePillars.pillar1Label"), detail: t("threePillars.pillar1Detail") },
{ variant: "source", label: t("threePillars.pillar2Label"), detail: t("threePillars.pillar2Detail") },
{ variant: "source", label: t("threePillars.pillar3Label"), detail: t("threePillars.pillar3Detail") },
]}
caption={t("threePillars.diagramCaption")}
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("restoreIsUniversal.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("restoreIsUniversal.body", { strong })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("twoInterfaces.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("twoInterfaces.intro", { strong })}
</p>
<DataFlowDiagram
nodes={[
{ variant: "bridge", label: t("twoInterfaces.cliLabel"), detail: t("twoInterfaces.cliDetail") },
{ variant: "bridge", label: t("twoInterfaces.webLabel"), detail: t("twoInterfaces.webDetail") },
]}
bidirectional
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whereNext.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("whereNext.intro", { em })}
</p>
<ul className="mb-6 space-y-2">
{whereNextItems.map((item) => (
<li key={item.href} className="text-gray-800 leading-relaxed">
<Link href={item.href} className="text-blue-600 hover:underline font-medium">
{item.label}
</Link>
<span>{item.tail}</span>
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,404 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import Image from "next/image"
import { Link } from "@/i18n/navigation"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.restoring.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox restore",
"proxmenux restore",
"hb_compat_check",
"apply_pending_restore",
"apply_cluster_postboot",
"path classification hot reboot dangerous",
"destructive rollback",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/restoring" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/restoring",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type ActionRow = { action: string; detail: string }
type OutputRow = { output: string; detail: string }
type ModeRow = { mode: string; detail: string }
type ClassRow = { class: string; detail: string }
type FileRow = { file: string; content: string }
type TaskRow = { task: string; detail: string }
type TimeRow = { stage: string; time: string; detail: string }
type LogRow = { log: string; detail: string }
type WhereNextItem = { label: string; href: string; tail: string }
export default async function RestoringPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.restoring" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { restoring: {
threeActions: { actionRows: ActionRow[] }
compatibilityCheck: { outputRows: OutputRow[] }
twoModes: { modeRows: ModeRow[] }
pathClassification: { rows: ClassRow[] }
pendingMachinery: { rows: FileRow[] }
postbootDispatcher: { tasks: TaskRow[] }
tenMinutes: { rows: TimeRow[] }
logs: { rows: LogRow[] }
whereNext: { items: WhereNextItem[] }
} } }
}
const rs = messages.docs.backupRestore.restoring
const actionRows = rs.threeActions.actionRows
const outputRows = rs.compatibilityCheck.outputRows
const modeRows = rs.twoModes.modeRows
const classRows = rs.pathClassification.rows
const pendingRows = rs.pendingMachinery.rows
const postbootTasks = rs.postbootDispatcher.tasks
const timeRows = rs.tenMinutes.rows
const logRows = rs.logs.rows
const whereNextItems = rs.whereNext.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const asciiDiagram = (text: string, caption: string) => (
<figure className="my-6">
<pre className="bg-gray-50 border border-gray-200 rounded-md p-4 text-xs sm:text-sm font-mono text-gray-800 overflow-x-auto whitespace-pre leading-relaxed">
{text}
</pre>
{caption && (
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{caption}
</figcaption>
)}
</figure>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={22}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("threeActions.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t("threeActions.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Action</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{actionRows.map((row, idx) => (
<tr key={row.action} className={idx < actionRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.action}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`threeActions.actionRows.${idx}.detail`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("compatibilityCheck.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("compatibilityCheck.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Output</th>
<th className="text-left px-3 py-2 border-b border-gray-200">What it drives</th>
</tr>
</thead>
<tbody className="text-gray-800">
{outputRows.map((row, idx) => (
<tr key={row.output} className={idx < outputRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.output}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`compatibilityCheck.outputRows.${idx}.detail`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("compatibilityCheck.reportBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("twoModes.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("twoModes.intro", { em })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Mode</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{modeRows.map((row, idx) => (
<tr key={row.mode} className={idx < modeRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.mode}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`twoModes.modeRows.${idx}.detail`, { code, em })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("pathClassification.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("pathClassification.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Class</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Behaviour</th>
</tr>
</thead>
<tbody className="text-gray-800">
{classRows.map((row, idx) => (
<tr key={row.class} className={idx < classRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs"><strong>{row.class}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`pathClassification.rows.${idx}.detail`, { code, em, strong })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("fullFlow.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("fullFlow.intro")}
</p>
{asciiDiagram(t("fullFlow.diagram"), "")}
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("pendingMachinery.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("pendingMachinery.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">File</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Content</th>
</tr>
</thead>
<tbody className="text-gray-800">
{pendingRows.map((row, idx) => (
<tr key={row.file} className={idx < pendingRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs"><strong>{row.file}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`pendingMachinery.rows.${idx}.content`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("pendingMachinery.unitBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("postbootDispatcher.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("postbootDispatcher.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Task</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{postbootTasks.map((row, idx) => (
<tr key={row.task} className={idx < postbootTasks.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.task}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`postbootDispatcher.tasks.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("postbootExample.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("postbootExample.body", { code })}
</p>
<figure className="my-6">
<a
href="/images/docs/backup-restore/postboot-completion-console.png"
target="_blank"
rel="noopener noreferrer"
className="block cursor-zoom-in group"
aria-label={t("postbootExample.imageAlt")}
>
<Image
src="/images/docs/backup-restore/postboot-completion-console.png"
alt={t("postbootExample.imageAlt")}
width={1600}
height={800}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto transition group-hover:shadow-md"
/>
</a>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("postbootExample.imageCaption")}
</figcaption>
</figure>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("tenMinutes.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("tenMinutes.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Stage</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Time</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{timeRows.map((row, idx) => (
<tr key={row.stage} className={idx < timeRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top"><strong>{row.stage}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.time}</td>
<td className="px-3 py-2 align-top">{t.rich(`tenMinutes.rows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("tenMinutes.outroBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("destructiveRollback.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("destructiveRollback.body", { code, em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("logs.heading")}
</h2>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Log path</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Content</th>
</tr>
</thead>
<tbody className="text-gray-800">
{logRows.map((row, idx) => (
<tr key={row.log} className={idx < logRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs">{row.log}</td>
<td className="px-3 py-2 align-top">{t.rich(`logs.rows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whereNext.heading")}
</h2>
<ul className="mb-6 space-y-2">
{whereNextItems.map((item) => (
<li key={item.href} className="text-gray-800 leading-relaxed">
<Link href={item.href} className="text-blue-600 hover:underline font-medium">
{item.label}
</Link>
<span>{item.tail}</span>
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,272 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Info } from "lucide-react"
import { Link } from "@/i18n/navigation"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.backupRestore.scheduledJobs.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox scheduled backup",
"proxmenux backup job",
"systemd timer backup",
"vzdump attach hook",
"keep-last keep-daily",
"backup retention proxmox",
],
alternates: { canonical: "https://proxmenux.com/docs/backup-restore/scheduled-jobs" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/backup-restore/scheduled-jobs",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type ModeRow = { mode: string; backends: string; schedule: string; retention: string }
type StepRow = { step: string; detail: string }
type LayoutRow = { path: string; content: string }
type MgmtRow = { action: string; detail: string }
type WhereNextItem = { label: string; href: string; tail: string }
export default async function ScheduledJobsPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.backupRestore.scheduledJobs" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { backupRestore: { scheduledJobs: {
intro: { modelsList: string[] }
modes: { rows: ModeRow[] }
attachDetail: { steps: StepRow[] }
storageLayout: { rows: LayoutRow[] }
runner: { steps: string[] }
management: { rows: MgmtRow[] }
whereNext: { items: WhereNextItem[] }
} } }
}
const sj = messages.docs.backupRestore.scheduledJobs
const modelsList = sj.intro.modelsList
const modeRows = sj.modes.rows
const attachSteps = sj.attachDetail.steps
const layoutRows = sj.storageLayout.rows
const runnerSteps = sj.runner.steps
const mgmtRows = sj.management.rows
const whereNextItems = sj.whereNext.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={11}
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("intro.title")}
</h2>
<p className="mb-3 text-gray-800 leading-relaxed">
{t("intro.body")}
</p>
<ul className="mb-6 space-y-3">
{modelsList.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed pl-1">
<span className="text-gray-400 mr-2"></span>
{t.rich(`intro.modelsList.${idx}`, { code, strong })}
</li>
))}
</ul>
<div className="my-8 rounded-lg border border-blue-200 bg-blue-50 p-5">
<div className="flex items-start gap-3">
<Info className="h-5 w-5 text-blue-600 shrink-0 mt-0.5" aria-hidden="true" />
<div>
<h3 className="text-base font-semibold text-blue-900 mb-1">
{t("attachBadge.title")}
</h3>
<p className="text-sm text-blue-900/90 leading-relaxed">
{t.rich("attachBadge.body", { code, strong })}
</p>
</div>
</div>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("modes.heading")}
</h2>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Mode</th>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Backends</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Schedule</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Retention</th>
</tr>
</thead>
<tbody className="text-gray-800">
{modeRows.map((row, idx) => (
<tr key={row.mode} className={idx < modeRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.mode}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap text-xs">{row.backends}</td>
<td className="px-3 py-2 align-top">{t.rich(`modes.rows.${idx}.schedule`, { code })}</td>
<td className="px-3 py-2 align-top">{t.rich(`modes.rows.${idx}.retention`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("attachDetail.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("attachDetail.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">#</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{attachSteps.map((row, idx) => (
<tr key={row.step} className={idx < attachSteps.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs whitespace-nowrap"><strong>{row.step}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`attachDetail.steps.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("attachDetail.outroBody", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("storageLayout.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("storageLayout.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Path</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Content</th>
</tr>
</thead>
<tbody className="text-gray-800">
{layoutRows.map((row, idx) => (
<tr key={row.path} className={idx < layoutRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top font-mono text-xs">{row.path}</td>
<td className="px-3 py-2 align-top">{t.rich(`storageLayout.rows.${idx}.content`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t.rich("runner.heading", { code })}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("runner.intro")}
</p>
<ol className="mb-6 space-y-3 list-decimal pl-6">
{runnerSteps.map((_, idx) => (
<li key={idx} className="text-gray-800 leading-relaxed">
{t.rich(`runner.steps.${idx}`, { code, strong })}
</li>
))}
</ol>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("management.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("management.intro")}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200 whitespace-nowrap">Action</th>
<th className="text-left px-3 py-2 border-b border-gray-200">Detail</th>
</tr>
</thead>
<tbody className="text-gray-800">
{mgmtRows.map((row, idx) => (
<tr key={row.action} className={idx < mgmtRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.action}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`management.rows.${idx}.detail`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("notifications.heading")}
</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("notifications.body", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
{t("whereNext.heading")}
</h2>
<ul className="mb-6 space-y-2">
{whereNextItems.map((item) => (
<li key={item.href} className="text-gray-800 leading-relaxed">
<Link href={item.href} className="text-blue-600 hover:underline font-medium">
{item.label}
</Link>
<span>{item.tail}</span>
</li>
))}
</ul>
</div>
)
}

View File

@@ -34,6 +34,7 @@ export default async function NetworkTabPage({
const messages = (await getMessages({ locale })) as unknown as {
docs: { monitor: { dashboard: { network: {
topRow: { rows: TopRow[] }
flow: { elements: string[]; pulses: string[] }
groups: { badges: string[] }
drillIn: { rows: DrillRow[] }
latency: {
@@ -48,6 +49,8 @@ export default async function NetworkTabPage({
}
const net = messages.docs.monitor.dashboard.network
const topRows = net.topRow.rows
const flowElements = net.flow.elements
const flowPulses = net.flow.pulses
const badges = net.groups.badges
const drillRows = net.drillIn.rows
const targets = net.latency.targets
@@ -96,6 +99,42 @@ export default async function NetworkTabPage({
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("flow.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("flow.intro", { strong })}
</p>
<figure className="my-4">
<img
src="/monitor/network-flow-overview.png"
alt={t("flow.imageAlt")}
className="rounded-lg border border-gray-200 shadow-sm w-full"
/>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("flow.imageCaption")}
</figcaption>
</figure>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("flow.elementsTitle")}</h3>
<p className="mb-2 text-gray-800 leading-relaxed">{t("flow.elementsIntro")}</p>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{flowElements.map((_, idx) => (
<li key={idx}>{t.rich(`flow.elements.${idx}`, { strong })}</li>
))}
</ul>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("flow.pulsesTitle")}</h3>
<p className="mb-2 text-gray-800 leading-relaxed">{t("flow.pulsesBody")}</p>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{flowPulses.map((_, idx) => (
<li key={idx}>{t.rich(`flow.pulses.${idx}`, { strong, em })}</li>
))}
</ul>
<Callout variant="tip" title={t("flow.useTitle")}>
{t.rich("flow.useBody", { em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("groups.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("groups.intro", { strong })}

View File

@@ -79,6 +79,9 @@ export default async function AutomatedPage({
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-600 hover:underline">{chunks}</Link>
)
const log2ramLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/optional#log2ram" className="text-blue-600 hover:underline">{chunks}</Link>
)
return (
<div>
@@ -116,7 +119,9 @@ export default async function AutomatedPage({
<tr key={i}>
<td className="px-4 py-2 text-gray-500 font-mono">{i + 1}</td>
<td className="px-4 py-2 font-semibold">{o.tool}</td>
<td className="px-4 py-2 text-gray-700 leading-relaxed">{o.what}</td>
<td className="px-4 py-2 text-gray-700 leading-relaxed">
{t.rich(`optimizations.${i}.what`, { link: log2ramLink })}
</td>
<td className="px-4 py-2">
<Link
href={`/docs/post-install/${o.categorySlug}`}

View File

@@ -1,6 +1,6 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Plus } from "lucide-react"
import { Plus, ExternalLink } from "lucide-react"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
@@ -63,6 +63,7 @@ export default async function OptionalSettingsPage({
testing: { doesItems: string[] }
fastfetch: { doesItems: string[]; customItems: string[]; logos: Logo[] }
figurine: { doesItems: string[] }
log2ram: { doesItems: string[] }
} } }
}
const cephItems = messages.docs.postInstall.optional.ceph.doesItems
@@ -73,6 +74,7 @@ export default async function OptionalSettingsPage({
const fastfetchCustomItems = messages.docs.postInstall.optional.fastfetch.customItems
const fastfetchLogos = messages.docs.postInstall.optional.fastfetch.logos
const figurineItems = messages.docs.postInstall.optional.figurine.doesItems
const log2ramItems = messages.docs.postInstall.optional.log2ram.doesItems
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
@@ -328,6 +330,46 @@ chmod +x "/etc/profile.d/figurine.sh"
<p className="mt-4">{t("figurine.outro")}</p>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={7} />
{t("log2ram.title")}
</h3>
<p className="mb-4">
{t.rich("log2ram.intro", { code, em })}
</p>
<p className="mb-4 flex items-center gap-1 text-sm">
<strong className="mr-1">{t("log2ram.upstreamLabel")}</strong>
<a
href={t("log2ram.upstreamUrl")}
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:underline inline-flex items-center gap-1"
>
{t("log2ram.upstreamLinkLabel")}
<ExternalLink className="h-3.5 w-3.5" aria-hidden="true" />
</a>
</p>
<p className="mb-4">
<strong>{t("log2ram.doesLabel")}</strong>
</p>
<ul className="list-disc pl-5 mb-4">
{log2ramItems.map((_, idx) => (
<li key={idx}>{t.rich(`log2ram.doesItems.${idx}`, { code, em })}</li>
))}
</ul>
<p className="mb-2">
<strong>{t("log2ram.howUseLabel")}</strong> {t("log2ram.howUseBody")}
</p>
<p className="text-lg mt-6 mb-2">
<strong>{t("log2ram.verifyLabel")}</strong>
</p>
<CopyableCode code={t.raw("log2ram.verifyCode") as string} />
<section className="mt-12 p-4 bg-blue-100 rounded-md">
<h2 className="text-xl font-semibold mb-2">{t("autoApplication.title")}</h2>
<p>{t("autoApplication.body")}</p>

View File

@@ -64,7 +64,15 @@ export default async function PostInstallStoragePage({
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong })}
{t.rich("intro.body", {
strong,
code,
link: (chunks) => (
<Link href="/docs/post-install/optional#log2ram" className="text-blue-700 hover:underline">
{chunks}
</Link>
),
})}
</Callout>
<Callout variant="warning" title={t("notTrackedTitle")}>

View File

@@ -248,6 +248,31 @@ export const sidebarItems: MenuItem[] = [
],
},
{
title: "Backup & Restore",
i18nKey: "backupRestore",
href: "/docs/backup-restore",
submenu: [
{ title: "Overview", i18nKey: "backupRestoreOverview", href: "/docs/backup-restore" },
{ title: "How it works", i18nKey: "backupRestoreHowItWorks", href: "/docs/backup-restore/how-it-works" },
{
title: "Destinations",
i18nKey: "backupRestoreDestinations",
href: "/docs/backup-restore/destinations",
submenu: [
{ title: "Overview", i18nKey: "backupRestoreDestOverview", href: "/docs/backup-restore/destinations" },
{ title: "Local archive", i18nKey: "backupRestoreDestLocal", href: "/docs/backup-restore/destinations/local" },
{ title: "Proxmox Backup Server", i18nKey: "backupRestoreDestPbs", href: "/docs/backup-restore/destinations/pbs" },
{ title: "Borg", i18nKey: "backupRestoreDestBorg", href: "/docs/backup-restore/destinations/borg" },
],
},
{ title: "Creating backups", i18nKey: "backupRestoreCreating", href: "/docs/backup-restore/creating-backups" },
{ title: "Scheduled jobs", i18nKey: "backupRestoreJobs", href: "/docs/backup-restore/scheduled-jobs" },
{ title: "Restoring", i18nKey: "backupRestoreRestoring", href: "/docs/backup-restore/restoring" },
{ title: "Cross-kernel restore", i18nKey: "backupRestoreCrossKernel", href: "/docs/backup-restore/cross-kernel" },
],
},
{
title: "Commands Reference",
i18nKey: "commandsReference",

View File

@@ -168,7 +168,19 @@
"aboutContributors": "Contributors",
"aboutContributing": "Contributing",
"aboutCodeOfConduct": "Code of Conduct",
"externalRepositories": "External Repositories"
"externalRepositories": "External Repositories",
"backupRestore": "Backup & Restore",
"backupRestoreOverview": "Overview",
"backupRestoreHowItWorks": "How it works",
"backupRestoreDestinations": "Destinations",
"backupRestoreDestOverview": "Overview",
"backupRestoreDestLocal": "Local archive",
"backupRestoreDestPbs": "Proxmox Backup Server",
"backupRestoreDestBorg": "Borg",
"backupRestoreCreating": "Creating backups",
"backupRestoreJobs": "Scheduled jobs",
"backupRestoreRestoring": "Restoring",
"backupRestoreCrossKernel": "Cross-kernel restore"
}
},
"hero": {
@@ -213,4 +225,4 @@
"ogTail": "Subscribe via RSS or check back for new versions."
}
}
}
}

View File

@@ -0,0 +1,141 @@
{
"meta": {
"title": "Creating backups — interactive backup flow | ProxMenux",
"description": "The interactive backup flow in ProxMenux. Two entry points (Scripts TUI menu and Monitor Web UI), three destinations, two profile modes, one staging step, and one confirmation dialog. Documents the six-option matrix, the default and custom profiles, and what the operator sees between selecting a backup and the archive landing on the destination.",
"ogTitle": "ProxMenux Backup — creating backups",
"ogDescription": "The interactive backup flow with three destinations, two profiles and a common staging step.",
"twitterTitle": "Creating backups | ProxMenux",
"twitterDescription": "Interactive backup flow with three destinations and two profile modes."
},
"header": {
"title": "Creating backups",
"description": "The interactive backup flow: pick a destination and a profile, review the confirmation summary, watch the archive land. Two entry points share the same backend and produce identical archives.",
"section": "Backup & Restore"
},
"intro": {
"title": "Two entry points, identical functionality",
"body": "The Scripts TUI and the Monitor Web UI expose <strong>exactly the same functionality</strong>. Every backup — manual or scheduled — goes through the same choice matrix (three destinations × two profiles) and invokes the same backend function per cell (<code>_bk_pbs</code>, <code>_bk_borg</code> or <code>_bk_local</code>). The archives produced from either entry point are indistinguishable. Which one to use is a matter of preference: the TUI is SSH-friendly and scriptable; the Monitor offers point-and-click and lives alongside the notification and log tail views."
},
"entryPoints": {
"heading": "The two entry points",
"rows": [
{ "entry": "ProxMenux Scripts (TUI)", "path": "menu → Utilities → Host Config Backup", "detail": "Dialog-based flow, SSH-friendly. The main menu presents the six options directly. Uses <code>backup_menu</code> in <code>backup_host.sh</code>." },
{ "entry": "ProxMenux Monitor (Web UI)", "path": "Backups tab → Create backup", "detail": "Wizard-style flow. Same six options presented as a two-step form (destination → profile). Same backend functions are invoked over the Flask API." }
]
},
"modes": {
"heading": "Manual vs scheduled backups",
"body": "Backups can be produced in two modes: <strong>manual</strong> (the interactive flow this page documents — the operator picks a destination and a profile from a menu and watches the archive land) or <strong>scheduled</strong> (an unattended job that runs on a cron-style timer and applies the retention configured on the job). Both modes support the same three destinations and the same two profiles, and both are available from both entry points — the Scripts TUI menu and the Monitor Backups tab. Scheduled jobs use the same backend functions as the manual flow through <code>run_scheduled_backup.sh</code>; the archives produced are indistinguishable.",
"seeAlso": "The scheduled-jobs page covers the full flow, including how to create a job, attach it to an existing PVE vzdump timer, and configure the retention values.",
"monitorAlt": "ProxMenux Monitor Backups tab showing the New scheduled backup dialog with destination, profile, schedule and retention fields.",
"monitorCaption": "Scheduled backup — ProxMenux Monitor. The same wizard-style dialog that creates a manual backup carries the schedule and retention fields at the bottom for the unattended path."
},
"matrix": {
"heading": "The six-option matrix",
"intro": "The choice determines both which backend runs and what path selection strategy is applied. Cross-reference the destination-specific pages for the configuration details of each cell.",
"rows": [
{ "combo": "1", "destination": "PBS", "profile": "Default", "action": "Uploads the default profile plus persistent extras to a configured PBS repository." },
{ "combo": "2", "destination": "Borg", "profile": "Default", "action": "Creates an archive with the default profile plus persistent extras in the selected Borg repository." },
{ "combo": "3", "destination": "Local", "profile": "Default", "action": "Writes a <code>.tar.zst</code> archive with the default profile plus persistent extras to the configured local target." },
{ "combo": "4", "destination": "PBS", "profile": "Custom", "action": "Opens the path picker before the PBS upload; the operator ticks paths and can add new ones." },
{ "combo": "5", "destination": "Borg", "profile": "Custom", "action": "Opens the path picker before the Borg archive create." },
{ "combo": "6", "destination": "Local", "profile": "Custom", "action": "Opens the path picker before writing the local <code>.tar.zst</code>." }
]
},
"profiles": {
"heading": "Default vs Custom profile",
"defaultTitle": "Default profile",
"defaultBody": "The default profile is the curated list from <code>hb_default_profile_paths</code> (documented in <em>How it works</em> under <em>Path categories</em>) plus every entry in the persistent extras file <code>/usr/local/share/proxmenux/backup-extra-paths.txt</code>. The operator confirms the destination and encryption options and the backup proceeds without further path selection.",
"customTitle": "Custom profile",
"customBody": "The custom profile opens a checklist showing every path in the default profile (unchecked) and every persistent extra (pre-checked, prefixed with <code>[+]</code>). The operator ticks the set for this run and can press <em>Add custom path</em> to append a new absolute path. Any path added inline is persisted to <code>backup-extra-paths.txt</code> so future backups pick it up automatically without re-adding it. Removing a persistent extra unticks it for this run but does not delete it from the file — deletion is a separate <em>Manage custom paths</em> action outside the backup flow.",
"customPickerAlt": "Custom profile checklist showing the default-profile paths (unchecked) and persistent extras (pre-checked with a [+] prefix), plus buttons to add a new path or confirm the selection.",
"customPickerCaption": "Custom profile — the path picker. Default-profile paths are unchecked; persistent extras appear pre-checked with a [+] prefix. The operator ticks the set for this run.",
"manageCustomAlt": "Manage custom paths menu showing the list of persistent extras and options to add, remove or edit them.",
"manageCustomCaption": "Manage custom paths — the entry point where persistent extras are added or removed. Every path listed here is included automatically in Default-mode backups without needing to open the Custom picker."
},
"commonPipeline": {
"heading": "What runs regardless of destination",
"intro": "After the profile is resolved, every backend runs the same staging pipeline before diverging into its own upload path. <code>hb_prepare_staging</code> assembles the archive tree in <code>/tmp/proxmenux-DESTINATION-stage.XXXXXX</code> and populates each of the three payloads.",
"steps": [
{ "step": "1", "name": "rootfs assembly", "detail": "Runs <code>rsync -a</code> for each selected path into <code>staging_root/rootfs/</code>. Excludes volatile subpaths (bash history, caches, trash) from <code>/root/</code>. Paths absent from the source are recorded in <code>metadata/missing_paths.txt</code> without stopping the backup." },
{ "step": "2", "name": "Manifest generation", "detail": "<code>build_manifest.sh</code> orchestrates the six collectors and writes <code>manifest.json</code> at the top of staging. On collector failure, the affected section falls back to a documented empty default; the manifest is still valid." },
{ "step": "3", "name": "Package inventory", "detail": "<code>apt-mark showmanual</code> is captured verbatim into <code>metadata/packages.manual.list</code>. Component state is already inside the restored rootfs (<code>components_status.json</code>) because <code>/usr/local/share/proxmenux/</code> is part of the default profile." },
{ "step": "4", "name": "Run info", "detail": "<code>metadata/run_info.env</code> records the backup run identity — hostname, timestamp, kernel version — used by the restore's compatibility check to determine the cross-kernel direction." },
{ "step": "5", "name": "Notification (start)", "detail": "<code>hb_notify_lifecycle \"start\"</code> fires. If notifications are configured in the Monitor, an operator-facing <em>Host backup started</em> event is emitted. Silent if no channels are configured." }
]
},
"included": {
"heading": "What goes in and what stays out",
"intro": "Every path in the resolved profile (default + persistent extras + custom-mode selection) is copied with <code>rsync -aAXH --numeric-ids</code>. A shared exclusion list applies to every path, and two directories carry additional path-specific exclusions.",
"globalTitle": "Global exclusions (applied to every path)",
"globalItems": [
"<code>images/</code> — image dumps.",
"<code>dump/</code> — vzdump outputs.",
"<code>tmp/</code> — temporary files.",
"<code>*.log</code> — log files."
],
"rootTitle": "<code>/root/</code> exclusions",
"rootBody": "<code>/root/</code> is part of the default profile so operator scripts and config land in the archive. Volatile subpaths are dropped:",
"rootItems": [
"<code>.bash_history</code>",
"<code>.cache/</code>",
"<code>tmp/</code>",
"<code>.local/share/Trash/</code>"
],
"proxmenuxTitle": "<code>/usr/local/share/proxmenux/</code> exclusions",
"proxmenuxBody": "This directory ships user state only — <code>components_status.json</code>, preferences, post-install cache. Code that the destination will already have from its own ProxMenux install is excluded so a restore does not overwrite the target's current binaries with older ones:",
"proxmenuxItems": [
"<code>restore-pending/</code>, <code>scripts/</code>, <code>web/</code>",
"<code>monitor-app/</code>, <code>monitor-app.*/</code>, <code>AppImage/</code>",
"<code>images/</code>, <code>json/</code>",
"<code>utils.sh</code>, <code>helpers_cache.json</code>",
"<code>ProxMenux-Monitor.AppImage*</code>, <code>install_proxmenux*.sh</code>"
],
"notInProfileTitle": "Paths outside the profile",
"notInProfileBody": "Anything not listed in <code>hb_default_profile_paths</code> and not added as a custom or persistent extra is not part of the backup. Notable examples:",
"notInProfileItems": [
"<strong>VM and LXC disks</strong> — handled by <code>vzdump</code>, not by this feature. Guest configuration files under <code>/etc/pve/nodes/*/qemu-server/*.conf</code> and <code>lxc/*.conf</code> are captured (they live under <code>/etc/pve</code>) so the restore reproduces the inventory; the disks themselves are re-attached from an existing vzdump/PBS backup.",
"<strong><code>/boot</code> and <code>/boot/efi</code></strong> — kernel binaries, initramfs and the UEFI ESP partition are regenerated by the target's own <code>update-initramfs</code>, <code>update-grub</code> or <code>proxmox-boot-tool refresh</code> after the restore. The bootloader is never copied verbatim.",
"<strong>Kernel and system runtime filesystems</strong> — <code>/proc</code>, <code>/sys</code>, <code>/dev</code> and <code>/run</code> are pseudo-filesystems produced by the kernel and udev; they are not persisted anywhere.",
"<strong>Package binaries under <code>/usr/bin</code>, <code>/usr/lib</code>, <code>/lib</code>, <code>/sbin</code></strong> — reinstalled by the target's APT from <code>packages.manual.list</code>.",
"<strong><code>/var/log/</code>, <code>/var/tmp/</code>, <code>/var/cache/</code></strong> — per-host runtime state, not restored.",
"<strong><code>/home/USER</code></strong> — not in the default profile. Add it as a custom path when a system carries user home directories that must survive a restore."
],
"customPathsTitle": "How custom paths are handled",
"customPathsBody": "A custom path added inline in Custom mode or persisted in <code>backup-extra-paths.txt</code> goes through the same <code>rsync</code> pipeline as default-profile paths. Global exclusions apply. If the custom path happens to be under <code>/root/</code> or <code>/usr/local/share/proxmenux/</code>, the path-specific exclusions above still apply. Every archived path — default or custom — is recorded in <code>metadata/paths_archived.txt</code>. Paths that do not exist on the source are recorded in <code>metadata/missing_paths.txt</code> without stopping the backup."
},
"archiveStructure": {
"heading": "Archive structure",
"intro": "The staging directory produced by every backend follows the same layout regardless of destination. The tarball, PBS <code>.pxar</code> or Borg archive stores this tree verbatim.",
"tree": "backup-[timestamp]/\n├── manifest.json # structured host state (kernel_params, hardware, storage, guests, components, source_host)\n├── metadata/\n│ ├── packages.manual.list # output of apt-mark showmanual\n│ ├── run_info.env # hostname, timestamp, kernel version\n│ ├── paths_archived.txt # exact list of paths that reached rootfs/\n│ └── missing_paths.txt # paths from the profile absent on source\n└── rootfs/\n ├── etc/ # /etc/pve, /etc/network, /etc/ssh, /etc/apt, ...\n ├── root/ # /root without volatile subpaths\n ├── usr/local/ # /usr/local/bin, /usr/local/sbin, /usr/local/share/proxmenux (state only)\n └── var/ # /var/lib/pve-cluster, /var/spool/cron/crontabs"
},
"confirmation": {
"heading": "Confirmation summary",
"body": "Before the backend writes anything to the destination, ProxMenux shows a summary dialog with the destination, backup ID or archive name, encryption state, and the list of paths being copied. Cancelling here aborts the backup cleanly — the staging directory is removed by the <code>trap</code> hook set on the backend function and no partial data reaches the destination."
},
"writing": {
"heading": "Writing to the destination",
"intro": "Once the operator confirms, each backend runs its own write step. The mechanics are covered in the destination pages; the shared surface is the log, the sidecar and the completion notification.",
"rows": [
{ "topic": "Log file", "detail": "Every backend writes its full output to <code>/tmp/proxmenux-DESTINATION-backup-YYYYMMDD_HHMMSS.log</code> and, on failure, offers to open it in a scrollable dialog. The log path is printed in the completion summary only when the file has content." },
{ "topic": "Sidecar (local only)", "detail": "<code>hb_write_archive_sidecar</code> drops a <code>*.proxmenux.json</code> next to the local archive so the Monitor identifies it as a ProxMenux host backup even after moves or renames." },
{ "topic": "Notification (complete/fail)", "detail": "<code>hb_notify_lifecycle \"complete\"</code> or <code>\"fail\"</code> fires with duration, archive size and — for failures — the last error-looking line from the log." }
]
},
"finishedScreens": {
"heading": "What a finished backup looks like",
"intro": "The same completion event is surfaced by both entry points. The TUI writes a summary block to the terminal; the Monitor's Backups tab shows the run in the archive list with size, duration and status badges.",
"scriptsAlt": "ProxMenux Scripts TUI showing a finished host backup — destination, backup ID, snapshot path, data size, duration and encryption state.",
"scriptsCaption": "Finished backup — ProxMenux Scripts (TUI). The completion block prints the destination, backup ID, resulting snapshot or archive name, data size, duration and encryption state.",
"monitorAlt": "ProxMenux Monitor Backups tab showing a finished host backup entry with size, duration, method badge and encryption indicator.",
"monitorCaption": "Finished backup — ProxMenux Monitor Backups tab. The new backup appears in the archive list with the destination method badge, size, duration and — when applicable — the encryption lock indicator."
},
"whereNext": {
"heading": "Where to go next",
"items": [
{ "label": "Destinations", "href": "/docs/backup-restore/destinations", "tail": " — configuration details for Local, PBS and Borg." },
{ "label": "Scheduled jobs", "href": "/docs/backup-restore/scheduled-jobs", "tail": " — running the same backup unattended on a schedule instead of interactively." },
{ "label": "Restoring", "href": "/docs/backup-restore/restoring", "tail": " — the flow that consumes what this page produces." }
]
}
}

View File

@@ -0,0 +1,94 @@
{
"meta": {
"title": "Cross-kernel restore — direction detection, safe-subset filter, hydration | ProxMenux",
"description": "How ProxMenux restores a host backup on a target running a different major kernel version. Documents how the direction of the mismatch is detected, the safe-subset filter that skips boot-critical paths when the target runs a newer kernel than the backup, and the four-phase kernel-agnostic hydration that reapplies user tuning like IOMMU, VFIO IDs and custom cmdline tokens without copying kernel-tied files verbatim.",
"ogTitle": "ProxMenux Backup — cross-kernel restore and hydration",
"ogDescription": "Direction-aware cross-kernel restore with a safe-subset filter and kernel-agnostic hydration.",
"twitterTitle": "Cross-kernel restore | ProxMenux",
"twitterDescription": "How ProxMenux handles a restore when the target kernel differs from the backup's."
},
"header": {
"title": "Cross-kernel restore",
"description": "How ProxMenux handles a restore when the target host runs a different kernel from the one recorded in the backup — especially when the target runs a newer kernel. Documents how the difference is detected, how boot-critical paths that could break the target are filtered, and how the user's own configuration is reapplied without copying kernel-tied files verbatim.",
"section": "Backup & Restore"
},
"intro": {
"title": "Every kernel jump is handled differently",
"body": "A Proxmox host's kernel is identified by a version string like <code>6.17.13-2-pve</code>. The first two numbers (<strong>6.17</strong> in this example) define the major version: when they change, some configuration files written for the previous kernel may not be valid on the new one. When the restore detects that the backup and the target have different major kernel versions, the flow branches based on the direction of the jump — whether the backup is older or newer than the target — because the two cases have opposite failure modes. Backups newer than the target restore cleanly as-is (bench-verified across multiple kernel jumps). Backups older than the target need a filter to avoid breaking the target's boot with configuration written for a kernel that has since changed."
},
"directionCheck": {
"heading": "The direction check",
"intro": "During the compatibility check, <code>hb_compat_check</code> compares the kernel recorded in the backup's manifest against the target's current kernel (<code>uname -r</code>) and classifies the restore into one of three cases, stored in the internal variable <code>HB_COMPAT_KERNEL_DIRECTION</code>:",
"rows": [
{ "direction": "same", "condition": "The major kernel version matches between backup and target.", "behavior": "The full restore flow runs unchanged. No extra filter, no hydration, no special notice in the UI." },
{ "direction": "bk_newer", "condition": "Backup kernel is NEWER than the target's (for example: the backup was made on kernel 7.0 and the target runs kernel 6.17).", "behavior": "The full restore flow runs unchanged, exactly like <code>same</code>. No filter is applied. Verified empirically: drivers auto-reinstall against the target's kernel, IOMMU config applies cleanly, VMs with GPU passthrough come up without issue." },
{ "direction": "bk_older", "condition": "Backup kernel is OLDER than the target's (for example: the backup was made on kernel 6.17 and the target runs kernel 7.0).", "behavior": "The safe-subset filter and the four-phase hydration below are activated. The restore proceeds — the target reproduces the source, but boot-critical files are not copied verbatim." }
]
},
"whyBkNewerIsSafe": {
"heading": "Why a backup with a newer kernel than the target restores unchanged",
"body": "When the restore runs against a target with an <em>older</em> kernel than the one recorded in the backup, every mechanism the restore depends on is independent of the kernel version. GPU driver installers and other PCI-device installers detect the running kernel with <code>uname -r</code> and compile DKMS against whatever the target has. The APT package install pulls binaries built for the target's distribution. IOMMU cmdline tokens like <code>intel_iommu=on</code> are stable across major kernel versions. The backup carries paths written under a newer kernel, but those paths (module blacklists, GRUB defaults, initramfs config) are still valid syntax on the older one — kernels ignore tokens they do not recognise instead of failing. This case is equivalent in practice to a same-kernel restore, and ProxMenux treats it as such."
},
"safeSubsetFilter": {
"heading": "The safe-subset filter (only when the target kernel is newer)",
"intro": "When the target kernel is newer than the backup's, the compatibility check adds 16 boot-critical paths from <code>hb_unsafe_paths_cross_version</code> to <code>RS_SKIP_PATHS</code>. These paths are excluded from the restore because writing a version of them from an older kernel over a target running a newer one has caused kernel panics in bench tests. The paths cover four categories:",
"categoryRows": [
{ "category": "Bootloader", "paths": "<code>/etc/default/grub</code>, <code>/etc/kernel</code>", "reason": "GRUB defaults tied to the prior kernel order, and proxmox-boot-tool state (cmdline, ESP UUIDs, hooks) that references paths and identifiers from the older install." },
{ "category": "Kernel modules and boot artifacts", "paths": "<code>/etc/modules-load.d</code>, <code>/etc/modprobe.d</code>, <code>/etc/initramfs-tools</code>", "reason": "Autoload lists that may reference modules renamed between kernel majors, module options that may not apply, initramfs hooks written for the older kernel." },
{ "category": "Storage stack and filesystem identity", "paths": "<code>/etc/fstab</code>, <code>/etc/multipath</code>, <code>/etc/iscsi</code>, <code>/etc/udev/rules.d</code>, <code>/etc/zfs</code>", "reason": "UUIDs that may not exist on this install, multipath drivers that change between kernels, iSCSI parameters that evolve, udev rules that may bind to nonexistent subsystems, ZFS state (<code>zpool.cache</code> + <code>hostid</code>) that can lock the pool as foreign." },
{ "category": "APT sources", "paths": "<code>/etc/apt</code>", "reason": "APT source suites may trigger a downgrade of critical packages on the next upgrade." },
{ "category": "systemd", "paths": "<code>/etc/systemd/system</code>, <code>/etc/systemd/journald.conf</code>, <code>/etc/systemd/logind.conf</code>, <code>/etc/systemd/system.conf</code>, <code>/etc/systemd/user.conf</code>", "reason": "Unit overrides and .wants tied to the older systemd major; configuration keys that may not parse on a newer systemd." }
],
"outroBody": "The filter runs BEFORE the confirmation dialog so the user sees the exact list of paths that will be skipped, categorised by reason. The restore still proceeds — everything else (VMs, LXCs, network, /etc/pve, users, cron, ProxMenux state, packages, drivers, /root) is restored normally."
},
"hydration": {
"heading": "Kernel-agnostic hydration",
"intro": "The safe-subset filter alone would leave the target without the tuning the user had inside those boot-critical files: IOMMU cmdline for GPU passthrough, VFIO device IDs, custom <code>GRUB_TIMEOUT</code>, nvidia blacklists. The hydration pass re-applies those bits kernel-agnostically. Four phases run when the target kernel is newer than the backup's, each additive (never overwrites a value the target already carries) and idempotent (running twice is a no-op).",
"phaseRows": [
{ "phase": "1a — GRUB path", "detail": "For hosts using GRUB (ext4/lvm installs). <code>_rs_hyd_grub</code> merges every token from the backup's <code>manifest.kernel_params.cmdline_extra</code> into the target's live <code>GRUB_CMDLINE_LINUX_DEFAULT</code>, skipping tokens whose key the target already carries. Then merges whitelisted <code>GRUB_*</code> keys (<code>GRUB_TIMEOUT</code>, <code>GRUB_TIMEOUT_STYLE</code>, <code>GRUB_DEFAULT</code>, <code>GRUB_TERMINAL</code>, <code>GRUB_DISABLE_OS_PROBER</code>, <code>GRUB_SERIAL_COMMAND</code>, <code>GRUB_GFXMODE</code>, <code>GRUB_GFXPAYLOAD_LINUX</code>) from the backup's <code>/etc/default/grub</code> if they differ from the target's." },
{ "phase": "1b — systemd-boot / ZFS path", "detail": "For hosts using systemd-boot (typically ZFS-on-root). <code>_rs_hyd_kernel_cmdline</code> merges operator tokens from <code>cmdline_extra</code> into the target's <code>/etc/kernel/cmdline</code>, keeping the target's own <code>root=</code>, <code>boot=</code> and <code>rootflags=</code> boilerplate intact." },
{ "phase": "2 — /etc/modules merge", "detail": "<code>_rs_hyd_modules</code> appends modules from <code>manifest.kernel_params.modules_loaded_at_boot</code> that are in the whitelist (<code>vfio</code>, <code>vfio_pci</code>, <code>vfio_iommu_type1</code>, <code>vfio_virqfd</code>, <code>kvm</code>, <code>kvm_intel</code>, <code>kvm_amd</code>, <code>nvidia</code>, <code>nvidia_drm</code>, <code>nvidia_modeset</code>, <code>nvidia_uvm</code>, <code>i915</code>, <code>xe</code>) AND not already present in the target's <code>/etc/modules</code>." },
{ "phase": "3 — Whitelisted files copy", "detail": "<code>_rs_hyd_files</code> copies operator-authored files from the staging rootfs to the live target when the content differs. Whitelist covers VFIO/nvidia/blacklist files under <code>/etc/modprobe.d</code>, <code>/etc/modules-load.d</code>, and the ProxMenux VFIO bind rule + nvidia udev rules under <code>/etc/udev/rules.d</code>. Distro-owned files (<code>pve-blacklist.conf</code>, <code>mdadm.conf</code>, <code>nvme.conf</code>) are intentionally excluded — their contents evolve between releases." },
{ "phase": "4 — Force post-boot reflows", "detail": "The four phases write directly to the live target OUTSIDE the normal restore pipeline. To make the merged tokens/modules/files take effect on the next boot, <code>HB_HYDRATION_APPLIED=1</code> propagates through <code>plan.env</code> to <code>apply_pending_restore.sh</code>, which forces <code>NEEDS_INITRAMFS=1</code> and <code>NEEDS_GRUB=1</code> regardless of what was in the apply list. The post-boot dispatcher then regenerates initramfs and refreshes the bootloader." }
]
},
"planCommit": {
"heading": "Plan vs commit — the operator sees a preview first",
"body": "The hydration runs in two modes. Before the confirmation dialog, ProxMenux runs <code>_rs_apply_bk_older_hydration</code> in <code>plan</code> mode: it computes exactly what would be merged, populates <code>RS_HYDRATION_SUMMARY</code> with a green block listing each action, and returns without writing. The confirmation dialog shows that green block alongside the amber safe-subset skip list, so the user sees UPFRONT what will be re-applied automatically. After the user confirms, ProxMenux re-runs the same helper in <code>commit</code> mode — same phases, same logic, but this time each phase writes to the live target. Cancelling the confirmation dialog leaves the target untouched."
},
"flowDiagram": {
"heading": "The flow when the target kernel is newer than the backup's",
"intro": "The steps added when the target kernel is newer sit inside the normal restore flow. Everything else — hot apply, pending prepare, package install, post-boot dispatcher — runs identically to a same-kernel restore.",
"diagram": " ┌────────────────────────────────────────────────────────────┐\n │ hb_compat_check │\n │ HB_COMPAT_KERNEL_DIRECTION = bk_older │\n └───────────────────────────┬────────────────────────────────┘\n │\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ Add 16 boot-critical paths to RS_SKIP_PATHS │\n │ /etc/default/grub, /etc/kernel, /etc/modules-load.d, ... │\n └───────────────────────────┬────────────────────────────────┘\n │\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ _rs_apply_bk_older_hydration \"plan\" │\n │ Compute what would be merged │\n │ Populate RS_HYDRATION_SUMMARY (green block) │\n │ No writes │\n └───────────────────────────┬────────────────────────────────┘\n │\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ Confirmation dialog │\n │ Amber: paths skipped by safe-subset filter │\n │ Green: tokens/files reapplied by hydration │\n │ User accepts or cancels │\n └───────────────────────────┬────────────────────────────────┘\n │ (accepted)\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ _rs_apply_bk_older_hydration \"commit\" │\n │ Phase 1a/1b: merge cmdline tokens + GRUB keys │\n │ Phase 2: append modules to /etc/modules │\n │ Phase 3: copy whitelisted vfio/nvidia files │\n │ Set HB_HYDRATION_APPLIED=1 │\n └───────────────────────────┬────────────────────────────────┘\n │\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ Rest of the restore runs normally │\n │ _rs_apply hot (skips RS_SKIP_PATHS) │\n │ _rs_prepare_pending_restore (writes plan.env with │\n │ HB_HYDRATION_APPLIED=1) │\n │ packages.manual.list install │\n │ Reboot │\n │ apply_pending_restore.sh (forces NEEDS_INITRAMFS=1, │\n │ NEEDS_GRUB=1 because of the hydration flag) │\n │ apply_cluster_postboot.sh │\n │ update-initramfs -u -k all │\n │ update-grub / proxmox-boot-tool refresh │\n │ component --auto-reinstall │\n └────────────────────────────────────────────────────────────┘"
},
"concreteExamples": {
"heading": "Concrete examples",
"intro": "The hydration pass is not abstract — it produces observable, correct outcomes for common scenarios. Two examples that hydration handles automatically:",
"rows": [
{ "scenario": "GPU passthrough (VFIO)", "detail": "Source had <code>intel_iommu=on iommu=pt</code> in the cmdline, <code>vfio</code>/<code>vfio_pci</code>/<code>vfio_iommu_type1</code> in <code>/etc/modules</code>, an <code>/etc/modprobe.d/vfio.conf</code> with <code>options vfio-pci ids=10de:2216</code>, and a <code>/etc/modprobe.d/blacklist-nvidia.conf</code>. Hydration merges the cmdline tokens into the target's GRUB or kernel cmdline, appends the vfio modules to <code>/etc/modules</code>, and copies the two user-authored modprobe files. On the next boot, IOMMU is active, VFIO modules load, the GPU is bound to vfio-pci and the VM comes up with passthrough working." },
{ "scenario": "Custom GRUB defaults", "detail": "Source had <code>GRUB_TIMEOUT=1</code> and <code>GRUB_DISABLE_OS_PROBER=true</code>. Hydration reads both keys from the backup's <code>/etc/default/grub</code>, sees they differ from the fresh install's defaults, and rewrites those two lines in the target's file (leaving everything else, including <code>GRUB_DISTRIBUTOR</code>, untouched)." }
]
},
"callout": {
"warningTitle": "What hydration does not reapply when the target kernel is newer",
"warningBody": "Hydration reapplies only the configuration ProxMenux knows to be safe across kernel versions: IOMMU tokens, VFIO IDs, whitelisted GRUB keys, and modules from a fixed list (<code>vfio*</code>, <code>nvidia*</code>, <code>i915</code>, <code>xe</code>, <code>kvm*</code>). Anything outside that set — custom initramfs hooks under <code>/etc/initramfs-tools/hooks/</code>, non-whitelisted files under <code>/etc/modprobe.d/</code>, user-authored systemd unit overrides — remains excluded. The reason is concrete: those files can call kernel-internal interfaces (module APIs, <code>/sys</code> layout, <code>udev</code> hooks) that change between major versions, and applying them verbatim over the newer kernel can prevent the target from booting. When exact reproduction of the boot chain is required, the restore must run on a host with the same major kernel version as the backup."
},
"codeReference": {
"heading": "Where the mechanisms live",
"intro": "For developers looking to trace or extend the cross-kernel behaviour:",
"rows": [
{ "component": "Direction detection", "location": "<code>hb_compat_check</code> in <code>lib_host_backup_common.sh</code>. Sets <code>HB_COMPAT_KERNEL_DIRECTION</code>." },
{ "component": "Safe-subset path list", "location": "<code>hb_unsafe_paths_cross_version</code> in <code>lib_host_backup_common.sh</code>. Emits <code>path\\treason</code> lines used by both the CLI filter and the Web endpoint <code>/api/host-backups/restore/prepare</code>." },
{ "component": "Hydration phases", "location": "<code>_rs_hyd_grub</code>, <code>_rs_hyd_kernel_cmdline</code>, <code>_rs_hyd_modules</code>, <code>_rs_hyd_files</code> in <code>backup_host.sh</code>. Orchestrated by <code>_rs_apply_bk_older_hydration</code>." },
{ "component": "Post-boot reflow forcing", "location": "<code>apply_pending_restore.sh</code> reads <code>HB_HYDRATION_APPLIED</code> from <code>plan.env</code> and forces <code>NEEDS_INITRAMFS=1</code>/<code>NEEDS_GRUB=1</code>." },
{ "component": "Web preview", "location": "<code>/api/host-backups/restore/prepare</code> in <code>flask_server.py</code>. Sources the helper library, runs <code>_rs_apply_bk_older_hydration</code> in plan mode, returns the actions to the Web modal." }
]
},
"whereNext": {
"heading": "Where to go next",
"items": [
{ "label": "Restoring", "href": "/docs/backup-restore/restoring", "tail": " — the full restore pipeline this page's mechanisms plug into." },
{ "label": "How it works", "href": "/docs/backup-restore/how-it-works", "tail": " — the manifest and collectors that produce the <code>kernel_params</code> block hydration reads from." }
]
}
}

View File

@@ -0,0 +1,148 @@
{
"meta": {
"title": "Borg destination — repository types, SSH auth, encryption | ProxMenux",
"description": "The Borg destination writes ProxMenux host backups to a Borg repository — local, on a mounted external disk, or on a remote server accessed via SSH. Covers the borg binary resolution chain, the four SSH key strategies, repokey encryption, saved target configuration and per-scheduled-job retention.",
"ogTitle": "ProxMenux Backup — Borg destination",
"ogDescription": "How ProxMenux writes host backups to Borg repositories, with SSH auth strategies and repokey encryption.",
"twitterTitle": "Borg backup destination | ProxMenux",
"twitterDescription": "Local, USB and SSH-served Borg repositories for host backups."
},
"header": {
"title": "Borg",
"description": "The Borg destination writes host backups to a Borg repository. Three repository types are supported: local filesystem path, mounted external disk, or remote server via SSH. Chunk-level deduplication across all archives in the repository and optional repokey encryption.",
"section": "Backup & Restore"
},
"aboutBorg": {
"heading": "What Borg is",
"body": "Borg (also spelled BorgBackup) is an open-source deduplicating backup tool maintained by the Borg Backup community. It stores every archive as a set of variable-length chunks inside a repository; chunks are shared across archives so re-backing up unchanged data has near-zero storage cost. Borg is not tied to Proxmox — it is a general-purpose backup tool used across many environments. ProxMenux uses it as one of the three destinations for host backups; every Borg-specific mechanism described on this page (repository types, borg-serve over SSH, repokey encryption, prune) is standard Borg behaviour."
},
"intro": {
"title": "Chunk-based deduplication with local or SSH-served repositories",
"body": "A Borg repository stores chunks that are shared across every archive it contains, so re-backing up an unchanged file transfers and stores nothing new. ProxMenux invokes <code>borg create</code> against a repository at backup time and <code>borg extract</code> at restore time. The repository can live on the same filesystem as the source, on a mounted external disk, or on a remote host accessed over SSH."
},
"binarySourcing": {
"heading": "The borg binary",
"intro": "Borg is not a base dependency of the ProxMenux installer. When a backup runs, <code>hb_ensure_borg</code> resolves the binary from four sources in order and returns the first that works:",
"rows": [
{ "priority": "1", "source": "System <code>borg</code>", "detail": "If the host already has <code>borg</code> installed via APT (<code>which borg</code> resolves), that binary is used." },
{ "priority": "2", "source": "State-dir cache", "detail": "<code>/usr/local/share/proxmenux/borg</code> — kept from a prior GitHub download on this host." },
{ "priority": "3", "source": "Monitor AppImage bundle", "detail": "<code>/usr/local/share/proxmenux/monitor-app/usr/bin/borg</code> — the AppImage bundles a signed borg-linux64. This is the offline-safe path: a host with no internet still has a working <code>borg</code>." },
{ "priority": "4", "source": "GitHub download", "detail": "<code>wget</code> against the pinned <code>borg-linux64</code> URL under <code>github.com/borgbackup/borg/releases/</code>, verified against a constant SHA-256 in <code>lib_host_backup_common.sh</code> (<code>HB_BORG_LINUX64_SHA256</code>). On checksum mismatch the binary is discarded and the backup aborts. The downloaded file is cached in the state dir so subsequent backups use path 2." }
]
},
"repoTypes": {
"heading": "Repository types",
"intro": "The repository type is chosen when a target is added. Each type resolves to a different repository URL that Borg understands.",
"rows": [
{ "type": "remote", "url": "ssh://USER@HOST/RPATH", "detail": "Repository lives on a remote server that runs <code>borg serve</code>. Requires an SSH connection to that server." },
{ "type": "usb", "url": "/mnt/MOUNTPOINT/borgbackup", "detail": "Repository lives on a mounted external disk (typically USB). The mount is resolved via <code>hb_prompt_mounted_path</code>, which detects, mounts or formats USB partitions as needed." },
{ "type": "local", "url": "/backup/borgbackup (any absolute path)", "detail": "Repository lives on a local directory. Meaningful only when the target directory is on a separate physical disk — a repository on the same disk as the source protects against operator error but not against disk failure." }
]
},
"serverSetup": {
"heading": "Preparing the Borg server (server side)",
"intro": "The <code>remote</code> repository type expects a working Borg server accessible over SSH. ProxMenux does not bootstrap the server itself — it only authorises a key against an existing account on it. This section documents what the server needs before ProxMenux can connect.",
"hostChoicesTitle": "Where the server can live",
"hostChoicesBody": "Any Linux host with SSH access qualifies. Common setups:",
"hostChoicesItems": [
"A dedicated NAS or backup box (Debian, Ubuntu, TrueNAS SCALE with a shell).",
"An LXC container inside a Proxmox node. Small footprint, isolated from the host running the backups.",
"Another Proxmox host on the same LAN, or a VM anywhere reachable over SSH."
],
"lxcWarningTitle": "LXC as Borg server",
"lxcWarningBody": "If the Borg server runs inside an LXC, the container must have a user account with a password.",
"requirementsTitle": "Requirements on the server",
"requirementsRows": [
{ "requirement": "borg binary at <code>/usr/bin/borg</code>", "detail": "The <code>command=\"/usr/bin/borg serve ...\"</code> line ProxMenux writes into <code>authorized_keys</code> hard-codes that path. Installing via APT (<code>apt install borgbackup</code>) puts it there. A standalone binary must be symlinked to <code>/usr/bin/borg</code>." },
{ "requirement": "A dedicated user account (typically <code>borg</code>)", "detail": "Owns the repository directory and receives incoming SSH connections. Does not need sudo or shell access — the authorized_keys line disables interactive shells anyway." },
{ "requirement": "A writable repository directory", "detail": "The path the operator gives ProxMenux (for example <code>/backup/borgbackup</code>) must exist on the server and be owned by the borg user." },
{ "requirement": "SSH daemon accepting the borg user", "detail": "<code>PubkeyAuthentication yes</code> (default). Password authentication is only needed for the one-shot <em>generate-auto</em> flow — after the key is installed, the server can disable password auth entirely." }
],
"minimalSetupTitle": "Minimal server setup",
"minimalSetupBody": "On a Debian or Ubuntu Borg server, a working baseline is four commands as root:",
"minimalSetupCmd": "apt install borgbackup\nuseradd -m -d /home/borg -s /bin/bash borg\nmkdir -p /backup/borgbackup\nchown borg:borg /backup/borgbackup",
"minimalSetupNote": "After this, ProxMenux's <code>generate-auto</code> mode can connect using the borg user's password once, install its own SSH key, and every subsequent backup uses that key. No further server-side configuration is needed — the key restricts itself to <code>borg serve</code> on that path."
},
"sshAuth": {
"heading": "SSH authentication (client side)",
"intro": "Remote Borg repositories are accessed over SSH. The connection runs from the ProxMenux host to a user account on the Borg server that runs <code>borg serve</code>. This user is typically named <code>borg</code>, NOT the admin/root user of the server — the borg-serve command line locks the connection to that specific repository path (see the key strategies below).",
"strategiesTitle": "The four key strategies",
"strategiesIntro": "When a remote target is added, ProxMenux prompts for the SSH user, host and remote path, then asks how to authenticate. Four modes:",
"strategyRows": [
{ "mode": "generate-auto", "label": "Recommended", "detail": "ProxMenux generates a new ed25519 keypair at <code>~/.ssh/borg_proxmenux_HOST_ed25519</code>, then uses <code>sshpass</code> to log in ONCE to the server with the admin password and append the public key to <code>~borg/.ssh/authorized_keys</code>. The admin password is only used for this one call — it is never stored." },
{ "mode": "generate-manual", "label": "No admin password on this host", "detail": "ProxMenux generates the keypair as above but displays the full <code>authorized_keys</code> line for the operator to paste manually into the server. The admin password never leaves the ProxMenux host because it is never asked for." },
{ "mode": "generate-pct", "label": "Borg server is a PVE LXC", "detail": "The Borg server runs inside an LXC on a PVE node. ProxMenux authorises the key via <code>pct exec</code> from the PVE host — root on the PVE host writes into the LXC's <code>~borg/.ssh/authorized_keys</code> without needing SSH into the LXC itself." },
{ "mode": "existing", "label": "Use an existing key", "detail": "ProxMenux scans <code>/root/.ssh/</code> and <code>$HOME/.ssh/</code> for parseable ed25519/RSA private keys and lists them. The operator picks one or browses manually to a non-standard path." },
{ "mode": "none", "label": "Default SSH config", "detail": "No custom key — Borg relies on the host's default SSH configuration (typically <code>~/.ssh/id_rsa</code> or an SSH agent)." }
],
"restrictTitle": "The authorized_keys line",
"restrictBody": "For every generated key, the <code>authorized_keys</code> line ProxMenux writes on the server locks the key to a single borg-serve invocation against the configured repository path:",
"restrictLine": "command=\"/usr/bin/borg serve --restrict-to-path RPATH\",restrict PUBKEY",
"restrictNote": "The <code>command=</code> forces every SSH session using this key to run only that borg-serve command; <code>restrict</code> disables port forwarding, agent forwarding, X11 forwarding and PTY allocation. The key cannot be used to open an interactive shell on the server or to access any other repository path, even if the account has broader privileges."
},
"savedTargets": {
"heading": "Saved targets",
"intro": "A saved target persists the repository configuration under a friendly name so the details do not have to be re-entered. Storage layout in the ProxMenux state directory:",
"rows": [
{ "file": "borg-targets.txt", "content": "One line per target: <code>NAME|REPO|SSH_KEY_PATH|ENCRYPT_MODE</code>. Read by <code>hb_collect_borg_configs</code> to populate the target-selection menu." },
{ "file": "borg-pass-NAME.txt", "content": "Passphrase for the target NAMEd above (<code>chmod 600</code>). Only present when the operator chose repokey encryption." }
],
"outro": "Saving is optional — the operator can decline the save prompt for a one-shot backup that leaves no credentials on the host."
},
"encryption": {
"heading": "Encryption",
"body": "Repositories are initialised with an encryption mode via <code>hb_borg_init_if_needed</code>: the modern <code>borg repo-create -e MODE</code> when available, or the legacy <code>borg init --encryption=MODE</code>. ProxMenux exposes two modes: <code>repokey</code> (default) and <code>none</code>. In <code>repokey</code> mode Borg stores the encryption key inside the repository itself; access requires a passphrase, which ProxMenux prompts for twice with match validation and stores at <code>borg-pass-NAME.txt</code>. A mandatory acknowledgement dialog is shown after the passphrase is saved: the passphrase is the only way to access the encrypted archives, and losing it makes every archive in the repository unrecoverable."
},
"runtimeEnv": {
"heading": "Runtime environment",
"intro": "ProxMenux exports the following environment variables before invoking <code>borg</code>. They configure the connection and unlock the repository without embedding secrets in the command line.",
"rows": [
{ "var": "BORG_RSH", "value": "ssh -i SSH_KEY_PATH -o StrictHostKeyChecking=accept-new", "purpose": "The remote-shell command Borg uses for SSH-served repositories. Set only when a custom key was selected; otherwise unset so Borg uses the default SSH configuration." },
{ "var": "BORG_PASSPHRASE", "value": "(passphrase from borg-pass-NAME.txt)", "purpose": "Unlocks the repokey. Set only when the target uses <code>repokey</code> encryption. Never appears in the process argument list." },
{ "var": "BORG_ENCRYPT_MODE", "value": "repokey | none", "purpose": "Used by <code>hb_borg_init_if_needed</code> when initialising a repository that does not yet exist. Ignored by <code>borg create</code> on existing repositories." },
{ "var": "BORG_RELOCATED_REPO_ACCESS_IS_OK", "value": "yes", "purpose": "Suppresses the interactive prompt Borg raises when the repository URL differs from the URL it was originally reached from (common after a mount-point rename or SSH-host reachable via new address)." },
{ "var": "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK", "value": "yes", "purpose": "Suppresses the interactive prompt Borg raises the first time an unencrypted repository is accessed from a new client." }
]
},
"archiveFormat": {
"heading": "Archive naming and retention",
"intro": "Every backup creates a new archive inside the repository.",
"namePattern": "hostcfg-HOSTNAME-YYYYMMDD_HHMMSS",
"retentionBody": "For scheduled jobs, <code>run_scheduled_backup.sh</code> runs <code>borg prune</code> against the repository after each successful backup with the retention values configured on the job (<code>--keep-last</code>, <code>--keep-daily</code>, <code>--keep-weekly</code>). Interactive backups do not prune."
},
"restoreAccess": {
"heading": "Retrieval on the restore side",
"body": "The restore flow lists archives with <code>borg list REPO</code> and extracts the selected one with <code>borg extract REPO::ARCHIVE-NAME</code> into a staging directory that <code>_rs_check_layout</code> feeds to the standard restore pipeline. For manual retrieval outside ProxMenux the same commands work; the extracted tree is the standard three-payload layout described in <em>How it works</em>."
},
"references": {
"heading": "References",
"intro": "Official Borg documentation for the components ProxMenux relies on.",
"items": [
{
"label": "Borg documentation",
"href": "https://borgbackup.readthedocs.io/",
"tail": " — main entry point covering concepts, deployment, quickstart and every command."
},
{
"label": "borg create",
"href": "https://borgbackup.readthedocs.io/en/stable/usage/create.html",
"tail": " — the command ProxMenux invokes on every backup, with all supported flags."
},
{
"label": "Repository encryption",
"href": "https://borgbackup.readthedocs.io/en/stable/usage/init.html#encryption-mode",
"tail": " — the encryption modes Borg supports, including repokey which ProxMenux uses by default."
},
{
"label": "borg serve and SSH deployment",
"href": "https://borgbackup.readthedocs.io/en/stable/deployment/central-backup-server.html",
"tail": " — how to set up a central Borg server accessed over SSH, including the borg-serve command and the restrict-to-path flag ProxMenux writes into authorized_keys."
},
{
"label": "borg prune",
"href": "https://borgbackup.readthedocs.io/en/stable/usage/prune.html",
"tail": " — the retention model behind --keep-last / --keep-daily / --keep-weekly that ProxMenux applies per scheduled job."
}
]
}
}

View File

@@ -0,0 +1,110 @@
{
"meta": {
"title": "Backup destinations — Local, Proxmox Backup Server, Borg | ProxMenux",
"description": "Three storage backends receive the same ProxMenux backup payload: a local .tar.zst archive on any writeable filesystem, a PBS backup in a Proxmox Backup Server datastore, or a Borg archive in a local or remote Borg repository. Each backend has its own compression, deduplication, encryption and network characteristics.",
"ogTitle": "ProxMenux Backup Destinations",
"ogDescription": "Local, Proxmox Backup Server and Borg — three storage backends for the same host backup payload.",
"twitterTitle": "ProxMenux Backup Destinations | ProxMenux",
"twitterDescription": "Local archive, Proxmox Backup Server and Borg backends for host backups."
},
"header": {
"title": "Destinations",
"description": "Three storage backends supported by ProxMenux Backup: local archive, Proxmox Backup Server (recommended) and Borg. Each receives the same three-payload archive; they differ in storage format, deduplication, encryption model and network requirements.",
"section": "Backup & Restore"
},
"intro": {
"title": "Same payload, three backends",
"body": "Every backup produces the same three payloads (rootfs, manifest, applications). What changes between destinations is how those payloads are stored and how the operator retrieves them for a restore. Each backend is implemented as a separate function in <code>backup_host.sh</code> — <code>_bk_local</code>, <code>_bk_pbs</code>, <code>_bk_borg</code> — but all four share the same staging step (<code>hb_prepare_staging</code>) and the same restore code path. The choice of destination only affects the write and the retrieval; it does not change what a restore does or how it consumes the archive."
},
"comparison": {
"heading": "Feature comparison",
"intro": "The following table lists the concrete differences between the three backends as they behave in ProxMenux today. All values describe observed behaviour of the backend itself, not editorial recommendations.",
"rows": [
{
"feature": "Storage format",
"local": "Single <code>.tar.zst</code> file (or <code>.tar.gz</code> if <code>zstd</code> is absent).",
"pbs": "PBS backup (<code>.pxar</code> chunks in the datastore).",
"borg": "Borg archive inside a Borg repository (segment files)."
},
{
"feature": "Compression",
"local": "zstd (default level) via <code>tar --zstd</code>. gzip fallback.",
"pbs": "PBS-managed. The client streams uncompressed; the server chunks + compresses.",
"borg": "Borg's built-in (lz4 default). Configurable at repo init."
},
{
"feature": "Deduplication",
"local": "None. Each backup is a full independent archive.",
"pbs": "Full chunk-level deduplication across all backups in the datastore.",
"borg": "Full chunk-level deduplication across all archives in the repository."
},
{
"feature": "Encryption at rest",
"local": "None (relies on filesystem-level protection).",
"pbs": "Optional client-side keyfile encryption. Recovery blob uploaded as separate backup group when enabled.",
"borg": "Optional repokey encryption (key stored in the repo, unlocked by a passphrase)."
},
{
"feature": "Retention / pruning",
"local": "Applied per scheduled job via <code>KEEP_LAST</code>. Old archives (and their sidecars + runner logs) are deleted symmetrically. Interactive backups do not prune.",
"pbs": "Applied per scheduled job via <code>proxmox-backup-client prune --keep-last / --keep-daily / --keep-weekly</code>. Interactive backups do not prune.",
"borg": "Applied per scheduled job via <code>borg prune --keep-last / --keep-daily / --keep-weekly</code>. Interactive backups do not prune."
},
{
"feature": "Network",
"local": "None. Writes to a local mount point (typically an internal disk or a USB drive).",
"pbs": "TCP to the PBS server (default port 8007). Requires PBS credentials + fingerprint.",
"borg": "Local filesystem path or SSH tunnel to a remote Borg host."
},
{
"feature": "Dependencies",
"local": "<code>tar</code>, <code>zstd</code> (present on Proxmox by default).",
"pbs": "<code>proxmox-backup-client</code> package (bundled with Proxmox VE 8+).",
"borg": "<code>borg</code> binary. Auto-provisioned by ProxMenux from the Monitor AppImage bundle when missing."
},
{
"feature": "Restore access",
"local": "Any host with tar+zstd can extract the archive. No PBS/Borg needed.",
"pbs": "Requires <code>proxmox-backup-client</code> + PBS credentials + the keyfile (if encrypted).",
"borg": "Requires <code>borg</code> + the repository path + the passphrase (if encrypted)."
}
],
"captionCode": "feature",
"captionLocal": "Local",
"captionPbs": "Proxmox Backup Server (recommended)",
"captionBorg": "Borg"
},
"sameArchive": {
"heading": "The archive layout does not change with the destination",
"body": "Inside any of the three destinations, the same <code>rootfs/</code> + <code>metadata/</code> + <code>manifest.json</code> layout described in <em>How it works</em> is present. A <code>.tar.zst</code> extracted from a local archive, a <code>.pxar</code> restored from PBS, and a Borg archive extracted with <code>borg extract</code> all yield an identical directory tree. The restore code path (<code>_rs_check_layout</code>, <code>_rs_apply</code>, <code>_rs_prepare_pending_restore</code>) reads the same three payloads without knowing which destination they came from."
},
"extractStandalone": {
"heading": "Extracting a backup outside of ProxMenux",
"intro": "Any of the three archive formats can be read with standard tools without ProxMenux installed on the reading host. The commands below produce the same directory tree that a restore consumes internally.",
"localCmd": "# From a local .tar.zst archive:\ntar --zstd -xf hostcfg-HOST-TIMESTAMP.tar.zst\n\n# From a .tar.gz fallback:\ntar -xzf hostcfg-HOST-TIMESTAMP.tar.gz",
"pbsCmd": "# From a PBS backup (requires proxmox-backup-client):\nproxmox-backup-client restore \\\n --repository USER@REALM@HOST:DATASTORE \\\n host/hostcfg-HOST/BACKUP-TIME \\\n hostcfg.pxar /tmp/hostcfg\n\n# Add --keyfile KEY-PATH when the backup is encrypted.",
"borgCmd": "# From a Borg archive (requires borg binary + passphrase for encrypted repos):\nborg extract REPO-PATH::ARCHIVE-NAME\n\n# On a remote SSH-served repo:\nborg extract ssh://USER@HOST:PORT/REPO-PATH::ARCHIVE-NAME",
"note": "The extracted tree can then be inspected manually or fed to a manual restore. See the individual destination pages for the exact retrieval flow ProxMenux uses under the hood."
},
"whereNext": {
"heading": "Per-destination detail",
"intro": "Each destination has its own page covering the configuration flow, the on-disk format and the retrieval command used by the restore.",
"items": [
{
"label": "Local archive",
"href": "/docs/backup-restore/destinations/local",
"tail": " — pre-configuring a local target, USB drive mounting, the safety check against writing the archive into itself, the sidecar JSON that lets the Monitor identify the file."
},
{
"label": "Proxmox Backup Server (recommended)",
"href": "/docs/backup-restore/destinations/pbs",
"tail": " — datastore selection, credentials and fingerprint, encryption keyfile lifecycle, recovery passphrase, uploading the recovery blob to PBS for fresh-install recovery."
},
{
"label": "Borg",
"href": "/docs/backup-restore/destinations/borg",
"tail": " — local vs. SSH-served repositories, the Borg binary sourcing (system / cache / Monitor AppImage bundle / GitHub download), repository initialization, passphrase handling, SSH key setup for remote repos."
}
]
}
}

View File

@@ -0,0 +1,63 @@
{
"meta": {
"title": "Local archive destination — tar.zst on a filesystem or USB drive | ProxMenux",
"description": "The local backup destination writes a single .tar.zst archive to any writeable directory: an internal disk, a Proxmox mount point, an NFS share, or a USB drive. Documents the configuration flow, the USB detection and mounting logic, the safety check against writing the archive into a path being backed up, and the sidecar JSON that identifies the file.",
"ogTitle": "ProxMenux Backup — Local archive destination",
"ogDescription": "How ProxMenux writes local backups as .tar.zst archives and how to configure the destination directory or USB drive.",
"twitterTitle": "Local backup destination | ProxMenux",
"twitterDescription": "How ProxMenux writes local backups as .tar.zst archives on a filesystem or USB drive."
},
"header": {
"title": "Local archive",
"description": "The local destination writes a single compressed tar archive to any writeable directory on the host: an internal disk, an NFS or SMB mount, or a USB drive.",
"section": "Backup & Restore"
},
"intro": {
"title": "One file, self-contained",
"body": "A local backup produces a single <code>hostcfg-HOST-TIMESTAMP.tar.zst</code> file (or <code>.tar.gz</code> when <code>zstd</code> is absent). The file contains the entire archive tree — <code>manifest.json</code>, <code>metadata/</code> and <code>rootfs/</code> — and can be restored on any Proxmox host with the ProxMenux restore flow, or extracted manually with <code>tar --zstd -xf</code> on any Linux system. No server, no repository init, no external dependency. This is the destination with the shortest recovery path when neither PBS nor Borg is available."
},
"targetConfig": {
"heading": "Configuring the target directory",
"intro": "The local destination is a <strong>single persisted target directory</strong> — not a list. ProxMenux stores the operator's choice at <code>/usr/local/share/proxmenux/local-target.conf</code> and reads it on every backup. When no target has been configured, the default <code>HB_LOCAL_TARGET_DEFAULT = /var/lib/vz/dump</code> is used (the same directory Proxmox uses for its own <code>vzdump</code> outputs). The target is configured from <em>Configure backup destinations → Local destinations</em>:",
"options": [
"<strong>Use default (<code>/var/lib/vz/dump</code>).</strong> The Proxmox local storage. Present on every Proxmox install; the archive sits next to vzdump outputs and is picked up by the Monitor's Backups tab automatically.",
"<strong>Enter a custom path.</strong> Any absolute filesystem path can be used: an NFS mount, an SMB share mounted via <code>fstab</code>, a dedicated ZFS dataset, a second internal disk. ProxMenux validates that the path exists and is a directory before persisting it.",
"<strong>Pick a USB drive.</strong> Opens the USB submenu (below), which detects removable devices and offers to mount or format one."
]
},
"usbFlow": {
"heading": "USB drive detection and mounting",
"intro": "The USB submenu lists partitions on removable devices reported by <code>lsblk</code>. Each partition is presented with its size, filesystem label and current state. The state determines the action ProxMenux offers.",
"statesTitle": "The three device states",
"stateRows": [
{ "state": "mounted", "shown": "Size · label · [fstype] · → /mount/point", "action": "The partition is already mounted somewhere. Selecting it persists the current mount point as the local target. No mounting is performed." },
{ "state": "unmounted", "shown": "Size · label · [fstype] · (not mounted — will be mounted)", "action": "A filesystem is present but not mounted. On confirmation, ProxMenux runs <code>hb_mount_usb_partition</code>: creates <code>/mnt/backup-LABEL</code> (or a UUID-based path if there is no label), mounts the partition and persists the mount point as the local target." },
{ "state": "empty", "shown": "Size · raw USB disk — no filesystem (will be FORMATTED)", "action": "The device has no filesystem. A destructive path — protected by two confirmations. First a Yes/No dialog explains that the operation will erase the disk. Second, an inputbox requires the operator to <strong>type the exact device path</strong> (e.g. <code>/dev/sdb</code>) before ProxMenux creates a fresh GPT + ext4 partition and mounts it." }
],
"notMountedFallback": "When no USB device is detected, the submenu falls back to a plain inputbox. The operator can enter an arbitrary mount point path; if the path is not a registered mount point, a confirmation dialog warns before proceeding."
},
"safetyCheck": {
"heading": "Safety check — destination inside a backup path",
"body": "Before writing the archive, <code>_bk_local</code> verifies that the destination directory is <strong>not</strong> a subpath of any directory being backed up. A common footgun would be adding <code>/root</code> to the profile and picking <code>/root/backups</code> as the destination — the archive would then include itself, either producing a corrupt archive or growing without bound until the disk fills. The check resolves both paths with <code>readlink -m</code>, compares them and, on conflict, aborts the backup with a dialog that names the conflicting path and lists three ways to resolve it: choose a destination outside the conflicting path, remove the custom entry that contains the destination, or use Custom mode to uncheck the conflicting path for this run."
},
"archiveFormat": {
"heading": "Archive format and compression",
"intro": "The output filename embeds the source hostname and the backup timestamp so that a directory holding several archives sorts chronologically and each file is self-identifying.",
"namePattern": "hostcfg-HOSTNAME-YYYYMMDD_HHMMSS.tar.zst",
"compressionTitle": "Compression",
"compressionBody": "The primary path uses <code>tar --zstd -cf</code> — a single-command pipeline that compresses at zstd's default level. When <code>zstd</code> is not present on the source (rare on Proxmox but possible on minimal installs), ProxMenux falls back to <code>gzip</code>. In the fallback path, if <code>pv</code> is available, a progress bar is added to the pipeline so the operator sees the archive size grow in real time; without <code>pv</code>, plain <code>tar -czf</code> is used silently.",
"sourceTitle": "What goes into the archive",
"sourceBody": "The tar command is invoked with <code>-C \"$staging_root\" .</code>, which archives the <strong>full staging root</strong>: <code>rootfs/</code>, <code>metadata/</code> and <code>manifest.json</code>. All three payloads land side by side at the top of the tarball. Extracting the archive produces the exact same tree that the restore code consumes."
},
"sidecar": {
"heading": "The sidecar JSON",
"intro": "Every successful local backup produces a companion file: <code>HOSTNAME-TIMESTAMP.tar.zst.proxmenux.json</code>, written next to the archive by <code>hb_write_archive_sidecar</code>. This small JSON file lets the ProxMenux Monitor identify the archive as a ProxMenux host backup even if it is later moved, renamed or archived elsewhere.",
"contentTitle": "Sidecar contents",
"contentBody": "The sidecar stores the schema version, whether the backup came from an interactive run or a scheduled job (<code>kind</code>), the job ID for scheduled runs, the profile mode used (<code>default</code> or <code>custom</code>), the source hostname, the original archive basename, an ISO-8601 creation timestamp and the archive size in bytes.",
"whyBody": "The Monitor's Backups tab scans configured local directories for <code>*.proxmenux.json</code> sidecars — not for <code>*.tar.zst</code> files — because a <code>.tar.zst</code> without a sidecar might not be a ProxMenux backup at all. The scan is fast (JSON files are tiny) and the pairing is stable across renames of the archive as long as the sidecar is renamed to match."
},
"restoreAccess": {
"heading": "Restoring from a local archive",
"body": "The ProxMenux restore flow discovers local archives by scanning the configured local target for sidecars and displaying them in the Archives list. Selecting one triggers <code>_rs_check_layout</code>, which extracts the tarball into a staging directory and confirms the three-payload layout before proceeding. For manual extraction outside of ProxMenux, <code>tar --zstd -xf hostcfg-HOSTNAME-TIMESTAMP.tar.zst -C /tmp/hostcfg</code> yields the same tree the restore code consumes."
}
}

View File

@@ -0,0 +1,102 @@
{
"meta": {
"title": "Proxmox Backup Server destination — repository, encryption, recovery | ProxMenux",
"description": "The PBS destination writes ProxMenux host backups as PBS backups. Documents repository auto-discovery from /etc/pve/storage.cfg, manual PBS configuration, the .pxar upload command, the client-side keyfile encryption model, the recovery passphrase escrow blob, and the fresh-install keyfile recovery from PBS.",
"ogTitle": "ProxMenux Backup — Proxmox Backup Server destination",
"ogDescription": "How ProxMenux writes host backups to Proxmox Backup Server with client-side keyfile encryption and recovery escrow.",
"twitterTitle": "PBS backup destination | ProxMenux",
"twitterDescription": "Proxmox Backup Server destination with keyfile encryption and recovery passphrase escrow."
},
"header": {
"title": "Proxmox Backup Server",
"description": "The PBS destination uploads the staging root as a single .pxar backup to a Proxmox Backup Server datastore, with optional client-side keyfile encryption and an automatic recovery passphrase escrow for fresh-install disaster recovery.",
"section": "Backup & Restore"
},
"recommendedBadge": "Recommended destination",
"aboutPbs": {
"heading": "What Proxmox Backup Server is",
"body": "Proxmox Backup Server (PBS) is Proxmox's own backup server product, developed and maintained by the same team that authors Proxmox VE. It is a dedicated backup server designed to receive backups from Proxmox VE hosts (VMs, LXCs and — via <code>proxmox-backup-client</code> — arbitrary host directories) with chunk-based deduplication, client-side encryption, and retention policies applied server-side. ProxMenux uses PBS as one of the three destinations for host backups; every PBS-specific mechanism described on this page (backup groups, <code>.pxar</code> archives, <code>--backup-id</code>, keyfile encryption) is standard PBS behaviour."
},
"intro": {
"title": "One backup per run, chunk-level dedup",
"body": "A PBS backup produces a single backup entry in the datastore, grouped under the backup ID <code>host/hostcfg-HOSTNAME/BACKUP-TIME</code>. The payload is a <code>.pxar</code> archive containing the same three-block layout described in <em>How it works</em>. PBS deduplicates at the chunk level across all backups in the datastore, so subsequent backups of the same host transfer and store only the chunks that changed. Retention is applied by ProxMenux itself for scheduled jobs — <code>run_scheduled_backup.sh</code> runs <code>proxmox-backup-client prune</code> with <code>--keep-last</code> / <code>--keep-daily</code> / <code>--keep-weekly</code> after each successful run using the values configured on the job."
},
"repoSelection": {
"heading": "Repository selection",
"intro": "ProxMenux discovers PBS repositories from two sources on every backup. The operator picks one from a unified menu; the choice determines <code>HB_PBS_REPOSITORY</code>, <code>HB_PBS_SECRET</code> and <code>HB_PBS_FINGERPRINT</code> for the run.",
"sourceRows": [
{
"source": "Proxmox storage.cfg (auto-discovered)",
"path": "/etc/pve/storage.cfg + /etc/pve/priv/storage/NAME.pw",
"content": "Any <code>pbs:</code> stanza in Proxmox's own storage config is picked up automatically. Server, datastore, username and fingerprint come from the stanza. The password is read from Proxmox's own credentials directory. No re-entry needed on the ProxMenux side — the repository is available as soon as it is configured in Proxmox."
},
{
"source": "ProxMenux manual config",
"path": "/usr/local/share/proxmenux/pbs-manual-configs.txt + pbs-pass-NAME.txt + pbs-fingerprint-NAME.txt",
"content": "Added from <em>Configure backup destinations → PBS destinations → Add PBS</em>. Prompts for a name, username (<code>root@pam</code> or <code>user@pbs!token</code>), host or IP, datastore and password. The password re-prompts on empty input — an empty save would otherwise persist silently and every subsequent backup would fail with an opaque authentication error. This path is used when the target PBS is not registered as Proxmox storage."
}
],
"menuTitle": "Selection menu",
"menuBody": "Both sources are shown in a single menu, each row tagged with its origin (<code>[proxmox]</code> or <code>[manual]</code>). Entries whose password could not be resolved are tagged with a <code>⚠ no password</code> warning — selecting one triggers a password re-entry before the backup starts. The fingerprint is passed to <code>proxmox-backup-client</code> via the <code>PBS_FINGERPRINT</code> environment variable; when absent, the client asks the operator to accept the server certificate interactively on the first backup."
},
"backupCommand": {
"heading": "The backup command",
"intro": "The upload is a single invocation of <code>proxmox-backup-client backup</code>. ProxMenux runs it inside an <code>env</code> wrapper so credentials never appear in the process argument list.",
"cmd": "env \\\n PBS_PASSWORD=\"$HB_PBS_SECRET\" \\\n PBS_ENCRYPTION_PASSWORD=\"$HB_PBS_ENC_PASS\" \\\n PBS_FINGERPRINT=\"$HB_PBS_FINGERPRINT\" \\\n proxmox-backup-client backup \\\n hostcfg.pxar:$staging_root \\\n --repository USER@REALM@HOST:DATASTORE \\\n --backup-type host \\\n --backup-id hostcfg-HOSTNAME \\\n --backup-time BACKUP-EPOCH \\\n [--keyfile /usr/local/share/proxmenux/pbs-key.conf]",
"backupIdTitle": "Backup ID naming",
"backupIdBody": "The default backup ID is <code>hostcfg-HOSTNAME</code>. The operator is asked to confirm or edit it before the upload; any characters outside <code>[A-Za-z0-9_-]</code> are stripped and trailing dashes are trimmed. Reusing the same ID across runs is intentional — PBS treats the ID as a <em>group</em>, and every subsequent backup appears as a new backup inside that group, sharing dedup with prior runs.",
"pxarTitle": "Why the source is the full staging root",
"pxarBody": "The <code>.pxar</code> source is the entire <code>staging_root</code> — <code>rootfs/</code>, <code>metadata/</code> and <code>manifest.json</code> together. Earlier versions passed <code>$staging_root/rootfs</code> as the source; that left <code>metadata/</code> out of the archive and the restore's compatibility check had nothing to read, degrading to cross-host warnings even on same-host restores. Old backups created with the rootfs-only source still restore correctly via <code>_rs_check_layout</code>'s case-3 branch, which wraps a flat <code>etc/var/root/usr</code> tree back into a <code>rootfs/</code> hierarchy."
},
"encryption": {
"heading": "Client-side encryption",
"intro": "PBS client-side keyfile encryption encrypts chunks on the source host before upload. ProxMenux enables the feature with one added constraint: a recovery passphrase is mandatory when encryption is enabled. The passphrase does not protect the local keyfile; it protects the escrow copy of the keyfile that ProxMenux uploads to PBS for disaster recovery.",
"keyfileTitle": "Keyfile",
"keyfileBody": "On first use, <code>proxmox-backup-client key create --kdf none</code> generates the keyfile at <code>/usr/local/share/proxmenux/pbs-key.conf</code> (<code>chmod 600</code>). Subsequent backups reuse it after a single confirmation dialog. If key creation fails, the backup is cancelled and the tool's error output is shown in a dialog.",
"recoveryTitle": "Recovery passphrase and escrow blob",
"recoveryBody": "After the keyfile is created, ProxMenux prompts twice for a recovery passphrase (with match validation) and runs <code>openssl</code> to produce <code>pbs-key.recovery.enc</code> — the keyfile encrypted with the passphrase. A copy is written to <code>/root/pbs-key.recovery-HOSTNAME-YYYYMMDD.enc</code> for offsite storage. Cancelling the passphrase dialog wipes the freshly-created keyfile.",
"blobUploadTitle": "Paired backup group on PBS",
"blobUploadBody1": "After a PBS backup that used the keyfile, the escrow blob is uploaded as a second backup group: <code>host/hostcfg-HOSTNAME-keyrecovery/BACKUP-TIME</code>. The shared <code>hostcfg-HOSTNAME</code> prefix places both groups adjacent in the PBS UI; the <code>-keyrecovery</code> suffix labels the relationship. The upload runs without <code>--keyfile</code> (the blob is already passphrase-protected by openssl) and only when the current backup used the keyfile.",
"blobUploadConstraintTitle": "Why two groups",
"blobUploadConstraintBody": "<code>--keyfile</code> is a per-invocation flag in <code>proxmox-backup-client backup</code>: all archives in a single invocation are encrypted with the keyfile or none are. <code>hostcfg.pxar</code> requires encryption; <code>keyrecovery.conf</code> cannot be encrypted with the same keyfile (fresh-install recovery would then require the keyfile it is meant to recover). Two invocations, two backup IDs.",
"blobUploadImageAlt": "PBS UI showing the hostcfg-HOSTNAME and hostcfg-HOSTNAME-keyrecovery backup groups adjacent in the datastore listing.",
"blobUploadImageCaption": "PBS UI — the paired backup groups. The main group holds the host backups; the -keyrecovery group holds the escrow blob.",
"recoverTitle": "Fresh-install recovery",
"recoverBody": "On a host without a local keyfile, the restore flow calls <code>hb_pbs_try_keyfile_recovery</code>. The function lists keyrecovery groups on the configured PBS, downloads the newest and prompts for the passphrase. On success, <code>pbs-key.conf</code> is written to the ProxMenux state directory and the encrypted backup can be restored. Without both the keyfile and the passphrase, the encrypted backup is not recoverable."
},
"restoreAccess": {
"heading": "Retrieval on the restore side",
"body": "The restore flow discovers ProxMenux host backups on PBS by listing backup groups under the configured repository and filtering by backup ID pattern. The Monitor's Backups tab renders the same list. Selecting a backup triggers <code>proxmox-backup-client restore</code> with the same repository + password + fingerprint (and <code>--keyfile</code> when the backup was encrypted), extracting the <code>.pxar</code> into a staging directory that <code>_rs_check_layout</code> then feeds to the standard restore pipeline. For manual retrieval outside ProxMenux, the same command extracts the archive to any path — the resulting tree can be inspected or fed to a hand-driven restore."
},
"references": {
"heading": "References",
"intro": "Official Proxmox Backup Server documentation for the components ProxMenux relies on.",
"items": [
{
"label": "Proxmox Backup Server documentation",
"href": "https://pbs.proxmox.com/docs/",
"tail": " — main entry point covering installation, administration, storage, users and roles."
},
{
"label": "proxmox-backup-client",
"href": "https://pbs.proxmox.com/docs/backup-client.html",
"tail": " — the command-line tool ProxMenux invokes for every backup and restore. Covers backup IDs, backup types, archives, repository syntax and environment variables."
},
{
"label": "Client-side encryption",
"href": "https://pbs.proxmox.com/docs/backup-client.html#encryption",
"tail": " — keyfile creation, --kdf modes, the encryption model that ProxMenux extends with a passphrase escrow."
},
{
"label": "Datastore management",
"href": "https://pbs.proxmox.com/docs/storage.html",
"tail": " — creating and managing the datastores that receive host backups, including chunk-store layout and permissions."
},
{
"label": "Pruning and garbage collection",
"href": "https://pbs.proxmox.com/docs/maintenance.html#pruning",
"tail": " — the retention model behind --keep-last / --keep-daily / --keep-weekly that ProxMenux applies per scheduled job, plus how PBS reclaims chunks after prune."
}
]
}
}

View File

@@ -0,0 +1,199 @@
{
"meta": {
"title": "How ProxMenux Backup works internally — rootfs, manifest, applications",
"description": "Detailed breakdown of what a ProxMenux backup contains: the rootfs produced by rsync of the default path profile, the structured manifest built by six independent collectors, and the application inventory that drives the automatic reinstall of packages and components after a restore.",
"ogTitle": "How ProxMenux Backup works internally",
"ogDescription": "The three payloads of a ProxMenux backup explained: rootfs, manifest and applications.",
"twitterTitle": "How ProxMenux Backup works | ProxMenux",
"twitterDescription": "The three payloads of a ProxMenux backup and how the restore reproduces the source host from them."
},
"header": {
"title": "How it works",
"description": "The internal breakdown of a ProxMenux backup — filesystem, manifest and application inventory — and how the restore consumes all three to reproduce the source host on a target that may not share the same kernel.",
"section": "Backup & Restore"
},
"intro": {
"title": "One archive, three payloads",
"body": "Every backup produces a directory layout with three well-defined payloads under a single staging root. The archive uploaded to the destination (local <code>.tar.zst</code>, PBS backup or Borg archive) contains this exact layout. The restore reads the three payloads independently, in a specific order that guarantees correctness: <strong>rootfs</strong> is copied first to lay down configuration, <strong>the manifest</strong> is consulted to detect drift and decide what to skip, and <strong>the application inventory</strong> drives the post-boot reinstall pass. No cross-payload dependencies — each one can be inspected or extracted independently."
},
"layout": {
"heading": "Archive layout",
"intro": "Every archive follows the same tree layout regardless of destination. The <code>metadata/</code> subdirectory holds the structured payloads; the <code>rootfs/</code> subdirectory holds the filesystem copy.",
"treeCaption": "The staging directory laid out during a backup. Every destination receives the same tree (adapted to its native format: tar for local, PBS chunks for PBS, borg segments for Borg).",
"tree": "backup-[timestamp]/\n├── manifest.json # structured host state\n├── metadata/\n│ ├── packages.manual.list # apt-mark showmanual\n│ ├── run_info.env # backup run identity + kernel version\n│ ├── paths_archived.txt # exact list of paths that reached rootfs/\n│ └── missing_paths.txt # paths from the profile absent on source\n└── rootfs/\n ├── etc/ # /etc/pve, /etc/network, /etc/ssh, …\n ├── root/ # /root (with volatile subdirs excluded)\n ├── usr/local/ # /usr/local/bin, /usr/local/share/proxmenux, …\n └── var/ # /var/lib/pve-cluster, /var/spool/cron/…"
},
"rootfs": {
"heading": "The rootfs payload",
"intro": "The <code>rootfs/</code> tree is a <strong>plain filesystem copy</strong> produced by <code>rsync</code> from the source host. It contains a curated <strong>default profile</strong> of paths that matter for a Proxmox restore, plus any <strong>custom paths</strong> added by the operator to the backup job or interactive session. The set is deliberately narrow: only paths that either <em>hold configuration</em> or <em>hold state that Proxmox cannot regenerate on its own</em>.",
"defaultProfileTitle": "The default profile",
"defaultProfileBody": "The default profile is defined by <code>hb_default_profile_paths</code> in <code>lib_host_backup_common.sh</code>. It covers eight categories that together describe a working Proxmox host:",
"categoriesTitle": "Path categories",
"categoryRows": [
{
"category": "PVE core",
"paths": "/etc/pve, /var/lib/pve-cluster, /etc/vzdump.conf",
"why": "Cluster filesystem contents, cluster live data, vzdump defaults."
},
{
"category": "Host identity & network",
"paths": "/etc/hostname, /etc/hosts, /etc/timezone, /etc/resolv.conf, /etc/network",
"why": "Everything the host needs to come up on the network with the same identity."
},
{
"category": "Access & auth",
"paths": "/etc/ssh, /etc/sudoers, /etc/sudoers.d, /etc/pam.d, /etc/security",
"why": "SSH keys, sudo rules and PAM configuration. Losing these locks the operator out of the restored host."
},
{
"category": "Kernel & boot",
"paths": "/etc/default/grub, /etc/kernel, /etc/modules, /etc/modules-load.d, /etc/modprobe.d, /etc/sysctl.conf, /etc/sysctl.d, /etc/udev/rules.d, /etc/fstab, /etc/iscsi, /etc/multipath",
"why": "IOMMU tokens, module blacklists, VFIO device IDs, mount table, storage stack config."
},
{
"category": "Shell & locale",
"paths": "/etc/environment, /etc/bash.bashrc, /etc/inputrc, /etc/profile, /etc/profile.d, /etc/locale.gen, /etc/locale.conf",
"why": "System-wide shell setup, environment variables, locale generation configuration."
},
{
"category": "Packaging & cron",
"paths": "/etc/apt, /etc/cron.d, /etc/cron.{daily,hourly,weekly,monthly}, /etc/cron.allow, /etc/cron.deny, /var/spool/cron/crontabs",
"why": "APT sources for consistent package resolution, scheduled tasks defined by the operator."
},
{
"category": "ProxMenux state & tools",
"paths": "/etc/proxmenux, /etc/systemd/system, /etc/log2ram.conf, /etc/logrotate.conf, /etc/logrotate.d, /etc/lm-sensors, /etc/sensors3.conf, /etc/fail2ban, /etc/snmp, /etc/postfix, /etc/wireguard, /etc/openvpn, /etc/grafana, /etc/influxdb, /etc/prometheus, /etc/telegraf, /etc/zabbix",
"why": "Optional but common Proxmox tooling. Missing paths are noted in <code>metadata/missing_paths.txt</code> without stopping the backup."
},
{
"category": "ProxMenux binaries & root",
"paths": "/usr/local/bin, /usr/local/sbin, /usr/local/share/proxmenux, /root (volatile subdirs excluded)",
"why": "ProxMenux-installed binaries and per-user configuration under <code>/root</code>. Volatile paths (<code>.bash_history</code>, <code>.cache/</code>, <code>tmp/</code>, <code>.local/share/Trash/</code>) are excluded from the copy."
},
{
"category": "ZFS state (conditional)",
"paths": "/etc/zfs",
"why": "Only included when the source host runs ZFS. Contains <code>zpool.cache</code> and <code>hostid</code>."
}
],
"customTitle": "Extending the profile with custom paths",
"customBody": "Beyond the default profile, ProxMenux offers two ways to include additional paths in a backup. They compose without conflict and both apply to interactive backups and scheduled jobs.",
"customExtrasTitle": "1. Persistent extras (per-host file)",
"customExtrasBody": "A text file at <code>/usr/local/share/proxmenux/backup-extra-paths.txt</code> holds a list of absolute paths the operator has marked as \"always include\" on this host. When a backup runs in <strong>Default</strong> mode, ProxMenux appends these paths to the default profile automatically without asking. The file is edited from the interface — no manual editing needed — and persists across reboots and updates. One absolute path per line; <code>#</code> comments are allowed.",
"customModeTitle": "2. Custom mode (per-run)",
"customModeBody": "Launching a backup in <strong>Custom</strong> mode replaces the automatic application of the default profile with a checklist showing every path: the default-profile entries and the persistent extras (prefixed with <code>[+]</code> and pre-checked). The operator ticks or unticks entries for that specific run, and can also press <em>Add custom path</em> to enter a new path — which is then persisted to the extras file for future backups.",
"customMissingTitle": "Paths absent from the source",
"customMissingBody": "Any path from the profile (default or added) that does not exist on the source host is recorded in <code>metadata/missing_paths.txt</code> inside the archive. The backup neither fails nor stops — the operator sees a summary of archived paths and missing paths at the end. In practice this happens for optional tooling paths like <code>/etc/wireguard</code> or <code>/etc/prometheus</code> when those tools are not installed."
},
"manifest": {
"heading": "The manifest payload",
"intro": "<code>manifest.json</code> is a structured JSON document that describes the source host at the moment of the backup. It is produced by <strong>six independent collectors</strong> orchestrated by <code>build_manifest.sh</code>. Each collector is read-only, produces a well-defined JSON fragment, and falls back to a safe empty default if it fails — the manifest is still usable if one section is incomplete.",
"orchestratorCaption": "The six collectors compose the manifest. Each collector runs in its own subprocess; a failure in one falls back to a documented safe default and warns but does not abort the backup.",
"collectorRows": [
{
"collector": "collect_source_host.sh",
"produces": "source_host",
"content": "Hostname, PVE version (<code>pveversion</code>), PBS version if the host runs the backup-server role, kernel (<code>uname -r</code>), boot mode (efi/bios), root filesystem type, CPU model + architecture, memory in KB."
},
{
"collector": "collect_hardware.sh",
"produces": "hardware_inventory",
"content": "GPUs (with vendor and ProxMenux installer mapping), TPUs (Coral USB + M.2 with <code>lsusb</code>/<code>lspci</code> detection), NICs (with MAC, PCI slot and bridge membership), wireless devices. GPU entries carry a <code>passthrough_eligible</code> heuristic."
},
{
"collector": "collect_storage.sh",
"produces": "storage_inventory",
"content": "ZFS pools (with pool type + member disks resolved to <code>/dev/disk/by-id/*</code> for portability), LVM volume groups + thin pools, physical disks with SMART capability, PVE <code>storage.cfg</code> entries, external mounts."
},
{
"collector": "collect_kernel.sh",
"produces": "kernel_params",
"content": "Operator-authored tokens from <code>/proc/cmdline</code> (stripped of boilerplate like <code>BOOT_IMAGE=</code>, <code>root=</code>, <code>ro/rw</code>, <code>quiet</code>, <code>splash</code>), modules loaded at boot from <code>/etc/modules</code>, and paths of <code>/etc/modprobe.d/*.conf</code> files with actual directives (<code>options</code>, <code>blacklist</code>, <code>install</code>, <code>alias</code>, <code>softdep</code>)."
},
{
"collector": "collect_proxmenux_state.sh",
"produces": "proxmenux_installed_components",
"content": "Reads <code>/usr/local/share/proxmenux/managed_installs.json</code> (registry of everything ProxMenux has installed) and <code>installed_tools.json</code>. Each entry keeps the installer path (<code>menu_script</code>) so the restore can trigger the exact same install flow."
},
{
"collector": "collect_guests.sh",
"produces": "vms_lxcs_at_backup",
"content": "Enumerates VMs (<code>qm list</code>) and LXCs (<code>pct list</code>) present at backup time — VMID, name, current status. Only the inventory: the actual guest data is the responsibility of <code>vzdump</code> / PBS."
}
],
"schemaTitle": "Schema validation",
"schemaBody": "The manifest validates against <code>scripts/backup_restore/schema/manifest.schema.json</code>. Running <code>build_manifest.sh --validate</code> triggers a Python-side JSON Schema validation (requires <code>python3</code> + <code>jsonschema</code>). If the module is not present, the check is skipped silently — validation is primarily a developer aid, not a runtime dependency."
},
"applications": {
"heading": "The application inventory",
"intro": "Two files under <code>metadata/</code> catalogue everything installed on the source that is not part of the base Proxmox VE package set. The restore uses them to reproduce the exact set of user-installed software on the target, using either APT or ProxMenux's own installers depending on how the software was originally installed.",
"packagesTitle": "packages.manual.list",
"packagesBody": "A plain-text list produced by <code>apt-mark showmanual</code>: every APT package that was <em>explicitly installed</em> on the source host, sorted alphabetically. This excludes packages installed as dependencies of the base Proxmox VE ISO (they are re-pulled automatically by the target's own APT). Read by <code>_rs_run_complete_extras</code> during restore, filtered through a three-pass <em>cascade-safe</em> filter (<code>dpkg -s</code> for already-installed, sibling-major detection for library packages, <code>apt-get install --simulate</code> for cascade-remove risk), then installed with <code>apt-get install -y</code>.",
"componentsTitle": "components_status.json (part of the rootfs)",
"componentsBody": "A JSON registry under <code>/usr/local/share/proxmenux/</code> that records every component ProxMenux has installed with its exact state: version, ProxMenux-specific flags (for NVIDIA: <code>patched</code> boolean; for Coral: DKMS version). This file lives inside the rootfs — not in <code>metadata/</code> — because it is <em>read after</em> the rootfs has been copied to the target. The post-boot dispatcher (<code>apply_cluster_postboot.sh</code>) iterates over its entries and runs each component's <code>--auto-reinstall</code> hook, which reads the recorded state and reproduces the install against the target's current kernel.",
"componentInstallersTitle": "Component installers",
"componentInstallersBody": "Four ProxMenux installers currently expose a <code>--auto-reinstall</code> entry point:",
"installerRows": [
{
"component": "nvidia_driver",
"installer": "gpu_tpu/nvidia_installer.sh",
"action": "Reads <code>version</code> + <code>patched</code>. Downloads the exact same NVIDIA runfile, builds DKMS modules against the target's kernel, re-applies the ProxMenux patch if the source had it."
},
{
"component": "coral_driver",
"installer": "gpu_tpu/install_coral.sh",
"action": "Reads the Coral driver version. Compiles the DKMS module against the target's kernel."
},
{
"component": "amdgpu_top",
"installer": "gpu_tpu/amd_gpu_tools.sh",
"action": "Reads the recorded version. Re-downloads the exact <code>.deb</code> from the GitHub release."
},
{
"component": "intel_gpu_tools",
"installer": "gpu_tpu/intel_gpu_tools.sh",
"action": "APT-installs the package. Idempotent if already present from <code>packages.manual.list</code>."
}
]
},
"restoreFlow": {
"heading": "How the restore consumes the three payloads",
"intro": "The restore is a five-stage pipeline. Each stage reads a specific subset of the archive and updates the target host. No stage requires the source host to be reachable — the archive is fully self-contained.",
"stagesCaption": "Stage 1 uses the manifest to decide what to touch. Stage 2 copies rootfs paths that are safe to apply on a running system. Stage 3 stages the risky paths for the next boot. Stage 4 handles packages. Stage 5 runs after the reboot and reinstalls components against the target's kernel.",
"stageRows": [
{
"stage": "1",
"name": "Compatibility check",
"reads": "manifest.json",
"action": "Runs <code>hb_compat_check</code>. Compares source vs. target hardware (NICs, storage IDs), PVE version, and major kernel version. Sets <code>HB_COMPAT_KERNEL_DIRECTION</code> (<code>same</code>, <code>bk_newer</code> or <code>bk_older</code>) and populates <code>RS_SKIP_PATHS</code> with hardware-drift and cross-kernel exclusions."
},
{
"stage": "2",
"name": "Hot apply",
"reads": "rootfs/ (safe paths only)",
"action": "<code>_rs_apply … hot</code> copies <code>hb_classify_path</code>=<code>hot</code> entries directly to the live target. Anything under <code>/etc/pve</code>, <code>/etc/network</code> or paths classified as <em>reboot</em>/<em>dangerous</em> is deferred."
},
{
"stage": "3",
"name": "Pending prepare",
"reads": "rootfs/ (reboot + dangerous paths)",
"action": "<code>_rs_prepare_pending_restore</code> stages risky paths under <code>/var/lib/proxmenux/pending-restore/</code>, writes <code>plan.env</code>, <code>apply-on-boot.list</code> and <code>rs-skip-paths.txt</code>, and enables <code>proxmenux-restore-onboot.service</code> to fire on the next boot."
},
{
"stage": "4",
"name": "Package install",
"reads": "metadata/packages.manual.list",
"action": "<code>_rs_run_complete_extras</code> runs the cascade-safe filter and calls <code>apt-get install -y</code> with the surviving package list. Full output goes to <code>/var/log/proxmenux/restore-apt-*.log</code>."
},
{
"stage": "5",
"name": "Post-boot",
"reads": "rootfs (already applied) + components_status.json",
"action": "After reboot, <code>apply_pending_restore.sh</code> plays back the deferred paths and <code>apply_cluster_postboot.sh</code> runs <code>update-initramfs</code>, <code>update-grub</code> (or <code>proxmox-boot-tool refresh</code>) and iterates over <code>components_status.json</code> firing each component's <code>--auto-reinstall</code> hook."
}
]
},
"whyItWorks": {
"heading": "Why the three-payload split is the right one",
"body": "The split is not a filesystem decision — it is a <strong>lifecycle</strong> decision. Filesystem content moves with <code>rsync</code>: fast, transparent, atomic per file. Configuration state that a restore has to interpret before touching the target moves as <strong>structured JSON</strong>: readable independently, versionable through a schema, machine-diffable against the target's own state. Software that has to be re-installed against the target's environment moves as an <strong>inventory</strong>: names and versions only, letting the target's package manager and ProxMenux's own installers decide the actual binaries. Each payload optimises for what it needs to do, and the three combine into a restore that is atomic in intent but fault-tolerant in practice: a corrupt manifest still leaves the rootfs restorable, a missing package still leaves the components installable, a component installer failing on one entry does not stop the next."
}
}

View File

@@ -0,0 +1,87 @@
{
"meta": {
"title": "ProxMenux Backup & Restore — Overview | Full host backup and restore for Proxmox VE",
"description": "ProxMenux Backup & Restore captures the complete state of a Proxmox host — filesystem, structured configuration manifest, and installed packages/components — and reproduces it on the same or a different host. The backup and the restore are self-contained: no external dependencies, and cross-kernel restores are supported through a direction-aware safe-subset filter and kernel-agnostic hydration.",
"ogTitle": "ProxMenux Backup & Restore — Overview",
"ogDescription": "Full host backup and restore for Proxmox VE with structured manifest, package list and component reinstallers.",
"twitterTitle": "ProxMenux Backup & Restore | ProxMenux",
"twitterDescription": "Full host backup and restore for Proxmox VE with structured manifest, package list and component reinstallers."
},
"header": {
"title": "Backup & Restore",
"description": "Full-host backup and restore for Proxmox VE. Captures filesystem, configuration and installed components in a single archive, and reproduces the host on the same or a different Proxmox install with no external dependencies.",
"section": "Backup & Restore"
},
"intro": {
"title": "What it is, in one paragraph",
"body": "A ProxMenux backup captures the complete state of a Proxmox host: <strong>the filesystem</strong> (relevant directories under <code>/etc</code>, <code>/root</code>, <code>/var/lib/pve-cluster</code>, plus optional custom paths), <strong>a structured manifest</strong> (JSON with the detected hardware, kernel parameters, network layout, ZFS state, users and cron entries), and <strong>an application inventory</strong> (all packages marked as manually installed by APT, plus the list of components installed by ProxMenux with their exact versions). Any of the three supported destinations — local archive, Proxmox Backup Server (recommended) or Borg — receives the same self-contained payload, and any of them can hydrate the target host without depending on the source being reachable at restore time."
},
"whatItIsNot": {
"heading": "What it is not",
"intro": "The section covers <strong>host-level</strong> backup and restore: the Proxmox installation itself, not the workloads running on top of it.",
"items": [
"<strong>It is not a VM/CT backup tool.</strong> Guest disks and RAM state are not captured by this feature; that is what <code>vzdump</code> is for. The guest <strong>configuration files</strong> (<code>/etc/pve/nodes/&lt;node&gt;/qemu-server/*.conf</code> and <code>lxc/*.conf</code>) <strong>are</strong> captured, so after a restore the guest inventory reappears and disks can be re-attached from an existing PBS/local backup.",
"<strong>It is not a cluster-wide operation.</strong> Each node backs up itself. Cluster membership is captured as part of <code>/etc/pve</code> so a restored node can be re-added to its cluster, but restoring a full cluster requires per-node coordination.",
"<strong>It is not a full disk image.</strong> Kernel binaries, the initramfs and the boot partition are not captured. On a restore, ProxMenux relies on the target host's own boot artifacts (regenerated automatically by <code>update-initramfs</code> and the bootloader tool) and installs matching drivers against the target's running kernel."
]
},
"threePillars": {
"heading": "The three pillars of a backup",
"intro": "A ProxMenux archive is structured around three self-contained payloads. The restore uses all three together to reproduce the source host on a target that may not even have the same kernel installed.",
"diagramCaption": "Every backup ships the same three payloads regardless of destination. The restore consumes all three: rootfs to lay down files, manifest to detect drift and cross-kernel differences, and application inventory to re-install packages and components against the target's own kernel.",
"pillar1Label": "Filesystem",
"pillar1Detail": "rootfs/\n(rsync of\n/etc, /root,\n/var/lib/pve-cluster,\n+ optional paths)",
"pillar2Label": "Manifest",
"pillar2Detail": "manifest.json\n(hardware, kernel\nparams, network,\nZFS, users, cron,\nZFS pools, storage)",
"pillar3Label": "Applications",
"pillar3Detail": "packages.manual.list\n+ components_status.json\n(APT manual + ProxMenux\ninstallers with versions)"
},
"restoreIsUniversal": {
"heading": "The restore reproduces the source host, not the archive",
"body": "Restoring a ProxMenux backup does not just extract the filesystem. The restore flow reads the manifest to detect drift between the source and the target (hardware differences, NIC renames, kernel version, ZFS pool identity), replays the filesystem, then triggers the correct component installer for every service that was installed on the source (NVIDIA driver, Coral TPU, AMD GPU tools, Intel GPU tools). Each installer runs against the <strong>target's current kernel</strong>, so the restored host does not depend on the source's kernel being present. When the target's kernel is newer than the backup's, a kernel-agnostic <strong>hydration</strong> pass merges the operator's own tuning (IOMMU tokens, VFIO device IDs, custom quirks, GRUB keys) into the target's fresh boot configuration without copying kernel-tied files verbatim."
},
"twoInterfaces": {
"heading": "Two interfaces, one backend",
"intro": "Every step of the backup and restore workflow is available from two entry points. Both call the same shell library, produce identical archives, and read the same job registry.",
"cliLabel": "ProxMenux Scripts (TUI)",
"cliDetail": "menu → Utilities →\nHost Backup / Restore\n\nDialog-based flow,\nSSH-friendly, scriptable\nfor unattended use.",
"webLabel": "ProxMenux Monitor (Web UI)",
"webDetail": "Backups tab in the\nMonitor's Web interface.\n\nOne-click restore, live\nlog tail, integrated with\nnotifications and the\nrollback delta viewer."
},
"whereNext": {
"heading": "Where to go from here",
"intro": "Each subsection below covers one aspect of the workflow in depth. Start with <em>How it works</em> if the goal is to understand what the archive contains and why. Jump to <em>Destinations</em> to configure the target for the copy. Read <em>Restoring</em> and <em>Cross-kernel restore</em> for the recovery side.",
"items": [
{
"label": "How it works",
"href": "/docs/backup-restore/how-it-works",
"tail": " — the three payloads (rootfs, manifest, applications) in detail, with the collectors that produce them and the format of each file."
},
{
"label": "Destinations",
"href": "/docs/backup-restore/destinations",
"tail": " — comparison of local, Proxmox Backup Server (recommended) and Borg, and how to configure each one."
},
{
"label": "Creating backups",
"href": "/docs/backup-restore/creating-backups",
"tail": " — one-off backups, the default path profile, adding custom paths, encryption for PBS."
},
{
"label": "Scheduled jobs",
"href": "/docs/backup-restore/scheduled-jobs",
"tail": " — new jobs vs. attaching to an existing PVE vzdump job, scheduling formats, the job detail modal."
},
{
"label": "Restoring",
"href": "/docs/backup-restore/restoring",
"tail": " — the three actions on an archive (view, download, restore), Complete vs. Custom restore, the post-boot dispatcher and why the last ten minutes matter."
},
{
"label": "Cross-kernel restore",
"href": "/docs/backup-restore/cross-kernel",
"tail": " — direction-aware behaviour when the target kernel differs from the backup's, the safe-subset filter and the four hydration phases."
}
]
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,87 @@
{
"meta": {
"title": "Scheduled jobs — timers, attach mode, retention | ProxMenux",
"description": "Scheduled ProxMenux host backup jobs. Two creation modes (own systemd timer or attach to an existing PVE vzdump job), retention values applied per job via proxmox-backup-client/borg/local prune, storage layout under /var/lib/proxmenux/backup-jobs, and the runner script that produces archives identical to the interactive flow.",
"ogTitle": "ProxMenux Backup — scheduled jobs",
"ogDescription": "Unattended scheduled host backups with attach mode, retention, and the same three destinations as the interactive flow.",
"twitterTitle": "Scheduled jobs | ProxMenux",
"twitterDescription": "Unattended scheduled host backup jobs with attach mode and retention."
},
"header": {
"title": "Scheduled jobs",
"description": "Unattended host backup jobs. Two creation models: a new independent job with its own schedule, or a job attached to an existing PVE vzdump task that inherits that task's schedule and retention. Both produce archives identical to the interactive flow.",
"section": "Backup & Restore"
},
"intro": {
"title": "The two scheduled-job models",
"body": "A scheduled job can be created following one of two models:",
"modelsList": [
"<strong>New independent job</strong> — ProxMenux defines the job schedule itself with its own systemd timer, independent of any other task on the host. Compatible with all three destinations: Local, PBS and Borg.",
"<strong>Attach to an existing PVE vzdump task</strong> — the job has no schedule of its own; it runs automatically whenever the parent PVE vzdump task that already backs up the VMs and LXCs on this host fires. Inherits the schedule and retention from the parent task. Compatible with Local and PBS (Borg is not supported because PVE has no native scheduler for Borg)."
]
},
"attachBadge": {
"title": "Attach mode — recommended when a PVE vzdump task already exists",
"body": "When a PVE vzdump backup task is already configured for the VMs and LXCs on this node, attaching the host backup to that task guarantees the host configuration is captured in the <strong>same window</strong> as the guests. On restore, the guest configs come from the host backup (they live under <code>/etc/pve</code>), and the guest disks come from the vzdump backup taken alongside — both sets are consistent with each other, so a full-node recovery can reproduce the host and re-attach every guest without version drift."
},
"modes": {
"heading": "The two modes",
"rows": [
{ "mode": "New scheduled job", "backends": "Local, PBS, Borg", "schedule": "Own <code>OnCalendar</code> expression (systemd calendar syntax — e.g. <code>daily</code>, <code>Mon..Fri 03:00</code>).", "retention": "Prompted separately: <code>keep-last</code>, <code>keep-hourly</code>, <code>keep-daily</code>, <code>keep-weekly</code>, <code>keep-monthly</code>, <code>keep-yearly</code>. Applied by the runner after each successful backup." },
{ "mode": "Attach to a PVE vzdump job", "backends": "Local, PBS (Borg has no PVE-side scheduler)", "schedule": "Inherited from the parent PVE job. No systemd timer is installed on the ProxMenux side.", "retention": "Inherited from the parent's <code>prune-backups</code> configuration (mapped one-to-one to the runner's <code>KEEP_*</code> variables via <code>hb_pve_prune_to_keep_env</code>)." }
]
},
"attachDetail": {
"heading": "How attach mode works",
"intro": "PVE writes <code>vzdump</code> tasks to <code>/etc/pve/jobs.cfg</code> — one stanza per task, each pointing at a storage where the VM and LXC dumps land. Attach mode requires that storage to be a backend ProxMenux understands (Local or PBS); when the task fires, ProxMenux runs alongside it.",
"steps": [
{ "step": "1", "detail": "During job creation, ProxMenux lists compatible parent PVE tasks via <code>hb_pve_list_vzdump_jobs_for_backend</code>. The operator picks one." },
{ "step": "2", "detail": "The job's <code>.env</code> is written with <code>PVE_PARENT_JOB</code>, <code>PVE_STORAGE</code> and the inherited <code>KEEP_*</code> values; no systemd timer is created." },
{ "step": "3", "detail": "<code>hb_install_vzdump_hook</code> registers a script-hook in <code>/etc/vzdump.conf</code>. When PVE runs any vzdump task, the hook script fires; if the <code>$STOREID</code> passed to it matches an attached job's <code>PVE_STORAGE</code>, the runner is invoked for that job." },
{ "step": "4", "detail": "The archive lands in the same storage the vzdump dumps just wrote to: <code>path/dump/</code> for Local, or the PBS repository configured on the PVE storage entry." }
],
"outroBody": "Attach mode has one operational implication: disabling or deleting the parent PVE task also disables the host backup — there is no timer of its own to fall back on. The job entry stays on disk so it can be re-attached later."
},
"storageLayout": {
"heading": "Files that make up a job",
"intro": "Every scheduled job is fully described by three or four files on disk. Reading them gives the full configuration of the job without relying on the interface.",
"rows": [
{ "path": "/var/lib/proxmenux/backup-jobs/JOB_ID.env", "content": "Backend, backup ID or destination, schedule (New mode) or PVE parent (Attach mode), enabled flag, retention <code>KEEP_*</code> values, credentials pointers." },
{ "path": "/var/lib/proxmenux/backup-jobs/JOB_ID.paths", "content": "One absolute path per line — the frozen selection resolved from the profile at job-creation time. Editing the file re-runs the job with the new selection on the next timer fire." },
{ "path": "/etc/systemd/system/proxmenux-backup-JOB_ID.timer + .service", "content": "New mode only. The service invokes <code>run_scheduled_backup.sh JOB_ID</code>. The timer schedules it with <code>Persistent=true</code> (missed fires run at next boot) and a small <code>RandomizedDelaySec=120</code> to spread load when multiple jobs share the same OnCalendar expression." },
{ "path": "/etc/vzdump.conf script-hook", "content": "Attach mode only. Installed once by <code>hb_install_vzdump_hook</code>; matches every attached job's <code>PVE_STORAGE</code> against the <code>$STOREID</code> PVE passes to the hook script." }
]
},
"runner": {
"heading": "What a job does when it fires",
"intro": "Every job — whether new-model or attached — runs the same three-step sequence:",
"steps": [
"<strong>Prepare the backup.</strong> Reads the job configuration (destination, profile, paths) and assembles the archive tree exactly the same way the interactive flow does. The result is the same archive a manual backup with those settings would produce.",
"<strong>Write to the destination.</strong> Uploads or writes the archive to the configured destination — a local <code>.tar.zst</code> file, a PBS backup, or a Borg archive — using exactly the same tools and credentials a manual backup to the same destination would use.",
"<strong>Apply retention.</strong> Removes old backups from the destination, keeping the <code>keep-last</code> / <code>keep-daily</code> / <code>keep-weekly</code> counts configured on the job. Pruning is performed by the destination itself: PBS applies its own retention, Borg runs <code>borg prune</code>, and for Local ProxMenux deletes the files that fall outside the <code>keep-last</code> window."
]
},
"management": {
"heading": "Managing jobs",
"intro": "The scheduler menu (Scripts TUI) and the Monitor Backups tab expose the same actions on any job.",
"rows": [
{ "action": "Run now", "detail": "Invokes the runner immediately, bypassing the timer / vzdump hook. Useful to verify a job configuration without waiting for the next scheduled fire." },
{ "action": "Enable / Disable", "detail": "New mode: <code>systemctl enable/disable --now</code> the timer. Attach mode: flips the <code>ENABLED</code> flag in the job env — the hook script honours it on the next PVE fire." },
{ "action": "Edit", "detail": "Reopens the destination, schedule, profile and retention prompts and rewrites the job files. Preserves the job ID." },
{ "action": "Delete", "detail": "Removes the job env, paths file, systemd timer + service (New mode), and disables the hook binding (Attach mode). Does not touch archives already on the destination." },
{ "action": "View log", "detail": "Streams <code>/var/log/proxmenux/backup-jobs/JOB_ID-YYYYMMDD_HHMMSS.log</code> — one log file per run. The runner also emits a compact status line to journald under the systemd service." }
]
},
"notifications": {
"heading": "Notifications",
"body": "Every scheduled run fires the same <code>hb_notify_lifecycle</code> events as the interactive flow (<code>start</code>, <code>complete</code>, <code>fail</code>). If notification channels are configured in the Monitor, unattended jobs surface their results the same way manual backups do — an operator does not need to check the log to know whether a job succeeded."
},
"whereNext": {
"heading": "Where to go next",
"items": [
{ "label": "Creating backups", "href": "/docs/backup-restore/creating-backups", "tail": " — the interactive flow that shares the backend with the scheduler." },
{ "label": "Destinations", "href": "/docs/backup-restore/destinations", "tail": " — per-backend configuration used by both the interactive flow and the scheduler." },
{ "label": "Restoring", "href": "/docs/backup-restore/restoring", "tail": " — the flow that consumes what jobs produce." }
]
}
}

View File

@@ -35,6 +35,32 @@
}
]
},
"flow": {
"heading": "Network Flow diagram",
"intro": "Between the top row and the three group cards, the tab renders a live topology view called <strong>Network Flow</strong>. It draws every path a packet can take through the host — physical NICs at one end, bridges in the middle, VMs and containers at the other — with animated pulses that show real-time rx/tx traffic on each link.",
"imageAlt": "Network Flow diagram — NICs on the left, host and bridges in the middle, VMs and LXCs on the right, with animated pulses on each connection",
"imageCaption": "Network Flow — colour-coded nodes plus animated comets whose direction and thickness reflect live traffic.",
"elementsTitle": "What the diagram shows",
"elementsIntro": "Every node is one entity from the same inventory used by the group cards below, but arranged as a topology so relationships between them are immediate:",
"elements": [
"<strong>NICs</strong> (amber) — every physical interface with link up. Interfaces reported as down are drawn faded.",
"<strong>Host</strong> (amber) — the Proxmox host itself, sitting between the NICs and the bridges. Rendered as a fixed anchor; not clickable.",
"<strong>Bridges</strong> (cyan) — Linux and OVS bridges. Only bridges that carry at least one active guest are drawn; unused bridges are hidden to keep the diagram focused on what actually moves traffic.",
"<strong>LXCs</strong> (cyan) — running containers attached to a bridge.",
"<strong>VMs</strong> (purple) — running virtual machines attached to a bridge.",
"Offline guests (stopped VMs / containers) are hidden."
],
"pulsesTitle": "What the animation encodes",
"pulsesBody": "The animated comets that travel along each edge represent live traffic:",
"pulses": [
"<strong>Direction</strong> — a pulse flowing toward the NIC is <em>tx</em> from the guest; toward the guest is <em>rx</em>.",
"<strong>Stroke width</strong> scales with the guest's combined rx+tx rate. An idle guest still draws a faint animated line; a busy one gets a thick one.",
"<strong>Comet head glow</strong> — warm at ~1 MB/s, hot at ≥30 MB/s. Useful to spot at a glance which guest is dominating a NIC.",
"<strong>Click</strong> — every node except the host is clickable and opens the same per-interface drill-in modal documented below. Tapping the host is intentionally a no-op — there is no host-level modal in this view."
],
"useTitle": "When it's useful",
"useBody": "The group cards below tell you <em>what</em> exists; the diagram tells you <em>how it's connected</em> and where the traffic is flowing right now. Patterns easy to spot at a glance: a bridge with no active guest attached, two heavy guests going through the same NIC (bottleneck candidate), or a single VM saturating a link while everything else is quiet."
},
"groups": {
"heading": "Three interface groups",
"intro": "Below the top row, three cards split the inventory by role. Each card has its own active-count badge in the header. Interface <strong>type</strong> is identified at a glance by a coloured badge on every row:",

View File

@@ -79,13 +79,13 @@
},
{
"tool": "Log2RAM (SSD-aware, auto)",
"what": "Detects whether the root disk is SSD / NVMe and installs Log2RAM from upstream git. Sizes the ramdisk by host RAM (128M / 256M / 512M), schedules periodic sync and a 95 % threshold auto-sync. Adjusts journald limits to fit in the ramdisk.",
"what": "Reduces SSD/NVMe wear by moving /var/log to a tmpfs ramdisk with periodic disk sync. Installed from the upstream project when the root disk is SSD or NVMe. Sizes the ramdisk by host RAM (128M / 256M / 512M), schedules periodic sync and an auto-sync guard that vacuums at 80% and truncates hot logs at 92% before writing. Adjusts journald limits to fit in the ramdisk. Full details on <link>Log2RAM</link>.",
"category": "Storage",
"categorySlug": "storage"
},
{
"tool": "ZFS autotrim (SSD-only)",
"what": "Enables zpool autotrim=on on every ZFS pool whose vdevs are all SSD/NVMe with TRIM support (checks /sys/block/<dev>/queue/rotational and discard_granularity). Pools backed by HDDs are skipped automatically. Only pools actually changed by ProxMenux are recorded for uninstall — pools you set autotrim on manually are left alone.",
"what": "Enables zpool autotrim=on on every ZFS pool whose vdevs are all SSD/NVMe with TRIM support (checks /sys/block/[dev]/queue/rotational and discard_granularity). Pools backed by HDDs are skipped automatically. Only pools actually changed by ProxMenux are recorded for uninstall — pools you set autotrim on manually are left alone.",
"category": "Storage",
"categorySlug": "storage"
},

View File

@@ -25,43 +25,43 @@
"categories": [
{
"name": "Basic Settings",
"description": "Repositories, system upgrade, timezone, locale, common utilities."
"description": "Clean the APT sources, run the official Proxmox upgrade and set timezone, locale and common utilities. The baseline every other group sits on top of."
},
{
"name": "System",
"description": "Journald, logrotate, kernel limits, memory tuning, kernel panic, fast reboots."
"description": "Tune the log subsystem and kernel limits for a host that carries many VMs and containers. Covers journald, logrotate, sysctl (memory, file limits), kernel panic behaviour and fast reboots."
},
{
"name": "Virtualization",
"description": "Guest agent auto-install, IOMMU/VFIO enablement for PCI passthrough."
"description": "Prepare the host for advanced virtualization. Auto-installs the guest agent on templates and enables IOMMU/VFIO for PCI passthrough of GPUs, controllers and TPUs."
},
{
"name": "Network",
"description": "APT over IPv4, network sysctl tuning, Open vSwitch, TCP BBR, persistent interface names."
"description": "Harden and tune the host's network stack. Forces APT over IPv4, applies sysctl hardening + TCP buffer tuning, offers Open vSwitch and BBR, and pins persistent interface names by MAC."
},
{
"name": "Storage",
"description": "ZFS ARC sizing, ZFS auto-snapshot, vzdump backup speed limits."
"description": "Set up Proxmox's common storage subsystems: ZFS ARC sizing, ZFS auto-snapshot, and vzdump speed limits to avoid saturating the disk during backups."
},
{
"name": "Security",
"description": "Disable portmapper/rpcbind to reduce the attack surface."
"description": "Reduce the attack surface exposed by default. Disables the RPC services (portmapper/rpcbind) that Proxmox does not need but leaves listening."
},
{
"name": "Customization",
"description": "Bashrc colors & aliases, MOTD banner, subscription-notice removal."
"description": "Change the host's visual and shell experience: colors and aliases in bashrc, MOTD banner and removal of the subscription notice in the web UI."
},
{
"name": "Monitoring",
"description": "OVH Real-Time Monitoring (only on detected OVH servers)."
"description": "Integrate the host with OVH Real-Time Monitoring. Only appears when ProxMenux detects an OVH server."
},
{
"name": "Performance",
"description": "Parallel gzip (pigz) for faster compression in backups and transfers."
"description": "Speed up compression operations (backups, transfers) by replacing gzip with its parallel counterpart pigz."
},
{
"name": "Optional",
"description": "AMD CPU fixes, Fastfetch, Figurine, Ceph repo, High Availability, Log2RAM."
"description": "Niche pieces not every host needs: AMD CPU fixes, Fastfetch banner, Figurine 3D hostname, Ceph repository, High Availability services and Log2RAM to reduce SSD wear."
}
],
"mixTip": {

View File

@@ -136,6 +136,27 @@
"automates": "This adjustment automates the following process:",
"outro": "After installation, you'll see your hostname displayed in 3D ASCII art each time you log in, making it immediately clear which Proxmox node you're working on."
},
"log2ram": {
"title": "Install Log2RAM (SSD/NVMe wear reduction)",
"intro": "Log2RAM mounts <code>/var/log</code> on a tmpfs ramdisk and periodically syncs the contents back to the underlying disk. On a hypervisor journald churn hits the root SSD every few seconds; moving the writes to RAM reduces wear and disk I/O without losing logs — the periodic sync flushes them to disk and a clean shutdown flushes them too.",
"upstreamLabel": "Upstream project:",
"upstreamUrl": "https://github.com/azlux/log2ram",
"upstreamLinkLabel": "azlux/log2ram on GitHub",
"doesLabel": "What ProxMenux does:",
"doesItems": [
"Detects whether the root disk is SSD/NVMe by reading <code>/sys/block/&lt;dev&gt;/queue/rotational</code>. On a rotational disk the Automated flow asks first before installing.",
"Clones the upstream repository (<code>azlux/log2ram</code>) into <code>/tmp/log2ram</code> and runs its <code>install.sh</code>, then enables the <code>log2ram</code> systemd unit.",
"Sizes the ramdisk based on host RAM: <code>≤ 8 GB → 128M</code>, <code>≤ 16 GB → 256M</code>, <code>&gt; 16 GB → 512M</code>. Writes the value to <code>SIZE=</code> in <code>/etc/log2ram.conf</code>.",
"Schedules a periodic disk sync via <code>/etc/cron.d/log2ram</code>: every 1h / 3h / 6h according to the same RAM tier.",
"Installs an auto-sync guard at <code>/usr/local/bin/log2ram-check.sh</code>, wired to <code>/etc/cron.d/log2ram-auto-sync</code> to run every 10 minutes. When <code>/var/log</code> reaches 80% of the ramdisk size the guard vacuums journald; at 92% it also truncates <code>pveproxy access/error</code> and <code>pveam.log</code> before syncing — the plain <code>log2ram write</code> command copies tmpfs to disk but does NOT shrink the tmpfs, so this guard prevents PVE from crashing with <em>No space left on device</em> when logs grow uncontrolled.",
"Adjusts systemd-journald limits (<code>SystemMaxUse</code>, <code>RuntimeMaxUse</code>) to fit within the ramdisk so a single burst cannot fill it.",
"Registers itself in <code>installed_tools.json</code> so it can be reverted from Uninstall Optimizations."
],
"howUseLabel": "How to use:",
"howUseBody": "On the Automated flow Log2RAM applies unattended when an SSD/NVMe root is detected. On the Customizable flow the script prompts for size, sync interval and whether to enable the 90% auto-sync guard.",
"verifyLabel": "Verify and manage from the shell:",
"verifyCode": "# Service state and configured timers\nsystemctl status log2ram\nsystemctl list-timers log2ram*\n\n# Current ramdisk usage — /var/log IS the tmpfs itself\ndf -h /var/log\n\n# Force a sync now (tmpfs → disk); does NOT shrink the tmpfs\nlog2ram write\n\n# Trigger the auto-sync guard on demand (vacuum + sync when usage is high)\n/usr/local/bin/log2ram-check.sh\n\n# Current config: SIZE, mail settings, path\ncat /etc/log2ram.conf\n\n# ProxMenux-specific cron jobs\ncat /etc/cron.d/log2ram /etc/cron.d/log2ram-auto-sync\n\n# Recent Log2RAM activity\njournalctl -u log2ram -n 50 --no-pager"
},
"autoApplication": {
"title": "Automatic Application",
"body": "These optional features are applied only when specifically selected during the post-install process. Each feature can be individually chosen based on your specific needs and preferences."

View File

@@ -9,7 +9,7 @@
},
"intro": {
"title": "What this category covers",
"body": "Three storage-related optimizations: tune the <strong>ZFS ARC</strong> cache size to a sensible fraction of host RAM, install and schedule <strong>ZFS auto-snapshots</strong>, and remove throttles from <strong>vzdump</strong> so backups run at full speed. All three are independent — pick the ones that match your setup."
"body": "Three storage-related optimizations: tune the <strong>ZFS ARC</strong> cache size to a sensible fraction of host RAM, install and schedule <strong>ZFS auto-snapshots</strong>, and remove throttles from <strong>vzdump</strong> so backups run at full speed. All three are independent — pick the ones that match your setup. A fourth storage-adjacent optimization, <link>Log2RAM</link>, reduces SSD/NVMe wear by moving <code>/var/log</code> to a ramdisk — it lives on the Optional page because the ProxMenux Customizable menu groups it there."
},
"notTrackedTitle": "None of these are in the Uninstall menu",
"notTrackedBody": "Unlike most post-install optimizations, the three Storage options are <strong>not currently tracked</strong> in the Uninstall Optimizations flow. If you apply them and later want to revert, you'll have to do it by hand. The manual rollback commands are shown below each section.",
@@ -148,6 +148,11 @@
"href": "/docs/post-install/uninstall",
"tail": " — revert ARC / vzdump changes."
},
{
"label": "Log2RAM",
"href": "/docs/post-install/optional#log2ram",
"tail": " — reduces SSD/NVMe wear by ramdisk-backing /var/log; documented under Optional."
},
{
"label": "Customizable Post-Install",
"href": "/docs/post-install/customizable",

View File

@@ -168,7 +168,19 @@
"aboutContributors": "Contribuidores",
"aboutContributing": "Contribuir",
"aboutCodeOfConduct": "Código de conducta",
"externalRepositories": "Repositorios externos"
"externalRepositories": "Repositorios externos",
"backupRestore": "Backup & Restore",
"backupRestoreOverview": "Descripción general",
"backupRestoreHowItWorks": "Cómo funciona",
"backupRestoreDestinations": "Destinos",
"backupRestoreDestOverview": "Descripción general",
"backupRestoreDestLocal": "Archivo local",
"backupRestoreDestPbs": "Proxmox Backup Server",
"backupRestoreDestBorg": "Borg",
"backupRestoreCreating": "Crear copias",
"backupRestoreJobs": "Trabajos programados",
"backupRestoreRestoring": "Restauración",
"backupRestoreCrossKernel": "Restauración cross-kernel"
}
},
"hero": {
@@ -213,4 +225,4 @@
"ogTail": "Suscríbete vía RSS o vuelve a comprobarlo para nuevas versiones."
}
}
}
}

View File

@@ -0,0 +1,220 @@
{
"meta": {
"title": "Crear copias — flujo interactivo de copia | ProxMenux",
"description": "El flujo interactivo de copia en ProxMenux. Dos puntos de entrada (menú TUI de Scripts y UI Web del Monitor), tres destinos, dos modos de perfil, un paso común de staging y un diálogo de confirmación. Documenta la matriz de seis opciones, los perfiles Default y Custom, y qué ve el usuario entre seleccionar una copia y ver el archivo aterrizando en el destino.",
"ogTitle": "ProxMenux Backup — crear copias",
"ogDescription": "El flujo interactivo de copia con tres destinos, dos perfiles y un paso común de staging.",
"twitterTitle": "Crear copias | ProxMenux",
"twitterDescription": "Flujo interactivo de copia con tres destinos y dos modos de perfil."
},
"header": {
"title": "Crear copias",
"description": "El flujo interactivo de copia: elegir un destino y un perfil, revisar el resumen de confirmación, y ver el archivo aterrizando. Dos puntos de entrada comparten el mismo backend y producen archivos idénticos.",
"section": "Backup & Restore"
},
"intro": {
"title": "Dos puntos de entrada, funcionalidad idéntica",
"body": "El TUI de Scripts y la UI Web del Monitor exponen <strong>exactamente la misma funcionalidad</strong>. Cada copia — manual o programada — pasa por la misma matriz de elección (tres destinos × dos perfiles) e invoca la misma función backend por celda (<code>_bk_pbs</code>, <code>_bk_borg</code> o <code>_bk_local</code>). Los archivos producidos desde uno u otro punto de entrada son indistinguibles. Cuál usar es una cuestión de preferencia: el TUI es amigable por SSH y admite scripting; el Monitor ofrece click-y-elegir y convive con las vistas de notificaciones y de tail del log."
},
"entryPoints": {
"heading": "Los dos puntos de entrada",
"rows": [
{
"entry": "ProxMenux Scripts (TUI)",
"path": "menu → Utilities → Host Config Backup",
"detail": "Flujo basado en diálogos, amigable por SSH. El menú principal presenta las seis opciones directamente. Usa <code>backup_menu</code> en <code>backup_host.sh</code>."
},
{
"entry": "ProxMenux Monitor (UI Web)",
"path": "Pestaña Backups → Create backup",
"detail": "Flujo en estilo asistente. Las mismas seis opciones presentadas como formulario de dos pasos (destino → perfil). Se invocan las mismas funciones backend por la API Flask."
}
]
},
"modes": {
"heading": "Copias manuales vs programadas",
"body": "Las copias se pueden producir en dos modos: <strong>manuales</strong> (el flujo interactivo que documenta esta página — el usuario elige un destino y un perfil desde un menú y ve el archivo aterrizando) o <strong>programadas</strong> (un trabajo desatendido que se ejecuta en un timer estilo cron y aplica la retención configurada en el trabajo). Ambos modos soportan los mismos tres destinos y los mismos dos perfiles, y ambos están disponibles desde los dos puntos de entrada — el menú TUI de Scripts y la pestaña Backups del Monitor. Los trabajos programados usan las mismas funciones backend que el flujo manual a través de <code>run_scheduled_backup.sh</code>; los archivos producidos son indistinguibles.",
"seeAlso": "La página de trabajos programados cubre el flujo completo, incluyendo cómo crear un trabajo, adjuntarlo a un timer vzdump de PVE existente, y configurar los valores de retención.",
"monitorAlt": "Pestaña Backups del Monitor de ProxMenux mostrando el diálogo New scheduled backup con los campos de destino, perfil, horario y retención.",
"monitorCaption": "Copia programada — Monitor de ProxMenux. El mismo diálogo estilo asistente que crea una copia manual lleva los campos de horario y retención al final para la ruta desatendida."
},
"matrix": {
"heading": "La matriz de seis opciones",
"intro": "La elección determina qué backend se ejecuta y qué estrategia de selección de rutas se aplica. Consulta las páginas específicas de cada destino para los detalles de configuración de cada celda.",
"rows": [
{
"combo": "1",
"destination": "PBS",
"profile": "Default",
"action": "Sube el perfil por defecto más los extras persistentes a un repositorio PBS configurado."
},
{
"combo": "2",
"destination": "Borg",
"profile": "Default",
"action": "Crea un archivo con el perfil por defecto más los extras persistentes en el repositorio Borg seleccionado."
},
{
"combo": "3",
"destination": "Local",
"profile": "Default",
"action": "Escribe un archivo <code>.tar.zst</code> con el perfil por defecto más los extras persistentes en el destino local configurado."
},
{
"combo": "4",
"destination": "PBS",
"profile": "Custom",
"action": "Abre el path picker antes de la subida a PBS; el usuario marca rutas y puede añadir nuevas."
},
{
"combo": "5",
"destination": "Borg",
"profile": "Custom",
"action": "Abre el path picker antes de crear el archivo Borg."
},
{
"combo": "6",
"destination": "Local",
"profile": "Custom",
"action": "Abre el path picker antes de escribir el <code>.tar.zst</code> local."
}
]
},
"profiles": {
"heading": "Perfil Default vs Custom",
"defaultTitle": "Perfil Default",
"defaultBody": "El perfil por defecto es la lista curada de <code>hb_default_profile_paths</code> (documentada en <em>Cómo funciona</em> bajo <em>Categorías de rutas</em>) más cada entrada del fichero de extras persistentes <code>/usr/local/share/proxmenux/backup-extra-paths.txt</code>. El usuario confirma el destino y las opciones de cifrado y la copia continúa sin más selección de rutas.",
"customTitle": "Perfil Custom",
"customBody": "El perfil Custom abre un checklist mostrando cada ruta del perfil por defecto (sin marcar) y cada extra persistente (premarcado, prefijado con <code>[+]</code>). El usuario marca el conjunto para esa ejecución y puede pulsar <em>Add custom path</em> para añadir una nueva ruta absoluta. Cualquier ruta añadida en línea se persiste en <code>backup-extra-paths.txt</code> para que futuras copias la recojan automáticamente sin volver a añadirla. Quitar la marca a un extra persistente lo desmarca para esa ejecución pero no lo elimina del fichero — la eliminación es una acción <em>Manage custom paths</em> separada, fuera del flujo de copia.",
"customPickerAlt": "Checklist del perfil Custom mostrando las rutas del perfil por defecto (sin marcar) y los extras persistentes (premarcados con prefijo [+]), más botones para añadir una ruta nueva o confirmar la selección.",
"customPickerCaption": "Perfil Custom — el path picker. Las rutas del perfil por defecto aparecen sin marcar; los extras persistentes aparecen premarcados con prefijo [+]. El usuario marca el conjunto para esa ejecución.",
"manageCustomAlt": "Menú Manage custom paths mostrando la lista de extras persistentes y opciones para añadirlos, eliminarlos o editarlos.",
"manageCustomCaption": "Manage custom paths — el punto de entrada donde se añaden o eliminan los extras persistentes. Cada ruta listada aquí se incluye automáticamente en las copias en modo Default sin necesidad de abrir el picker Custom."
},
"commonPipeline": {
"heading": "Qué se ejecuta con independencia del destino",
"intro": "Después de resolver el perfil, cada backend ejecuta el mismo pipeline de staging antes de divergir a su propio camino de subida. <code>hb_prepare_staging</code> ensambla el árbol del archivo en <code>/tmp/proxmenux-DESTINATION-stage.XXXXXX</code> y pobla cada uno de los tres bloques.",
"steps": [
{
"step": "1",
"name": "Ensamblado del rootfs",
"detail": "Ejecuta <code>rsync -a</code> por cada ruta seleccionada hacia <code>staging_root/rootfs/</code>. Excluye subrutas volátiles (historial de bash, cachés, papelera) de <code>/root/</code>. Las rutas ausentes en el origen se registran en <code>metadata/missing_paths.txt</code> sin detener la copia."
},
{
"step": "2",
"name": "Generación del manifiesto",
"detail": "<code>build_manifest.sh</code> orquesta los seis colectores y escribe <code>manifest.json</code> en la raíz del staging. Si un colector falla, la sección afectada hace fallback a un default vacío documentado; el manifiesto sigue siendo válido."
},
{
"step": "3",
"name": "Inventario de paquetes",
"detail": "<code>apt-mark showmanual</code> se captura tal cual en <code>metadata/packages.manual.list</code>. El estado de componentes ya está dentro del rootfs restaurado (<code>components_status.json</code>) porque <code>/usr/local/share/proxmenux/</code> forma parte del perfil por defecto."
},
{
"step": "4",
"name": "Info de la ejecución",
"detail": "<code>metadata/run_info.env</code> registra la identidad de la ejecución de copia — hostname, timestamp, versión del kernel — usada por el chequeo de compatibilidad de la restauración para determinar la dirección cross-kernel."
},
{
"step": "5",
"name": "Notificación (start)",
"detail": "Se dispara <code>hb_notify_lifecycle \"start\"</code>. Si las notificaciones están configuradas en el Monitor, se emite un evento usuario-facing <em>Host backup started</em>. Silencioso si no hay canales configurados."
}
]
},
"included": {
"heading": "Qué entra y qué se excluye",
"intro": "Cada ruta del perfil resuelto (default + extras persistentes + selección en modo Custom) se copia con <code>rsync -aAXH --numeric-ids</code>. Una lista de exclusiones compartida aplica a cada ruta, y dos directorios llevan exclusiones específicas adicionales.",
"globalTitle": "Exclusiones globales (aplican a cada ruta)",
"globalItems": [
"<code>images/</code> — dumps de imágenes.",
"<code>dump/</code> — salidas de vzdump.",
"<code>tmp/</code> — ficheros temporales.",
"<code>*.log</code> — ficheros de log."
],
"rootTitle": "Exclusiones de <code>/root/</code>",
"rootBody": "<code>/root/</code> forma parte del perfil por defecto para que los scripts y config del usuario entren en el archivo. Se descartan los subpaths volátiles:",
"rootItems": [
"<code>.bash_history</code>",
"<code>.cache/</code>",
"<code>tmp/</code>",
"<code>.local/share/Trash/</code>"
],
"proxmenuxTitle": "Exclusiones de <code>/usr/local/share/proxmenux/</code>",
"proxmenuxBody": "Este directorio contiene sólo estado de usuario — <code>components_status.json</code>, preferencias, caché post-install. El código que el destino ya tendrá de su propia instalación de ProxMenux se excluye para que una restauración no sobrescriba los binarios actuales del destino con versiones más antiguas:",
"proxmenuxItems": [
"<code>restore-pending/</code>, <code>scripts/</code>, <code>web/</code>",
"<code>monitor-app/</code>, <code>monitor-app.*/</code>, <code>AppImage/</code>",
"<code>images/</code>, <code>json/</code>",
"<code>utils.sh</code>, <code>helpers_cache.json</code>",
"<code>ProxMenux-Monitor.AppImage*</code>, <code>install_proxmenux*.sh</code>"
],
"notInProfileTitle": "Rutas fuera del perfil",
"notInProfileBody": "Todo lo que no esté listado en <code>hb_default_profile_paths</code> y no se haya añadido como ruta custom o extra persistente no forma parte de la copia. Ejemplos notables:",
"notInProfileItems": [
"<strong>Discos de VMs y LXCs</strong> — los gestiona <code>vzdump</code>, no esta funcionalidad. Los ficheros de configuración de los invitados bajo <code>/etc/pve/nodes/*/qemu-server/*.conf</code> y <code>lxc/*.conf</code> sí se capturan (viven bajo <code>/etc/pve</code>) para que la restauración reproduzca el inventario; los discos se re-adjuntan desde una copia existente de vzdump/PBS.",
"<strong><code>/boot</code> y <code>/boot/efi</code></strong> — los binarios del kernel, el initramfs y la partición ESP UEFI los regenera el propio destino con <code>update-initramfs</code>, <code>update-grub</code> o <code>proxmox-boot-tool refresh</code> tras la restauración. El bootloader nunca se copia verbatim.",
"<strong>Filesystems runtime del kernel y sistema</strong> — <code>/proc</code>, <code>/sys</code>, <code>/dev</code> y <code>/run</code> son pseudo-filesystems que produce el kernel y udev; no se persisten en ningún sitio.",
"<strong>Binarios de paquetes bajo <code>/usr/bin</code>, <code>/usr/lib</code>, <code>/lib</code>, <code>/sbin</code></strong> — los reinstala el APT del destino a partir de <code>packages.manual.list</code>.",
"<strong><code>/var/log/</code>, <code>/var/tmp/</code>, <code>/var/cache/</code></strong> — estado runtime por host, no se restaura.",
"<strong><code>/home/USUARIO</code></strong> — no está en el perfil por defecto. Añadirlo como ruta custom cuando un sistema tenga directorios home de usuario que deban sobrevivir a una restauración."
],
"customPathsTitle": "Cómo se tratan las rutas custom",
"customPathsBody": "Una ruta custom añadida en línea en modo Custom o persistida en <code>backup-extra-paths.txt</code> pasa por el mismo pipeline de <code>rsync</code> que las rutas del perfil por defecto. Se aplican las exclusiones globales. Si la ruta custom está bajo <code>/root/</code> o <code>/usr/local/share/proxmenux/</code>, siguen aplicando las exclusiones específicas de arriba. Cada ruta archivada — default o custom — queda registrada en <code>metadata/paths_archived.txt</code>. Las rutas que no existen en el origen se registran en <code>metadata/missing_paths.txt</code> sin detener la copia."
},
"archiveStructure": {
"heading": "Estructura del archive",
"intro": "El directorio de staging que produce cada backend sigue el mismo layout con independencia del destino. El tarball, el <code>.pxar</code> de PBS o el archivo Borg almacenan este árbol verbatim.",
"tree": "backup-[timestamp]/\n├── manifest.json # estado estructurado del host (kernel_params, hardware, storage, guests, components, source_host)\n├── metadata/\n│ ├── packages.manual.list # salida de apt-mark showmanual\n│ ├── run_info.env # hostname, timestamp, versión del kernel\n│ ├── paths_archived.txt # lista exacta de rutas que llegaron a rootfs/\n│ └── missing_paths.txt # rutas del perfil ausentes en el origen\n└── rootfs/\n ├── etc/ # /etc/pve, /etc/network, /etc/ssh, /etc/apt, ...\n ├── root/ # /root sin subpaths volátiles\n ├── usr/local/ # /usr/local/bin, /usr/local/sbin, /usr/local/share/proxmenux (sólo estado)\n └── var/ # /var/lib/pve-cluster, /var/spool/cron/crontabs"
},
"confirmation": {
"heading": "Resumen de confirmación",
"body": "Antes de que el backend escriba nada en el destino, ProxMenux muestra un diálogo resumen con el destino, el backup ID o nombre del archivo, el estado del cifrado y la lista de rutas que se copian. Cancelar aquí aborta la copia limpiamente — el directorio de staging se elimina por el hook <code>trap</code> definido en la función backend y ningún dato parcial llega al destino."
},
"writing": {
"heading": "Escritura en el destino",
"intro": "Una vez el usuario confirma, cada backend ejecuta su propio paso de escritura. La mecánica está cubierta en las páginas de cada destino; la superficie compartida son el log, el sidecar y la notificación de finalización.",
"rows": [
{
"topic": "Fichero de log",
"detail": "Cada backend escribe su salida completa en <code>/tmp/proxmenux-DESTINATION-backup-YYYYMMDD_HHMMSS.log</code> y, en caso de fallo, ofrece abrirlo en un diálogo scrollable. La ruta al log se imprime en el resumen de finalización sólo cuando el fichero tiene contenido."
},
{
"topic": "Sidecar (sólo local)",
"detail": "<code>hb_write_archive_sidecar</code> deposita un <code>*.proxmenux.json</code> junto al archivo local para que el Monitor lo identifique como copia de host de ProxMenux incluso tras movimientos o renombrados."
},
{
"topic": "Notificación (complete/fail)",
"detail": "Se dispara <code>hb_notify_lifecycle \"complete\"</code> o <code>\"fail\"</code> con duración, tamaño del archivo y — en fallos — la última línea del log que parezca un error."
}
]
},
"finishedScreens": {
"heading": "Cómo se ve una copia finalizada",
"intro": "El mismo evento de finalización lo exponen los dos puntos de entrada. El TUI escribe un bloque resumen en el terminal; la pestaña Backups del Monitor muestra la ejecución en la lista de archivos con badges de tamaño, duración y estado.",
"scriptsAlt": "TUI de ProxMenux Scripts mostrando una copia de host finalizada — destino, backup ID, ruta del snapshot, tamaño de datos, duración y estado de cifrado.",
"scriptsCaption": "Copia finalizada — ProxMenux Scripts (TUI). El bloque de finalización imprime el destino, backup ID, nombre del snapshot o archivo resultante, tamaño de datos, duración y estado de cifrado.",
"monitorAlt": "Pestaña Backups del Monitor de ProxMenux mostrando una entrada de copia de host finalizada con tamaño, duración, badge del método y indicador de cifrado.",
"monitorCaption": "Copia finalizada — pestaña Backups del Monitor de ProxMenux. La nueva copia aparece en la lista de archivos con el badge del método del destino, tamaño, duración y — cuando aplica — el indicador de cifrado."
},
"whereNext": {
"heading": "A dónde seguir",
"items": [
{
"label": "Destinos",
"href": "/docs/backup-restore/destinations",
"tail": " — detalles de configuración para Local, PBS y Borg."
},
{
"label": "Trabajos programados",
"href": "/docs/backup-restore/scheduled-jobs",
"tail": " — ejecutar la misma copia desatendida en un horario en lugar de interactivamente."
},
{
"label": "Restauración",
"href": "/docs/backup-restore/restoring",
"tail": " — el flujo que consume lo que esta página produce."
}
]
}
}

View File

@@ -0,0 +1,94 @@
{
"meta": {
"title": "Restauración cross-kernel — detección de dirección, filtro de subconjunto seguro, hidratación | ProxMenux",
"description": "Cómo restaura ProxMenux una copia de host sobre un destino con un kernel de versión mayor distinta. Documenta cómo se detecta la dirección del salto, el filtro de subconjunto seguro que salta rutas críticas del arranque cuando el destino corre un kernel más reciente que la copia, y la hidratación independiente del kernel de cuatro fases que reaplica la configuración del usuario como IOMMU, IDs VFIO y tokens custom del cmdline sin copiar verbatim los ficheros ligados al kernel.",
"ogTitle": "ProxMenux Backup — restauración cross-kernel e hidratación",
"ogDescription": "Restauración cross-kernel direccional con filtro de subconjunto seguro e hidratación independiente del kernel.",
"twitterTitle": "Restauración cross-kernel | ProxMenux",
"twitterDescription": "Cómo maneja ProxMenux una restauración cuando el kernel del destino difiere del de la copia."
},
"header": {
"title": "Restauración cross-kernel",
"description": "Cómo maneja ProxMenux una restauración cuando el kernel del host de destino es distinto al kernel que había en el momento de la copia — especialmente cuando el destino ejecuta un kernel más reciente. Documenta cómo se detecta la diferencia, cómo se filtran las rutas críticas del arranque que podrían romper el destino, y cómo se reaplica la configuración propia del usuario sin copiar verbatim los ficheros ligados al kernel.",
"section": "Backup & Restore"
},
"intro": {
"title": "Cada salto de kernel se maneja de forma distinta",
"body": "Cuando la restauración detecta que la copia y el destino tienen versiones mayores distintas de kernel, el flujo se ramifica en función de la dirección del salto — si la copia es más antigua o más reciente que el destino — porque los dos casos tienen modos de fallo opuestos. Las copias más recientes que el destino se restauran limpiamente tal cual (verificado empíricamente en múltiples pruebas de banco). Las copias más antiguas que el destino necesitan un filtro para evitar romper el arranque del destino con configuración escrita para un kernel que desde entonces ha cambiado."
},
"directionCheck": {
"heading": "La comprobación de dirección",
"intro": "Durante la comprobación de compatibilidad, <code>hb_compat_check</code> compara el kernel registrado en el manifiesto de la copia contra el kernel actual del destino (<code>uname -r</code>) y clasifica la restauración en uno de tres casos, guardado en la variable interna <code>HB_COMPAT_KERNEL_DIRECTION</code>:",
"rows": [
{ "direction": "same", "condition": "La versión mayor del kernel coincide entre la copia y el destino.", "behavior": "El flujo de restauración completo corre sin cambios. Sin filtro adicional, sin hidratación, sin aviso especial en la interfaz." },
{ "direction": "bk_newer", "condition": "El kernel de la copia es más RECIENTE que el del destino (por ejemplo: la copia se hizo con kernel 7.0 y el destino corre kernel 6.17).", "behavior": "El flujo de restauración completo corre sin cambios, exactamente igual que en <code>same</code>. No se aplica ningún filtro. Verificado empíricamente: los controladores se reinstalan contra el kernel del destino, la configuración IOMMU se aplica limpia, las VMs con passthrough GPU arrancan sin problemas." },
{ "direction": "bk_older", "condition": "El kernel de la copia es más ANTIGUO que el del destino (por ejemplo: la copia se hizo con kernel 6.17 y el destino corre kernel 7.0).", "behavior": "Se activan el filtro de subconjunto seguro y la hidratación de cuatro fases descritos más abajo. La restauración procede — el destino reproduce el origen, pero los ficheros críticos del arranque no se copian verbatim." }
]
},
"whyBkNewerIsSafe": {
"heading": "Por qué una copia con kernel más reciente que el destino se restaura sin cambios",
"body": "Cuando la restauración corre contra un destino con un kernel <em>más antiguo</em> que el registrado en la copia, todos los mecanismos de los que depende la restauración son independientes de la versión del kernel. Los instaladores de controladores de GPU y otros dispositivos PCI detectan el kernel en ejecución con <code>uname -r</code> y compilan DKMS contra lo que tenga el destino. La instalación de paquetes por APT trae binarios construidos para la distribución del destino. Los tokens IOMMU del cmdline como <code>intel_iommu=on</code> son estables entre versiones mayores de kernel. La copia lleva rutas escritas bajo un kernel más reciente, pero esas rutas (blacklists de módulos, defaults de GRUB, configuración de initramfs) siguen siendo sintaxis válida en el más antiguo — los kernels ignoran los tokens que no reconocen en lugar de fallar. Este caso es equivalente en la práctica a una restauración con el mismo kernel, y ProxMenux lo trata como tal."
},
"safeSubsetFilter": {
"heading": "El filtro de subconjunto seguro (sólo cuando el kernel del destino es más reciente)",
"intro": "Cuando el kernel del destino es más reciente que el de la copia, la comprobación de compatibilidad añade 16 rutas críticas del arranque de <code>hb_unsafe_paths_cross_version</code> a <code>RS_SKIP_PATHS</code>. Estas rutas se excluyen de la restauración porque escribir una versión suya de un kernel más antiguo sobre un destino que corre uno más reciente ha causado kernel panics en pruebas de banco. Las rutas cubren cuatro categorías:",
"categoryRows": [
{ "category": "Bootloader", "paths": "<code>/etc/default/grub</code>, <code>/etc/kernel</code>", "reason": "Defaults de GRUB atados al orden previo de kernels, y estado de proxmox-boot-tool (cmdline, UUIDs de ESP, hooks) que referencia rutas e identificadores de la instalación más antigua." },
{ "category": "Módulos del kernel y artefactos de arranque", "paths": "<code>/etc/modules-load.d</code>, <code>/etc/modprobe.d</code>, <code>/etc/initramfs-tools</code>", "reason": "Listas de autocarga que pueden referenciar módulos renombrados entre majors del kernel, opciones de módulo que pueden no aplicar, hooks de initramfs escritos para el kernel más antiguo." },
{ "category": "Stack de almacenamiento e identidad de filesystem", "paths": "<code>/etc/fstab</code>, <code>/etc/multipath</code>, <code>/etc/iscsi</code>, <code>/etc/udev/rules.d</code>, <code>/etc/zfs</code>", "reason": "UUIDs que pueden no existir en esta instalación, drivers de multipath que cambian entre kernels, parámetros iSCSI que evolucionan, reglas udev que pueden atarse a subsistemas inexistentes, estado ZFS (<code>zpool.cache</code> + <code>hostid</code>) que puede bloquear el pool como si no perteneciera al host." },
{ "category": "Fuentes APT", "paths": "<code>/etc/apt</code>", "reason": "Las suites de fuentes APT pueden disparar un downgrade de paquetes críticos en la próxima actualización." },
{ "category": "systemd", "paths": "<code>/etc/systemd/system</code>, <code>/etc/systemd/journald.conf</code>, <code>/etc/systemd/logind.conf</code>, <code>/etc/systemd/system.conf</code>, <code>/etc/systemd/user.conf</code>", "reason": "Overrides de unit y .wants ligados al major de systemd más antiguo; claves de configuración que pueden no parsearse en un systemd más reciente." }
],
"outroBody": "El filtro corre ANTES del diálogo de confirmación para que el usuario vea la lista exacta de rutas que se saltarán, categorizadas por motivo. La restauración procede igualmente — todo lo demás (VMs, LXCs, red, /etc/pve, usuarios, cron, estado de ProxMenux, paquetes, drivers, /root) se restaura con normalidad."
},
"hydration": {
"heading": "Hidratación independiente del kernel",
"intro": "El filtro de subconjunto seguro por sí solo dejaría al destino sin la configuración que el usuario había puesto dentro de esos ficheros críticos del arranque: cmdline IOMMU para passthrough GPU, IDs de dispositivo VFIO, <code>GRUB_TIMEOUT</code> custom, blacklists de nvidia. La pasada de hidratación reaplica esas piezas de forma independiente de la versión del kernel. Corren cuatro fases cuando el kernel del destino es más reciente que el de la copia, cada una aditiva (nunca sobrescribe un valor que el destino ya lleva) e idempotente (correr dos veces es un no-op).",
"phaseRows": [
{ "phase": "1a — Ruta GRUB", "detail": "Para hosts que usan GRUB (instalaciones ext4/lvm). <code>_rs_hyd_grub</code> mergea cada token de <code>manifest.kernel_params.cmdline_extra</code> de la copia en el <code>GRUB_CMDLINE_LINUX_DEFAULT</code> vivo del destino, saltando los tokens cuya clave el destino ya lleva. Después mergea claves whitelisted <code>GRUB_*</code> (<code>GRUB_TIMEOUT</code>, <code>GRUB_TIMEOUT_STYLE</code>, <code>GRUB_DEFAULT</code>, <code>GRUB_TERMINAL</code>, <code>GRUB_DISABLE_OS_PROBER</code>, <code>GRUB_SERIAL_COMMAND</code>, <code>GRUB_GFXMODE</code>, <code>GRUB_GFXPAYLOAD_LINUX</code>) del <code>/etc/default/grub</code> de la copia si difieren de las del destino." },
{ "phase": "1b — Ruta systemd-boot / ZFS", "detail": "Para hosts que usan systemd-boot (típicamente ZFS-on-root). <code>_rs_hyd_kernel_cmdline</code> mergea los tokens del usuario de <code>cmdline_extra</code> en el <code>/etc/kernel/cmdline</code> del destino, manteniendo intacto el boilerplate propio del destino: <code>root=</code>, <code>boot=</code> y <code>rootflags=</code>." },
{ "phase": "2 — Merge en /etc/modules", "detail": "<code>_rs_hyd_modules</code> añade los módulos de <code>manifest.kernel_params.modules_loaded_at_boot</code> que estén en la whitelist (<code>vfio</code>, <code>vfio_pci</code>, <code>vfio_iommu_type1</code>, <code>vfio_virqfd</code>, <code>kvm</code>, <code>kvm_intel</code>, <code>kvm_amd</code>, <code>nvidia</code>, <code>nvidia_drm</code>, <code>nvidia_modeset</code>, <code>nvidia_uvm</code>, <code>i915</code>, <code>xe</code>) Y que aún no estén presentes en <code>/etc/modules</code> del destino." },
{ "phase": "3 — Copia de ficheros whitelisted", "detail": "<code>_rs_hyd_files</code> copia ficheros escritos por el usuario del staging rootfs al destino en vivo cuando el contenido difiere. La whitelist cubre ficheros VFIO/nvidia/blacklist bajo <code>/etc/modprobe.d</code>, <code>/etc/modules-load.d</code>, y la regla VFIO bind + reglas udev de nvidia de ProxMenux bajo <code>/etc/udev/rules.d</code>. Los ficheros propiedad de la distro (<code>pve-blacklist.conf</code>, <code>mdadm.conf</code>, <code>nvme.conf</code>) se excluyen intencionadamente — sus contenidos evolucionan entre releases." },
{ "phase": "4 — Forzar reflows post-arranque", "detail": "Las cuatro fases escriben directamente en el destino vivo FUERA del pipeline normal de restauración. Para que los tokens/módulos/ficheros mergeados tengan efecto en el siguiente arranque, <code>HB_HYDRATION_APPLIED=1</code> se propaga a través de <code>plan.env</code> a <code>apply_pending_restore.sh</code>, que fuerza <code>NEEDS_INITRAMFS=1</code> y <code>NEEDS_GRUB=1</code> con independencia de lo que hubiera en la lista de apply. El dispatcher post-arranque después regenera el initramfs y refresca el bootloader." }
]
},
"planCommit": {
"heading": "Plan vs commit — el usuario ve un preview antes",
"body": "La hidratación corre en dos modos. Antes del diálogo de confirmación, ProxMenux ejecuta <code>_rs_apply_bk_older_hydration</code> en modo <code>plan</code>: calcula exactamente lo que se mergearía, rellena <code>RS_HYDRATION_SUMMARY</code> con un bloque verde que lista cada acción, y retorna sin escribir nada. El diálogo de confirmación muestra ese bloque verde junto a la lista ámbar de rutas saltadas por el subconjunto seguro, para que el usuario vea POR ADELANTADO qué se reaplicará automáticamente. Tras la confirmación del usuario, ProxMenux vuelve a ejecutar el mismo helper en modo <code>commit</code> — mismas fases, misma lógica, pero esta vez cada fase escribe en el destino vivo. Cancelar el diálogo de confirmación deja el destino intacto."
},
"flowDiagram": {
"heading": "El flujo cuando el kernel del destino es más reciente que el de la copia",
"intro": "Los pasos específicos que se añaden cuando el kernel del destino es más reciente se insertan dentro del flujo normal de restauración. Todo lo demás — hot apply, prepare pending, instalación de paquetes, dispatcher post-arranque — corre idéntico a una restauración con el mismo kernel.",
"diagram": " ┌────────────────────────────────────────────────────────────┐\n │ hb_compat_check │\n │ HB_COMPAT_KERNEL_DIRECTION = bk_older │\n └───────────────────────────┬────────────────────────────────┘\n │\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ Añade 16 rutas críticas del arranque a RS_SKIP_PATHS │\n │ /etc/default/grub, /etc/kernel, /etc/modules-load.d, ... │\n └───────────────────────────┬────────────────────────────────┘\n │\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ _rs_apply_bk_older_hydration \"plan\" │\n │ Calcula qué se mergearía │\n │ Rellena RS_HYDRATION_SUMMARY (bloque verde) │\n │ Sin escrituras │\n └───────────────────────────┬────────────────────────────────┘\n │\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ Diálogo de confirmación │\n │ Ámbar: rutas saltadas por el filtro de subconjunto seguro │\n │ Verde: tokens/ficheros reaplicados por la hidratación │\n │ El usuario acepta o cancela │\n └───────────────────────────┬────────────────────────────────┘\n │ (aceptado)\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ _rs_apply_bk_older_hydration \"commit\" │\n │ Fase 1a/1b: mergea tokens del cmdline + claves GRUB │\n │ Fase 2: añade módulos a /etc/modules │\n │ Fase 3: copia ficheros whitelisted vfio/nvidia │\n │ Fija HB_HYDRATION_APPLIED=1 │\n └───────────────────────────┬────────────────────────────────┘\n │\n ▼\n ┌────────────────────────────────────────────────────────────┐\n │ El resto de la restauración corre normalmente │\n │ _rs_apply hot (salta RS_SKIP_PATHS) │\n │ _rs_prepare_pending_restore (escribe plan.env con │\n │ HB_HYDRATION_APPLIED=1) │\n │ packages.manual.list install │\n │ Reinicio │\n │ apply_pending_restore.sh (fuerza NEEDS_INITRAMFS=1, │\n │ NEEDS_GRUB=1 por el flag de hidratación) │\n │ apply_cluster_postboot.sh │\n │ update-initramfs -u -k all │\n │ update-grub / proxmox-boot-tool refresh │\n │ component --auto-reinstall │\n └────────────────────────────────────────────────────────────┘"
},
"concreteExamples": {
"heading": "Ejemplos concretos",
"intro": "La pasada de hidratación no es abstracta — produce resultados observables y correctos en escenarios habituales. Dos ejemplos que la hidratación resuelve automáticamente:",
"rows": [
{ "scenario": "GPU passthrough (VFIO)", "detail": "El origen tenía <code>intel_iommu=on iommu=pt</code> en el cmdline, <code>vfio</code>/<code>vfio_pci</code>/<code>vfio_iommu_type1</code> en <code>/etc/modules</code>, un <code>/etc/modprobe.d/vfio.conf</code> con <code>options vfio-pci ids=10de:2216</code>, y un <code>/etc/modprobe.d/blacklist-nvidia.conf</code>. La hidratación mergea los tokens del cmdline en el GRUB o kernel cmdline del destino, añade los módulos vfio a <code>/etc/modules</code>, y copia los dos ficheros modprobe escritos por el usuario. En el siguiente arranque, IOMMU está activo, los módulos VFIO cargan, la GPU queda ligada a vfio-pci y la VM arranca con el passthrough funcionando." },
{ "scenario": "Defaults custom de GRUB", "detail": "El origen tenía <code>GRUB_TIMEOUT=1</code> y <code>GRUB_DISABLE_OS_PROBER=true</code>. La hidratación lee ambas claves del <code>/etc/default/grub</code> de la copia, ve que difieren de los defaults de la instalación fresca, y reescribe esas dos líneas en el fichero del destino (dejando todo lo demás, incluido <code>GRUB_DISTRIBUTOR</code>, intacto)." }
]
},
"callout": {
"warningTitle": "Qué no reaplica la hidratación cuando el kernel del destino es más reciente",
"warningBody": "La hidratación reaplica sólo la configuración que ProxMenux sabe que es segura entre versiones del kernel: tokens IOMMU, IDs VFIO, claves whitelisted de GRUB y módulos de una lista fija (<code>vfio*</code>, <code>nvidia*</code>, <code>i915</code>, <code>xe</code>, <code>kvm*</code>). Todo lo que quede fuera de ese conjunto — hooks custom de initramfs bajo <code>/etc/initramfs-tools/hooks/</code>, ficheros no whitelisted bajo <code>/etc/modprobe.d/</code>, overrides de unit de systemd escritos por el usuario — permanece excluido. El motivo es concreto: esos ficheros pueden invocar interfaces internas del kernel (APIs de módulos, layout de <code>/sys</code>, hooks de <code>udev</code>) que cambian entre versiones mayores, y aplicarlos verbatim sobre el kernel más reciente puede impedir que el destino arranque. Cuando se necesita reproducción exacta de la cadena de arranque, la restauración debe correr sobre un host con la misma versión mayor de kernel que la copia."
},
"codeReference": {
"heading": "Dónde viven los mecanismos",
"intro": "Para desarrolladores que quieran trazar o extender el comportamiento cross-kernel:",
"rows": [
{ "component": "Detección de dirección", "location": "<code>hb_compat_check</code> en <code>lib_host_backup_common.sh</code>. Fija <code>HB_COMPAT_KERNEL_DIRECTION</code>." },
{ "component": "Lista de rutas del subconjunto seguro", "location": "<code>hb_unsafe_paths_cross_version</code> en <code>lib_host_backup_common.sh</code>. Emite líneas <code>path\\tmotivo</code> usadas tanto por el filtro CLI como por el endpoint Web <code>/api/host-backups/restore/prepare</code>." },
{ "component": "Fases de hidratación", "location": "<code>_rs_hyd_grub</code>, <code>_rs_hyd_kernel_cmdline</code>, <code>_rs_hyd_modules</code>, <code>_rs_hyd_files</code> en <code>backup_host.sh</code>. Orquestados por <code>_rs_apply_bk_older_hydration</code>." },
{ "component": "Forzado de reflow post-arranque", "location": "<code>apply_pending_restore.sh</code> lee <code>HB_HYDRATION_APPLIED</code> de <code>plan.env</code> y fuerza <code>NEEDS_INITRAMFS=1</code>/<code>NEEDS_GRUB=1</code>." },
{ "component": "Preview Web", "location": "<code>/api/host-backups/restore/prepare</code> en <code>flask_server.py</code>. Fuentea la librería helper, ejecuta <code>_rs_apply_bk_older_hydration</code> en modo plan, devuelve las acciones al modal Web." }
]
},
"whereNext": {
"heading": "A dónde seguir",
"items": [
{ "label": "Restaurar", "href": "/docs/backup-restore/restoring", "tail": " — el pipeline completo de restauración en el que se enchufan los mecanismos de esta página." },
{ "label": "Cómo funciona", "href": "/docs/backup-restore/how-it-works", "tail": " — el manifiesto y los colectores que producen el bloque <code>kernel_params</code> del que lee la hidratación." }
]
}
}

View File

@@ -0,0 +1,234 @@
{
"meta": {
"title": "Destino Borg — tipos de repositorio, autenticación SSH, cifrado | ProxMenux",
"description": "El destino Borg escribe las copias de host de ProxMenux en un repositorio Borg — local, en un disco externo montado, o en un servidor remoto accedido por SSH. Cubre la cadena de resolución del binario borg, las cuatro estrategias de clave SSH, el cifrado repokey, la configuración de destinos guardados y la retención por trabajo programado.",
"ogTitle": "ProxMenux Backup — destino Borg",
"ogDescription": "Cómo escribe ProxMenux las copias de host en repositorios Borg, con estrategias de autenticación SSH y cifrado repokey.",
"twitterTitle": "Destino Borg de copia | ProxMenux",
"twitterDescription": "Repositorios Borg local, USB y servidos por SSH para copias del host."
},
"header": {
"title": "Borg",
"description": "El destino Borg escribe las copias del host en un repositorio Borg. Se soportan tres tipos de repositorio: ruta local de sistema de ficheros, disco externo montado o servidor remoto vía SSH. Deduplicación a nivel de chunk entre todos los archivos del repositorio y cifrado opcional repokey.",
"section": "Backup & Restore"
},
"aboutBorg": {
"heading": "Qué es Borg",
"body": "Borg (también escrito BorgBackup) es una herramienta de copia de seguridad open-source con deduplicación, mantenida por la comunidad Borg Backup. Almacena cada archivo como un conjunto de chunks de longitud variable dentro de un repositorio; los chunks se comparten entre archivos, por lo que volver a copiar datos que no han cambiado tiene un coste de almacenamiento prácticamente nulo. Borg no está atado a Proxmox — es una herramienta de copia de uso general utilizada en muchos entornos. ProxMenux la usa como uno de los tres destinos para copias del host; cada mecanismo específico de Borg descrito en esta página (tipos de repositorio, borg-serve por SSH, cifrado repokey, prune) es comportamiento estándar de Borg."
},
"intro": {
"title": "Deduplicación por chunks con repositorios locales o servidos por SSH",
"body": "Un repositorio Borg almacena chunks que se comparten entre cada archivo que contiene, por lo que volver a copiar un fichero que no ha cambiado no transfiere ni almacena nada nuevo. ProxMenux invoca <code>borg create</code> contra el repositorio en el momento de la copia y <code>borg extract</code> en la restauración. El repositorio puede vivir en el mismo sistema de ficheros que el origen, en un disco externo montado, o en un host remoto accedido por SSH."
},
"binarySourcing": {
"heading": "El binario borg",
"intro": "Borg no es una dependencia base del instalador de ProxMenux. Cuando se ejecuta una copia, <code>hb_ensure_borg</code> resuelve el binario desde cuatro fuentes por orden y devuelve la primera que funciona:",
"rows": [
{
"priority": "1",
"source": "<code>borg</code> del sistema",
"detail": "Si el host ya tiene <code>borg</code> instalado vía APT (<code>which borg</code> resuelve), se usa ese binario."
},
{
"priority": "2",
"source": "Caché del state-dir",
"detail": "<code>/usr/local/share/proxmenux/borg</code> — conservado de una descarga previa desde GitHub en este host."
},
{
"priority": "3",
"source": "Bundle del Monitor AppImage",
"detail": "<code>/usr/local/share/proxmenux/monitor-app/usr/bin/borg</code> — el AppImage incluye un binario borg-linux64 firmado. Este es el camino offline-safe: un host sin internet sigue teniendo un <code>borg</code> operativo."
},
{
"priority": "4",
"source": "Descarga desde GitHub",
"detail": "<code>wget</code> contra la URL fijada de <code>borg-linux64</code> bajo <code>github.com/borgbackup/borg/releases/</code>, verificado contra un SHA-256 constante en <code>lib_host_backup_common.sh</code> (<code>HB_BORG_LINUX64_SHA256</code>). Si el checksum no coincide, el binario se descarta y la copia se aborta. El fichero descargado se cachea en el state-dir para que las copias posteriores usen el camino 2."
}
]
},
"repoTypes": {
"heading": "Tipos de repositorio",
"intro": "El tipo de repositorio se elige al añadir un destino. Cada tipo se resuelve a una URL de repositorio que Borg entiende.",
"rows": [
{
"type": "remote",
"url": "ssh://USER@HOST/RPATH",
"detail": "El repositorio vive en un servidor remoto que ejecuta <code>borg serve</code>. Requiere una conexión SSH a ese servidor."
},
{
"type": "usb",
"url": "/mnt/MOUNTPOINT/borgbackup",
"detail": "El repositorio vive en un disco externo montado (típicamente USB). El punto de montaje se resuelve vía <code>hb_prompt_mounted_path</code>, que detecta, monta o formatea particiones USB según sea necesario."
},
{
"type": "local",
"url": "/backup/borgbackup (cualquier ruta absoluta)",
"detail": "El repositorio vive en un directorio local. Sólo tiene sentido cuando el directorio está en un disco físico distinto — un repositorio en el mismo disco que el origen protege contra error humano pero no contra fallo de disco."
}
]
},
"serverSetup": {
"heading": "Preparar el servidor Borg (lado servidor)",
"intro": "El tipo de repositorio <code>remote</code> espera un servidor Borg operativo accesible por SSH. ProxMenux no bootstrapea el servidor por sí mismo — sólo autoriza una clave contra una cuenta existente en él. Esta sección documenta lo que necesita el servidor antes de que ProxMenux pueda conectarse.",
"hostChoicesTitle": "Dónde puede vivir el servidor",
"hostChoicesBody": "Cualquier host Linux con acceso SSH cumple. Setups habituales:",
"hostChoicesItems": [
"Un NAS dedicado o caja de backup (Debian, Ubuntu, TrueNAS SCALE con shell).",
"Un contenedor LXC dentro de un nodo Proxmox. Huella pequeña, aislado del host que ejecuta las copias.",
"Otro host Proxmox en la misma LAN, o una VM en cualquier lugar alcanzable por SSH."
],
"lxcWarningTitle": "LXC como servidor Borg",
"lxcWarningBody": "Si el servidor Borg se ejecuta dentro de un LXC, el contenedor debe tener una cuenta de usuario con contraseña.",
"requirementsTitle": "Requisitos en el servidor",
"requirementsRows": [
{
"requirement": "binario borg en <code>/usr/bin/borg</code>",
"detail": "La línea <code>command=\"/usr/bin/borg serve ...\"</code> que ProxMenux escribe en <code>authorized_keys</code> hardcodea esa ruta. Instalar vía APT (<code>apt install borgbackup</code>) lo deja ahí. Un binario independiente debe symlinkarse a <code>/usr/bin/borg</code>."
},
{
"requirement": "Una cuenta de usuario dedicada (típicamente <code>borg</code>)",
"detail": "Es dueña del directorio del repositorio y recibe las conexiones SSH entrantes. No necesita sudo ni acceso a shell — la línea de authorized_keys desactiva las shells interactivas de todos modos."
},
{
"requirement": "Un directorio de repositorio escribible",
"detail": "La ruta que el usuario introduce en ProxMenux (por ejemplo <code>/backup/borgbackup</code>) debe existir en el servidor y ser propiedad del usuario borg."
},
{
"requirement": "Demonio SSH aceptando al usuario borg",
"detail": "<code>PubkeyAuthentication yes</code> (por defecto). La autenticación por contraseña sólo hace falta para el flujo puntual <em>generate-auto</em> — una vez instalada la clave, el servidor puede desactivar la autenticación por contraseña por completo."
}
],
"minimalSetupTitle": "Setup mínimo del servidor",
"minimalSetupBody": "En un servidor Borg Debian o Ubuntu, un baseline funcional son cuatro comandos como root:",
"minimalSetupCmd": "apt install borgbackup\nuseradd -m -d /home/borg -s /bin/bash borg\nmkdir -p /backup/borgbackup\nchown borg:borg /backup/borgbackup",
"minimalSetupNote": "Tras esto, el modo <code>generate-auto</code> de ProxMenux puede conectarse usando la contraseña del usuario borg una vez, instalar su propia clave SSH, y cada copia posterior usa esa clave. No hace falta más configuración en el servidor — la clave se restringe a sí misma a <code>borg serve</code> sobre esa ruta."
},
"sshAuth": {
"heading": "Autenticación SSH (lado cliente)",
"intro": "Los repositorios Borg remotos se acceden vía SSH. La conexión va desde el host ProxMenux a una cuenta de usuario en el servidor Borg que ejecuta <code>borg serve</code>. Ese usuario se llama típicamente <code>borg</code>, NO el usuario admin/root del servidor — la línea de comando de borg-serve bloquea la conexión a esa ruta concreta del repositorio (ver las estrategias de clave más abajo).",
"strategiesTitle": "Las cuatro estrategias de clave",
"strategiesIntro": "Al añadir un destino remoto, ProxMenux pregunta por el usuario SSH, host y ruta remota, y a continuación pregunta cómo autenticar. Cuatro modos:",
"strategyRows": [
{
"mode": "generate-auto",
"label": "Recomendado",
"detail": "ProxMenux genera una nueva keypair ed25519 en <code>~/.ssh/borg_proxmenux_HOST_ed25519</code>, y a continuación usa <code>sshpass</code> para hacer login UNA VEZ en el servidor con la contraseña de admin y añadir la clave pública a <code>~borg/.ssh/authorized_keys</code>. La contraseña de admin se usa sólo para esa única llamada — nunca se almacena."
},
{
"mode": "generate-manual",
"label": "Sin contraseña admin en este host",
"detail": "ProxMenux genera la keypair como arriba pero muestra la línea completa de <code>authorized_keys</code> para que el usuario la pegue manualmente en el servidor. La contraseña de admin nunca sale del host ProxMenux porque nunca se pregunta."
},
{
"mode": "generate-pct",
"label": "El servidor Borg es un LXC de PVE",
"detail": "El servidor Borg se ejecuta dentro de un LXC en un nodo PVE. ProxMenux autoriza la clave vía <code>pct exec</code> desde el host PVE — root en el host PVE escribe en el <code>~borg/.ssh/authorized_keys</code> del LXC sin necesidad de hacer SSH al LXC."
},
{
"mode": "existing",
"label": "Usar una clave existente",
"detail": "ProxMenux escanea <code>/root/.ssh/</code> y <code>$HOME/.ssh/</code> buscando claves privadas ed25519/RSA parseables y las lista. El usuario elige una o navega manualmente a una ruta no estándar."
},
{
"mode": "none",
"label": "Configuración SSH por defecto",
"detail": "Sin clave personalizada — Borg usa la configuración SSH por defecto del host (típicamente <code>~/.ssh/id_rsa</code> o un agente SSH)."
}
],
"restrictTitle": "La línea authorized_keys",
"restrictBody": "Para cada clave generada, la línea de <code>authorized_keys</code> que ProxMenux escribe en el servidor bloquea la clave a una única invocación de borg-serve contra la ruta configurada del repositorio:",
"restrictLine": "command=\"/usr/bin/borg serve --restrict-to-path RPATH\",restrict PUBKEY",
"restrictNote": "El <code>command=</code> fuerza que cada sesión SSH que use esta clave ejecute sólo ese comando borg-serve; <code>restrict</code> desactiva port forwarding, agent forwarding, X11 forwarding y asignación de PTY. La clave no se puede usar para abrir una shell interactiva en el servidor ni para acceder a ninguna otra ruta de repositorio, aunque la cuenta tenga privilegios más amplios."
},
"savedTargets": {
"heading": "Destinos guardados",
"intro": "Un destino guardado persiste la configuración del repositorio bajo un nombre amigable para no tener que reintroducir los detalles. Layout de almacenamiento en el directorio de estado de ProxMenux:",
"rows": [
{
"file": "borg-targets.txt",
"content": "Una línea por destino: <code>NAME|REPO|SSH_KEY_PATH|ENCRYPT_MODE</code>. La lee <code>hb_collect_borg_configs</code> para poblar el menú de selección de destino."
},
{
"file": "borg-pass-NAME.txt",
"content": "Passphrase del destino con el NAME dado arriba (<code>chmod 600</code>). Sólo está presente si el usuario eligió cifrado repokey."
}
],
"outro": "Guardar es opcional — el usuario puede rechazar el prompt de guardado para una copia puntual que no deje credenciales en el host."
},
"encryption": {
"heading": "Cifrado",
"body": "Los repositorios se inicializan con un modo de cifrado vía <code>hb_borg_init_if_needed</code>: <code>borg repo-create -e MODE</code> en versiones modernas, o el legacy <code>borg init --encryption=MODE</code>. ProxMenux expone dos modos: <code>repokey</code> (por defecto) y <code>none</code>. En modo <code>repokey</code>, Borg almacena la clave de cifrado dentro del propio repositorio; el acceso requiere una passphrase, que ProxMenux pregunta dos veces con validación de coincidencia y guarda en <code>borg-pass-NAME.txt</code>. Un diálogo de reconocimiento obligatorio se muestra tras guardar la passphrase: la passphrase es la única manera de acceder a los archivos cifrados, y perderla hace irrecuperable todo archivo del repositorio."
},
"runtimeEnv": {
"heading": "Entorno de ejecución",
"intro": "ProxMenux exporta las siguientes variables de entorno antes de invocar <code>borg</code>. Configuran la conexión y desbloquean el repositorio sin embeber secretos en la línea de comandos.",
"rows": [
{
"var": "BORG_RSH",
"value": "ssh -i SSH_KEY_PATH -o StrictHostKeyChecking=accept-new",
"purpose": "El comando de shell remoto que Borg usa para repositorios servidos por SSH. Se fija sólo cuando se seleccionó una clave personalizada; en caso contrario queda sin definir para que Borg use la configuración SSH por defecto."
},
{
"var": "BORG_PASSPHRASE",
"value": "(passphrase de borg-pass-NAME.txt)",
"purpose": "Desbloquea la repokey. Se fija sólo cuando el destino usa cifrado <code>repokey</code>. Nunca aparece en la lista de argumentos del proceso."
},
{
"var": "BORG_ENCRYPT_MODE",
"value": "repokey | none",
"purpose": "Lo usa <code>hb_borg_init_if_needed</code> al inicializar un repositorio que aún no existe. <code>borg create</code> lo ignora en repositorios existentes."
},
{
"var": "BORG_RELOCATED_REPO_ACCESS_IS_OK",
"value": "yes",
"purpose": "Suprime el prompt interactivo que Borg lanza cuando la URL del repositorio difiere de la URL desde la que se alcanzó originalmente (habitual tras un renombrado del punto de montaje o un cambio de dirección del host SSH)."
},
{
"var": "BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK",
"value": "yes",
"purpose": "Suprime el prompt interactivo que Borg lanza la primera vez que se accede a un repositorio sin cifrar desde un cliente nuevo."
}
]
},
"archiveFormat": {
"heading": "Nombrado de archivos y retención",
"intro": "Cada copia crea un archivo nuevo dentro del repositorio.",
"namePattern": "hostcfg-HOSTNAME-YYYYMMDD_HHMMSS",
"retentionBody": "Para trabajos programados, <code>run_scheduled_backup.sh</code> ejecuta <code>borg prune</code> contra el repositorio tras cada copia exitosa con los valores de retención configurados en el trabajo (<code>--keep-last</code>, <code>--keep-daily</code>, <code>--keep-weekly</code>). Las copias interactivas no aplican poda."
},
"restoreAccess": {
"heading": "Recuperación del lado de la restauración",
"body": "El flujo de restauración lista los archivos con <code>borg list REPO</code> y extrae el seleccionado con <code>borg extract REPO::ARCHIVE-NAME</code> a un directorio de staging que <code>_rs_check_layout</code> alimenta al pipeline estándar de restauración. Para recuperación manual fuera de ProxMenux, los mismos comandos funcionan; el árbol extraído es el layout estándar de tres bloques descrito en <em>Cómo funciona</em>."
},
"references": {
"heading": "Referencias",
"intro": "Documentación oficial de Borg para los componentes en los que se apoya ProxMenux.",
"items": [
{
"label": "Documentación de Borg",
"href": "https://borgbackup.readthedocs.io/",
"tail": " — punto de entrada principal, cubre conceptos, despliegue, quickstart y todos los comandos."
},
{
"label": "borg create",
"href": "https://borgbackup.readthedocs.io/en/stable/usage/create.html",
"tail": " — el comando que ProxMenux invoca en cada copia, con todas las flags soportadas."
},
{
"label": "Cifrado del repositorio",
"href": "https://borgbackup.readthedocs.io/en/stable/usage/init.html#encryption-mode",
"tail": " — los modos de cifrado que Borg soporta, incluido repokey que ProxMenux usa por defecto."
},
{
"label": "borg serve y despliegue SSH",
"href": "https://borgbackup.readthedocs.io/en/stable/deployment/central-backup-server.html",
"tail": " — cómo montar un servidor Borg central accedido por SSH, incluyendo el comando borg-serve y la flag restrict-to-path que ProxMenux escribe en authorized_keys."
},
{
"label": "borg prune",
"href": "https://borgbackup.readthedocs.io/en/stable/usage/prune.html",
"tail": " — el modelo de retención detrás de --keep-last / --keep-daily / --keep-weekly que ProxMenux aplica por trabajo programado."
}
]
}
}

View File

@@ -0,0 +1,110 @@
{
"meta": {
"title": "Destinos de copia — Local, Proxmox Backup Server, Borg | ProxMenux",
"description": "Tres backends de almacenamiento reciben el mismo contenido de una copia de ProxMenux: un archivo local .tar.zst en cualquier sistema de ficheros escribible, un backup en un datastore de Proxmox Backup Server o un archivo en un repositorio local o remoto de Borg. Cada backend tiene sus propias características de compresión, deduplicación, cifrado y red.",
"ogTitle": "Destinos de ProxMenux Backup",
"ogDescription": "Local, Proxmox Backup Server y Borg — tres backends de almacenamiento para el mismo contenido de copia del host.",
"twitterTitle": "Destinos de ProxMenux Backup | ProxMenux",
"twitterDescription": "Archivo local, Proxmox Backup Server y Borg como backends para copias del host."
},
"header": {
"title": "Destinos",
"description": "Los tres backends de almacenamiento soportados por ProxMenux Backup: archivo local, Proxmox Backup Server (recomendado) y Borg. Cada uno recibe el mismo archivo de tres bloques; se diferencian en formato de almacenamiento, deduplicación, modelo de cifrado y requisitos de red.",
"section": "Backup & Restore"
},
"intro": {
"title": "El mismo contenido, tres backends",
"body": "Cada copia produce los mismos tres bloques (rootfs, manifiesto, aplicaciones). Lo que cambia entre destinos es cómo se almacenan esos bloques y cómo el usuario los recupera para una restauración. Cada backend está implementado como una función independiente en <code>backup_host.sh</code> — <code>_bk_local</code>, <code>_bk_pbs</code>, <code>_bk_borg</code> — pero los tres comparten el mismo paso de staging (<code>hb_prepare_staging</code>) y el mismo camino de restauración. La elección del destino sólo afecta a la escritura y la recuperación; no cambia lo que hace una restauración ni cómo consume el archivo."
},
"comparison": {
"heading": "Comparativa de características",
"intro": "La siguiente tabla lista las diferencias concretas entre los tres backends tal como se comportan hoy en ProxMenux. Los valores describen el comportamiento observado del backend en sí, no recomendaciones editoriales.",
"rows": [
{
"feature": "Formato de almacenamiento",
"local": "Un único fichero <code>.tar.zst</code> (o <code>.tar.gz</code> si <code>zstd</code> no está disponible).",
"pbs": "Backup PBS (chunks <code>.pxar</code> en el datastore).",
"borg": "Archivo Borg dentro de un repositorio Borg (ficheros de segmento)."
},
{
"feature": "Compresión",
"local": "zstd (nivel por defecto) mediante <code>tar --zstd</code>. Fallback a gzip.",
"pbs": "Gestionada por PBS. El cliente envía sin comprimir; el servidor chunkiza + comprime.",
"borg": "La integrada de Borg (lz4 por defecto). Configurable al inicializar el repo."
},
{
"feature": "Deduplicación",
"local": "Ninguna. Cada copia es un archivo completo independiente.",
"pbs": "Deduplicación completa a nivel de chunk entre todas las backups del datastore.",
"borg": "Deduplicación completa a nivel de chunk entre todos los archivos del repositorio."
},
{
"feature": "Cifrado en reposo",
"local": "Ninguno (depende de la protección a nivel de filesystem).",
"pbs": "Cifrado opcional del lado del cliente mediante keyfile. Si se activa, el blob de recuperación se sube como grupo de backups aparte.",
"borg": "Cifrado opcional repokey (la clave se guarda en el repo, se desbloquea con una passphrase)."
},
{
"feature": "Retención / poda",
"local": "Aplicada por trabajo programado vía <code>KEEP_LAST</code>. Los archivos antiguos (y sus sidecars + logs del runner) se eliminan de forma simétrica. Las copias interactivas no aplican poda.",
"pbs": "Aplicada por trabajo programado vía <code>proxmox-backup-client prune --keep-last / --keep-daily / --keep-weekly</code>. Las copias interactivas no aplican poda.",
"borg": "Aplicada por trabajo programado vía <code>borg prune --keep-last / --keep-daily / --keep-weekly</code>. Las copias interactivas no aplican poda."
},
{
"feature": "Red",
"local": "Ninguna. Escribe en un punto de montaje local (típicamente un disco interno o una unidad USB).",
"pbs": "TCP contra el servidor PBS (puerto por defecto 8007). Requiere credenciales PBS + fingerprint.",
"borg": "Ruta local de sistema de ficheros o túnel SSH a un host Borg remoto."
},
{
"feature": "Dependencias",
"local": "<code>tar</code>, <code>zstd</code> (presentes en Proxmox por defecto).",
"pbs": "Paquete <code>proxmox-backup-client</code> (incluido en Proxmox VE 8+).",
"borg": "Binario <code>borg</code>. ProxMenux lo provisiona automáticamente desde el bundle del Monitor AppImage cuando no está presente."
},
{
"feature": "Acceso a la restauración",
"local": "Cualquier host con tar+zstd puede extraer el archivo. No se necesita PBS ni Borg.",
"pbs": "Requiere <code>proxmox-backup-client</code> + credenciales PBS + el keyfile (si está cifrado).",
"borg": "Requiere <code>borg</code> + la ruta del repositorio + la passphrase (si está cifrado)."
}
],
"captionCode": "Característica",
"captionLocal": "Local",
"captionPbs": "Proxmox Backup Server (recomendado)",
"captionBorg": "Borg"
},
"sameArchive": {
"heading": "El layout del archivo no cambia con el destino",
"body": "Dentro de cualquiera de los tres destinos está presente el mismo layout <code>rootfs/</code> + <code>metadata/</code> + <code>manifest.json</code> descrito en <em>Cómo funciona</em>. Un <code>.tar.zst</code> extraído de un archivo local, un <code>.pxar</code> restaurado desde PBS y un archivo Borg extraído con <code>borg extract</code> producen todos un árbol de directorios idéntico. El camino de código de la restauración (<code>_rs_check_layout</code>, <code>_rs_apply</code>, <code>_rs_prepare_pending_restore</code>) lee los mismos tres bloques sin saber de qué destino vienen."
},
"extractStandalone": {
"heading": "Extraer una copia fuera de ProxMenux",
"intro": "Cualquiera de los tres formatos de archivo se puede leer con herramientas estándar sin tener ProxMenux instalado en el host de lectura. Los comandos siguientes producen el mismo árbol de directorios que consume internamente una restauración.",
"localCmd": "# Desde un archivo local .tar.zst:\ntar --zstd -xf hostcfg-HOST-TIMESTAMP.tar.zst\n\n# Desde el fallback .tar.gz:\ntar -xzf hostcfg-HOST-TIMESTAMP.tar.gz",
"pbsCmd": "# Desde un backup PBS (requiere proxmox-backup-client):\nproxmox-backup-client restore \\\n --repository USER@REALM@HOST:DATASTORE \\\n host/hostcfg-HOST/BACKUP-TIME \\\n hostcfg.pxar /tmp/hostcfg\n\n# Añadir --keyfile KEY-PATH cuando el backup está cifrado.",
"borgCmd": "# Desde un archivo Borg (requiere el binario borg + passphrase si hay cifrado):\nborg extract REPO-PATH::ARCHIVE-NAME\n\n# Sobre un repo servido por SSH:\nborg extract ssh://USER@HOST:PORT/REPO-PATH::ARCHIVE-NAME",
"note": "El árbol extraído puede inspeccionarse manualmente o alimentar una restauración manual. Consulta las páginas de cada destino para conocer el flujo exacto de recuperación que ProxMenux utiliza por dentro."
},
"whereNext": {
"heading": "Detalle por destino",
"intro": "Cada destino tiene su propia página con el flujo de configuración, el formato en disco y el comando de recuperación que utiliza la restauración.",
"items": [
{
"label": "Archivo local",
"href": "/docs/backup-restore/destinations/local",
"tail": " — preconfiguración del destino local, montaje de unidades USB, el chequeo de seguridad contra escribir el archivo dentro de sí mismo, el sidecar JSON que permite al Monitor identificar el fichero."
},
{
"label": "Proxmox Backup Server (recomendado)",
"href": "/docs/backup-restore/destinations/pbs",
"tail": " — selección de datastore, credenciales y fingerprint, ciclo de vida del keyfile de cifrado, passphrase de recuperación, subida del blob de recuperación a PBS para recuperación tras reinstalación."
},
{
"label": "Borg",
"href": "/docs/backup-restore/destinations/borg",
"tail": " — repositorios locales vs. servidos por SSH, cómo se obtiene el binario Borg (sistema / caché / bundle del Monitor AppImage / descarga de GitHub), inicialización del repositorio, gestión de la passphrase, setup de claves SSH para repos remotos."
}
]
}
}

View File

@@ -0,0 +1,75 @@
{
"meta": {
"title": "Destino de archivo local — tar.zst en filesystem o unidad USB | ProxMenux",
"description": "El destino local de la copia escribe un único archivo .tar.zst en cualquier directorio escribible: un disco interno, un punto de montaje de Proxmox, un share NFS o una unidad USB. Documenta el flujo de configuración, la lógica de detección y montaje USB, el chequeo de seguridad contra escribir el archivo dentro de una ruta que se está copiando, y el sidecar JSON que identifica el fichero.",
"ogTitle": "ProxMenux Backup — Destino local",
"ogDescription": "Cómo escribe ProxMenux las copias locales como archivos .tar.zst y cómo configurar el directorio de destino o la unidad USB.",
"twitterTitle": "Destino local de copia | ProxMenux",
"twitterDescription": "Cómo escribe ProxMenux las copias locales como archivos .tar.zst en filesystem o USB."
},
"header": {
"title": "Archivo local",
"description": "El destino local escribe un único archivo tar comprimido en cualquier directorio escribible del host: un disco interno, un montaje NFS o SMB, o una unidad USB.",
"section": "Backup & Restore"
},
"intro": {
"title": "Un solo fichero, autocontenido",
"body": "Una copia local produce un único fichero <code>hostcfg-HOST-TIMESTAMP.tar.zst</code> (o <code>.tar.gz</code> cuando <code>zstd</code> no está presente). El fichero contiene el árbol completo del archivo — <code>manifest.json</code>, <code>metadata/</code> y <code>rootfs/</code> — y puede restaurarse en cualquier host Proxmox con el flujo de restauración de ProxMenux, o extraerse a mano con <code>tar --zstd -xf</code> en cualquier sistema Linux. Sin servidor, sin inicialización de repositorio, sin dependencia externa. Es el destino con el camino de recuperación más corto cuando ni PBS ni Borg están disponibles."
},
"targetConfig": {
"heading": "Configurar el directorio de destino",
"intro": "El destino local es un <strong>único directorio de destino persistido</strong> — no una lista. ProxMenux guarda la elección del usuario en <code>/usr/local/share/proxmenux/local-target.conf</code> y la lee en cada copia. Cuando no hay ningún destino configurado, se usa el valor por defecto <code>HB_LOCAL_TARGET_DEFAULT = /var/lib/vz/dump</code> (el mismo directorio que Proxmox utiliza para las salidas de <code>vzdump</code>). El destino se configura desde <em>Configure backup destinations → Local destinations</em>:",
"options": [
"<strong>Usar el valor por defecto (<code>/var/lib/vz/dump</code>).</strong> El almacenamiento local de Proxmox. Está presente en cualquier instalación de Proxmox; el archivo queda junto a las salidas de vzdump y lo detecta automáticamente la pestaña Backups del Monitor.",
"<strong>Introducir una ruta personalizada.</strong> Cualquier ruta absoluta del sistema de ficheros vale: un montaje NFS, un share SMB montado por <code>fstab</code>, un dataset ZFS dedicado, un segundo disco interno. ProxMenux valida que la ruta existe y es un directorio antes de persistirla.",
"<strong>Elegir una unidad USB.</strong> Abre el submenú USB (más abajo), que detecta los dispositivos extraíbles y ofrece montar o formatear uno."
]
},
"usbFlow": {
"heading": "Detección y montaje de la unidad USB",
"intro": "El submenú USB lista las particiones de los dispositivos extraíbles reportados por <code>lsblk</code>. Cada partición se muestra con su tamaño, etiqueta del filesystem y estado actual. El estado determina la acción que ProxMenux ofrece.",
"statesTitle": "Los tres estados del dispositivo",
"stateRows": [
{
"state": "mounted",
"shown": "Tamaño · label · [fstype] · → /punto/de/montaje",
"action": "La partición ya está montada en algún sitio. Seleccionarla persiste ese punto de montaje como destino local. No se realiza ningún montaje."
},
{
"state": "unmounted",
"shown": "Tamaño · label · [fstype] · (no montada — se montará)",
"action": "Hay un filesystem pero no está montado. Al confirmar, ProxMenux ejecuta <code>hb_mount_usb_partition</code>: crea <code>/mnt/backup-LABEL</code> (o una ruta basada en UUID si no hay label), monta la partición y persiste el punto de montaje como destino local."
},
{
"state": "empty",
"shown": "Tamaño · disco USB en crudo — sin filesystem (se FORMATEARÁ)",
"action": "El dispositivo no tiene filesystem. Camino destructivo — protegido por dos confirmaciones. Primero un diálogo Yes/No explica que la operación borrará el disco. Después una caja de entrada obliga al usuario a <strong>escribir la ruta exacta del dispositivo</strong> (por ejemplo <code>/dev/sdb</code>) antes de que ProxMenux cree una partición GPT + ext4 fresca y la monte."
}
],
"notMountedFallback": "Cuando no se detecta ningún dispositivo USB, el submenú cae en un inputbox simple. El usuario puede introducir una ruta de punto de montaje arbitraria; si la ruta no es un punto de montaje registrado, un diálogo de confirmación advierte antes de continuar."
},
"safetyCheck": {
"heading": "Chequeo de seguridad — destino dentro de una ruta copiada",
"body": "Antes de escribir el archivo, <code>_bk_local</code> verifica que el directorio de destino <strong>no</strong> sea un subcamino de ninguno de los directorios que se están copiando. Un footgun habitual sería añadir <code>/root</code> al perfil y elegir <code>/root/backups</code> como destino — el archivo se incluiría a sí mismo, produciendo o bien un archivo corrupto o bien crecimiento sin límite hasta llenar el disco. El chequeo resuelve ambos caminos con <code>readlink -m</code>, los compara y, si hay conflicto, aborta la copia con un diálogo que nombra la ruta en conflicto y lista tres formas de resolverlo: elegir un destino fuera de la ruta en conflicto, eliminar la entrada personalizada que contiene el destino, o usar modo Custom para desmarcar la ruta en conflicto en esa ejecución."
},
"archiveFormat": {
"heading": "Formato de archivo y compresión",
"intro": "El nombre del fichero de salida incorpora el hostname del origen y el timestamp de la copia para que un directorio con varios archivos se ordene cronológicamente y cada fichero se identifique por sí mismo.",
"namePattern": "hostcfg-HOSTNAME-YYYYMMDD_HHMMSS.tar.zst",
"compressionTitle": "Compresión",
"compressionBody": "El camino principal usa <code>tar --zstd -cf</code> — un pipeline de un solo comando que comprime al nivel por defecto de zstd. Cuando <code>zstd</code> no está presente en el origen (raro en Proxmox pero posible en instalaciones minimalistas), ProxMenux cae en <code>gzip</code>. En el camino de fallback, si <code>pv</code> está disponible, se añade una barra de progreso al pipeline para que el usuario vea crecer el tamaño del archivo en tiempo real; sin <code>pv</code>, se usa <code>tar -czf</code> plano en silencio.",
"sourceTitle": "Qué entra en el archivo",
"sourceBody": "El comando tar se invoca con <code>-C \"$staging_root\" .</code>, lo que archiva la <strong>raíz de staging completa</strong>: <code>rootfs/</code>, <code>metadata/</code> y <code>manifest.json</code>. Los tres bloques quedan uno al lado del otro en el nivel superior del tarball. Extraer el archivo produce exactamente el mismo árbol que consume el código de restauración."
},
"sidecar": {
"heading": "El sidecar JSON",
"intro": "Cada copia local con éxito produce un fichero compañero: <code>HOSTNAME-TIMESTAMP.tar.zst.proxmenux.json</code>, escrito junto al archivo por <code>hb_write_archive_sidecar</code>. Este pequeño fichero JSON permite al Monitor de ProxMenux identificar el archivo como una copia de host de ProxMenux incluso si posteriormente se mueve, renombra o archiva en otro lugar.",
"contentTitle": "Contenido del sidecar",
"contentBody": "El sidecar almacena la versión de schema, si la copia viene de una ejecución interactiva o de un trabajo programado (<code>kind</code>), el ID de trabajo para las ejecuciones programadas, el modo de perfil usado (<code>default</code> o <code>custom</code>), el hostname del origen, el basename original del archivo, un timestamp de creación en ISO-8601 y el tamaño del archivo en bytes.",
"whyBody": "La pestaña Backups del Monitor escanea los directorios locales configurados buscando sidecars <code>*.proxmenux.json</code> — no ficheros <code>*.tar.zst</code> — porque un <code>.tar.zst</code> sin sidecar podría no ser una copia de ProxMenux en absoluto. El escaneo es rápido (los JSON son diminutos) y el emparejamiento es estable frente a renombrados del archivo mientras el sidecar se renombre en paralelo."
},
"restoreAccess": {
"heading": "Restaurar desde un archivo local",
"body": "El flujo de restauración de ProxMenux descubre los archivos locales escaneando el destino local configurado buscando sidecars y mostrándolos en la lista de copias disponibles. Seleccionar uno dispara <code>_rs_check_layout</code>, que extrae el tarball en un directorio de staging y confirma el layout de tres bloques antes de continuar. Para una extracción manual fuera de ProxMenux, <code>tar --zstd -xf hostcfg-HOSTNAME-TIMESTAMP.tar.zst -C /tmp/hostcfg</code> produce el mismo árbol que consume el código de restauración."
}
}

View File

@@ -0,0 +1,102 @@
{
"meta": {
"title": "Destino Proxmox Backup Server — repositorio, cifrado, recuperación | ProxMenux",
"description": "El destino PBS escribe las copias de host de ProxMenux como backups PBS. Documenta la auto-detección del repositorio desde /etc/pve/storage.cfg, la configuración manual de PBS, el comando de subida .pxar, el modelo de cifrado por keyfile del lado del cliente, el blob de escrow con passphrase de recuperación, y la recuperación del keyfile desde PBS en instalaciones frescas.",
"ogTitle": "ProxMenux Backup — destino Proxmox Backup Server",
"ogDescription": "Cómo escribe ProxMenux las copias de host en Proxmox Backup Server con cifrado por keyfile del lado del cliente y escrow de recuperación.",
"twitterTitle": "Destino PBS de copia | ProxMenux",
"twitterDescription": "Destino Proxmox Backup Server con cifrado por keyfile y escrow de passphrase de recuperación."
},
"header": {
"title": "Proxmox Backup Server",
"description": "El destino PBS sube la raíz de staging como un único backup .pxar a un datastore de Proxmox Backup Server, con cifrado opcional por keyfile del lado del cliente y escrow automático de una passphrase de recuperación para recuperación tras reinstalación.",
"section": "Backup & Restore"
},
"recommendedBadge": "Destino recomendado",
"aboutPbs": {
"heading": "Qué es Proxmox Backup Server",
"body": "Proxmox Backup Server (PBS) es el producto de servidor de copias propio de Proxmox, desarrollado y mantenido por el mismo equipo que autora Proxmox VE. Es un servidor dedicado diseñado para recibir copias desde hosts Proxmox VE (VMs, LXCs y — vía <code>proxmox-backup-client</code> — directorios arbitrarios del host) con deduplicación a nivel de chunk, cifrado del lado del cliente y políticas de retención aplicadas del lado del servidor. ProxMenux usa PBS como uno de los tres destinos para copias del host; cada mecanismo específico de PBS descrito en esta página (grupos de copia, archivos <code>.pxar</code>, <code>--backup-id</code>, cifrado por keyfile) es comportamiento estándar de PBS."
},
"intro": {
"title": "Un backup por ejecución, deduplicación a nivel de chunk",
"body": "Una copia PBS produce una única entrada en el datastore, agrupada bajo el backup ID <code>host/hostcfg-HOSTNAME/BACKUP-TIME</code>. El contenido es un archivo <code>.pxar</code> con el mismo layout de tres bloques descrito en <em>Cómo funciona</em>. PBS deduplica a nivel de chunk en todas las copias del datastore, por lo que las copias siguientes del mismo host transfieren y almacenan sólo los chunks que hayan cambiado. La retención la aplica el propio ProxMenux para los trabajos programados — <code>run_scheduled_backup.sh</code> ejecuta <code>proxmox-backup-client prune</code> con <code>--keep-last</code> / <code>--keep-daily</code> / <code>--keep-weekly</code> tras cada ejecución exitosa usando los valores configurados en el trabajo."
},
"repoSelection": {
"heading": "Selección del repositorio",
"intro": "ProxMenux descubre repositorios PBS desde dos fuentes en cada copia. El usuario elige uno desde un menú unificado; la elección determina <code>HB_PBS_REPOSITORY</code>, <code>HB_PBS_SECRET</code> y <code>HB_PBS_FINGERPRINT</code> para esa ejecución.",
"sourceRows": [
{
"source": "storage.cfg de Proxmox (auto-descubierto)",
"path": "/etc/pve/storage.cfg + /etc/pve/priv/storage/NAME.pw",
"content": "Cualquier entrada <code>pbs:</code> del propio storage de Proxmox se recoge automáticamente. Servidor, datastore, usuario y fingerprint vienen de la entrada. La contraseña se lee del directorio de credenciales propio de Proxmox. Sin re-introducción por el lado de ProxMenux — el repositorio queda disponible tan pronto como se configura en Proxmox."
},
{
"source": "Configuración manual de ProxMenux",
"path": "/usr/local/share/proxmenux/pbs-manual-configs.txt + pbs-pass-NAME.txt + pbs-fingerprint-NAME.txt",
"content": "Se añade desde <em>Configure backup destinations → PBS destinations → Add PBS</em>. Pregunta por un nombre, usuario (<code>root@pam</code> o <code>user@pbs!token</code>), host o IP, datastore y contraseña. La contraseña se re-pregunta ante entrada vacía — un guardado vacío persistiría silenciosamente y cada copia posterior fallaría con un error de autenticación opaco. Este camino se usa cuando el PBS objetivo no está registrado como storage de Proxmox."
}
],
"menuTitle": "Menú de selección",
"menuBody": "Ambas fuentes se muestran en un único menú, cada fila etiquetada con su origen (<code>[proxmox]</code> o <code>[manual]</code>). Las entradas cuya contraseña no se pudo resolver se marcan con un aviso <code>⚠ no password</code> — seleccionarlas dispara una re-introducción de contraseña antes de iniciar la copia. El fingerprint se pasa a <code>proxmox-backup-client</code> vía la variable de entorno <code>PBS_FINGERPRINT</code>; cuando no está presente, el cliente pide al usuario aceptar el certificado del servidor de forma interactiva en la primera copia."
},
"backupCommand": {
"heading": "El comando de copia",
"intro": "La subida es una única invocación de <code>proxmox-backup-client backup</code>. ProxMenux la ejecuta dentro de un envoltorio <code>env</code> para que las credenciales nunca aparezcan en la lista de argumentos del proceso.",
"cmd": "env \\\n PBS_PASSWORD=\"$HB_PBS_SECRET\" \\\n PBS_ENCRYPTION_PASSWORD=\"$HB_PBS_ENC_PASS\" \\\n PBS_FINGERPRINT=\"$HB_PBS_FINGERPRINT\" \\\n proxmox-backup-client backup \\\n hostcfg.pxar:$staging_root \\\n --repository USER@REALM@HOST:DATASTORE \\\n --backup-type host \\\n --backup-id hostcfg-HOSTNAME \\\n --backup-time BACKUP-EPOCH \\\n [--keyfile /usr/local/share/proxmenux/pbs-key.conf]",
"backupIdTitle": "Nombrado del backup ID",
"backupIdBody": "El backup ID por defecto es <code>hostcfg-HOSTNAME</code>. Se pide al usuario que lo confirme o edite antes de la subida; cualquier carácter fuera de <code>[A-Za-z0-9_-]</code> se elimina y los guiones finales se recortan. Reutilizar el mismo ID entre ejecuciones es intencional — PBS trata el ID como un <em>grupo</em>, y cada copia posterior aparece como un nuevo backup dentro de ese grupo, compartiendo dedup con las ejecuciones previas.",
"pxarTitle": "Por qué el origen es la raíz de staging completa",
"pxarBody": "El origen del <code>.pxar</code> es la <code>staging_root</code> entera — <code>rootfs/</code>, <code>metadata/</code> y <code>manifest.json</code> juntos. Versiones anteriores pasaban <code>$staging_root/rootfs</code> como origen; eso dejaba <code>metadata/</code> fuera del archivo y el chequeo de compatibilidad de la restauración no tenía nada que leer, degradándose a avisos cross-host incluso en restauraciones al mismo host. Los backups antiguos creados con el origen rootfs-only siguen restaurándose correctamente gracias a la rama caso-3 de <code>_rs_check_layout</code>, que envuelve un árbol plano <code>etc/var/root/usr</code> de vuelta en una jerarquía <code>rootfs/</code>."
},
"encryption": {
"heading": "Cifrado del lado del cliente",
"intro": "El cifrado por keyfile del lado del cliente de PBS cifra los chunks en el host de origen antes de la subida. ProxMenux habilita esta funcionalidad con una restricción añadida: la passphrase de recuperación es obligatoria cuando se activa el cifrado. La passphrase no protege el keyfile local; protege la copia de escrow del keyfile que ProxMenux sube a PBS para recuperación ante desastre.",
"keyfileTitle": "Keyfile",
"keyfileBody": "En el primer uso, <code>proxmox-backup-client key create --kdf none</code> genera el keyfile en <code>/usr/local/share/proxmenux/pbs-key.conf</code> (<code>chmod 600</code>). Las copias posteriores lo reutilizan tras un único diálogo de confirmación. Si la creación del keyfile falla, la copia se cancela y la salida de error de la herramienta se muestra en un diálogo.",
"recoveryTitle": "Passphrase de recuperación y blob de escrow",
"recoveryBody": "Tras crear el keyfile, ProxMenux pregunta dos veces por una passphrase de recuperación (con validación de coincidencia) y ejecuta <code>openssl</code> para producir <code>pbs-key.recovery.enc</code> — el keyfile cifrado con la passphrase. Se escribe una copia en <code>/root/pbs-key.recovery-HOSTNAME-YYYYMMDD.enc</code> para almacenamiento offsite. Cancelar el diálogo de la passphrase borra el keyfile recién creado.",
"blobUploadTitle": "Grupo emparejado en PBS",
"blobUploadBody1": "Tras una copia PBS que usó el keyfile, el blob de escrow se sube como un segundo grupo de copia: <code>host/hostcfg-HOSTNAME-keyrecovery/BACKUP-TIME</code>. El prefijo compartido <code>hostcfg-HOSTNAME</code> coloca ambos grupos adyacentes en la interfaz de PBS; el sufijo <code>-keyrecovery</code> etiqueta la relación. La subida se ejecuta sin <code>--keyfile</code> (el blob ya está protegido con passphrase por openssl) y sólo cuando la copia actual usó el keyfile.",
"blobUploadConstraintTitle": "Por qué dos grupos",
"blobUploadConstraintBody": "<code>--keyfile</code> es un flag por invocación en <code>proxmox-backup-client backup</code>: todos los archivos de una misma invocación se cifran con el keyfile o ninguno. <code>hostcfg.pxar</code> requiere cifrado; <code>keyrecovery.conf</code> no puede cifrarse con el mismo keyfile (la recuperación en instalación fresca requeriría el propio keyfile que pretende recuperar). Dos invocaciones, dos backup IDs.",
"blobUploadImageAlt": "Interfaz de PBS mostrando los grupos hostcfg-HOSTNAME y hostcfg-HOSTNAME-keyrecovery adyacentes en el listado del datastore.",
"blobUploadImageCaption": "Interfaz de PBS — los grupos de copia emparejados. El grupo principal contiene las copias del host; el grupo -keyrecovery contiene el blob de escrow.",
"recoverTitle": "Recuperación en instalación fresca",
"recoverBody": "En un host sin keyfile local, el flujo de restauración llama a <code>hb_pbs_try_keyfile_recovery</code>. La función lista los grupos keyrecovery del PBS configurado, descarga el más reciente y pregunta por la passphrase. En caso de éxito, <code>pbs-key.conf</code> se escribe en el directorio de estado de ProxMenux y la copia cifrada puede restaurarse. Sin el keyfile y la passphrase, la copia cifrada no es recuperable."
},
"restoreAccess": {
"heading": "Recuperación del lado de la restauración",
"body": "El flujo de restauración descubre las copias de host de ProxMenux en PBS listando los grupos de backups bajo el repositorio configurado y filtrando por patrón de backup ID. La pestaña Backups del Monitor renderiza la misma lista. Seleccionar un backup dispara <code>proxmox-backup-client restore</code> con el mismo repositorio + contraseña + fingerprint (y <code>--keyfile</code> cuando el backup iba cifrado), extrayendo el <code>.pxar</code> a un directorio de staging que <code>_rs_check_layout</code> alimenta al pipeline estándar de restauración. Para recuperación manual fuera de ProxMenux, el mismo comando extrae el archivo a cualquier ruta — el árbol resultante puede inspeccionarse o alimentar una restauración a mano."
},
"references": {
"heading": "Referencias",
"intro": "Documentación oficial de Proxmox Backup Server para los componentes en los que se apoya ProxMenux.",
"items": [
{
"label": "Documentación de Proxmox Backup Server",
"href": "https://pbs.proxmox.com/docs/",
"tail": " — punto de entrada principal, cubre instalación, administración, almacenamiento, usuarios y roles."
},
{
"label": "proxmox-backup-client",
"href": "https://pbs.proxmox.com/docs/backup-client.html",
"tail": " — la herramienta de línea de comandos que ProxMenux invoca en cada copia y restauración. Cubre backup IDs, tipos de backup, archivos, sintaxis del repositorio y variables de entorno."
},
{
"label": "Cifrado del lado del cliente",
"href": "https://pbs.proxmox.com/docs/backup-client.html#encryption",
"tail": " — creación del keyfile, modos --kdf, el modelo de cifrado que ProxMenux extiende con un escrow de passphrase."
},
{
"label": "Gestión de datastores",
"href": "https://pbs.proxmox.com/docs/storage.html",
"tail": " — creación y administración de los datastores que reciben las copias de host, incluyendo el layout del chunk-store y permisos."
},
{
"label": "Poda y recolección de basura",
"href": "https://pbs.proxmox.com/docs/maintenance.html#pruning",
"tail": " — el modelo de retención detrás de --keep-last / --keep-daily / --keep-weekly que ProxMenux aplica por trabajo programado, más cómo PBS reclama chunks tras podar."
}
]
}
}

View File

@@ -0,0 +1,199 @@
{
"meta": {
"title": "Cómo funciona ProxMenux Backup por dentro — rootfs, manifiesto, aplicaciones",
"description": "Desglose detallado del contenido de una copia de ProxMenux: el rootfs producido por rsync del perfil de rutas por defecto, el manifiesto estructurado construido por seis colectores independientes, y el inventario de aplicaciones que dirige la reinstalación automática de paquetes y componentes tras una restauración.",
"ogTitle": "Cómo funciona ProxMenux Backup por dentro",
"ogDescription": "Los tres bloques de una copia de ProxMenux explicados: rootfs, manifiesto y aplicaciones.",
"twitterTitle": "Cómo funciona ProxMenux Backup | ProxMenux",
"twitterDescription": "Los tres bloques de una copia de ProxMenux y cómo la restauración reproduce el host de origen a partir de ellos."
},
"header": {
"title": "Cómo funciona",
"description": "Desglose interno de una copia de ProxMenux — sistema de ficheros, manifiesto e inventario de aplicaciones — y cómo la restauración consume los tres para reproducir el host de origen sobre un destino que puede no compartir el mismo kernel.",
"section": "Backup & Restore"
},
"intro": {
"title": "Un archivo, tres bloques",
"body": "Cada copia produce un layout de directorio con tres bloques bien definidos bajo una única raíz de staging. El archivo que se sube al destino (archivo local <code>.tar.zst</code>, backup PBS o archivo Borg) contiene ese layout exacto. La restauración lee los tres bloques de forma independiente, en un orden concreto que garantiza la corrección: primero se copia el <strong>rootfs</strong> para colocar la configuración, después se consulta <strong>el manifiesto</strong> para detectar drift y decidir qué omitir, y finalmente <strong>el inventario de aplicaciones</strong> dirige la pasada de reinstalación post-arranque. No hay dependencias entre bloques — cada uno puede inspeccionarse o extraerse de forma independiente."
},
"layout": {
"heading": "Layout del archivo",
"intro": "Cada archivo respeta el mismo layout con independencia del destino. El subdirectorio <code>metadata/</code> contiene los bloques estructurados; el subdirectorio <code>rootfs/</code> contiene la copia del sistema de ficheros.",
"treeCaption": "El directorio de staging generado durante una copia. Todos los destinos reciben el mismo árbol (adaptado a su formato nativo: tar para local, chunks PBS para PBS, segmentos borg para Borg).",
"tree": "backup-[timestamp]/\n├── manifest.json # estado estructurado del host\n├── metadata/\n│ ├── packages.manual.list # apt-mark showmanual\n│ ├── run_info.env # identidad de la ejecución + versión del kernel\n│ ├── paths_archived.txt # lista exacta de rutas que llegaron a rootfs/\n│ └── missing_paths.txt # rutas del perfil ausentes en el origen\n└── rootfs/\n ├── etc/ # /etc/pve, /etc/network, /etc/ssh, …\n ├── root/ # /root (con subdirs volátiles excluidos)\n ├── usr/local/ # /usr/local/bin, /usr/local/share/proxmenux, …\n └── var/ # /var/lib/pve-cluster, /var/spool/cron/…"
},
"rootfs": {
"heading": "El bloque rootfs",
"intro": "El árbol <code>rootfs/</code> es una <strong>copia plana del sistema de ficheros</strong> producida por <code>rsync</code> desde el host de origen. Contiene un <strong>perfil por defecto</strong> curado de rutas que importan para una restauración de Proxmox, más cualquier <strong>ruta personalizada</strong> añadida por el usuario al trabajo de copia o a la sesión interactiva. El conjunto es intencionadamente estrecho: solamente rutas que <em>contienen configuración</em> o <em>contienen estado que Proxmox no puede regenerar por sí solo</em>.",
"defaultProfileTitle": "El perfil por defecto",
"defaultProfileBody": "El perfil por defecto está definido por <code>hb_default_profile_paths</code> en <code>lib_host_backup_common.sh</code>. Cubre ocho categorías que en conjunto describen un host Proxmox operativo:",
"categoriesTitle": "Categorías de rutas",
"categoryRows": [
{
"category": "Núcleo PVE",
"paths": "/etc/pve, /var/lib/pve-cluster, /etc/vzdump.conf",
"why": "Contenido del filesystem del clúster, datos vivos del clúster, valores por defecto de vzdump."
},
{
"category": "Identidad del host y red",
"paths": "/etc/hostname, /etc/hosts, /etc/timezone, /etc/resolv.conf, /etc/network",
"why": "Todo lo necesario para que el host arranque en red con la misma identidad."
},
{
"category": "Acceso y autenticación",
"paths": "/etc/ssh, /etc/sudoers, /etc/sudoers.d, /etc/pam.d, /etc/security",
"why": "Claves SSH, reglas de sudo y configuración de PAM. Perderlas deja al usuario fuera del host restaurado."
},
{
"category": "Kernel y arranque",
"paths": "/etc/default/grub, /etc/kernel, /etc/modules, /etc/modules-load.d, /etc/modprobe.d, /etc/sysctl.conf, /etc/sysctl.d, /etc/udev/rules.d, /etc/fstab, /etc/iscsi, /etc/multipath",
"why": "Tokens IOMMU, blacklists de módulos, IDs de dispositivos VFIO, tabla de montaje, configuración del stack de almacenamiento."
},
{
"category": "Shell y locale",
"paths": "/etc/environment, /etc/bash.bashrc, /etc/inputrc, /etc/profile, /etc/profile.d, /etc/locale.gen, /etc/locale.conf",
"why": "Configuración de shell a nivel de sistema, variables de entorno, generación de locales."
},
{
"category": "Paquetería y cron",
"paths": "/etc/apt, /etc/cron.d, /etc/cron.{daily,hourly,weekly,monthly}, /etc/cron.allow, /etc/cron.deny, /var/spool/cron/crontabs",
"why": "Fuentes APT para resolución consistente de paquetes, tareas programadas definidas por el usuario."
},
{
"category": "Estado ProxMenux y herramientas",
"paths": "/etc/proxmenux, /etc/systemd/system, /etc/log2ram.conf, /etc/logrotate.conf, /etc/logrotate.d, /etc/lm-sensors, /etc/sensors3.conf, /etc/fail2ban, /etc/snmp, /etc/postfix, /etc/wireguard, /etc/openvpn, /etc/grafana, /etc/influxdb, /etc/prometheus, /etc/telegraf, /etc/zabbix",
"why": "Herramientas opcionales pero habituales de Proxmox. Las rutas ausentes se registran en <code>metadata/missing_paths.txt</code> sin detener la copia."
},
{
"category": "Binarios ProxMenux y root",
"paths": "/usr/local/bin, /usr/local/sbin, /usr/local/share/proxmenux, /root (subdirs volátiles excluidos)",
"why": "Binarios instalados por ProxMenux y configuración por usuario bajo <code>/root</code>. Las rutas volátiles (<code>.bash_history</code>, <code>.cache/</code>, <code>tmp/</code>, <code>.local/share/Trash/</code>) quedan fuera de la copia."
},
{
"category": "Estado ZFS (condicional)",
"paths": "/etc/zfs",
"why": "Sólo se incluye cuando el host de origen usa ZFS. Contiene <code>zpool.cache</code> y <code>hostid</code>."
}
],
"customTitle": "Ampliar el perfil con rutas propias",
"customBody": "Además del perfil por defecto, ProxMenux ofrece dos maneras de incluir rutas adicionales en una copia. Se combinan sin conflicto y ambas se aplican tanto a copias interactivas como a trabajos programados.",
"customExtrasTitle": "1. Extras persistentes (fichero por-host)",
"customExtrasBody": "Un fichero de texto en <code>/usr/local/share/proxmenux/backup-extra-paths.txt</code> guarda una lista de rutas absolutas que el usuario ha marcado como \"incluir siempre\" en este host. Cuando una copia se ejecuta en modo <strong>Default</strong>, ProxMenux añade automáticamente estas rutas al perfil por defecto sin preguntar. El fichero se edita desde la interfaz — no hay que tocarlo a mano — y persiste entre reinicios y actualizaciones. Cada línea es una ruta absoluta; se admiten comentarios con <code>#</code>.",
"customModeTitle": "2. Modo Custom (por ejecución)",
"customModeBody": "Al lanzar una copia en modo <strong>Custom</strong>, en lugar de aplicar el perfil por defecto directamente, se muestra un checklist con todas las rutas: las del perfil por defecto y las de extras persistentes (estas últimas premarcadas con <code>[+]</code>). El usuario marca o desmarca lo que quiera para esa ejecución concreta, y puede además pulsar <em>Add custom path</em> para introducir una ruta nueva — que queda registrada en el fichero de extras persistentes para futuras copias.",
"customMissingTitle": "Rutas ausentes en el origen",
"customMissingBody": "Cualquier ruta del perfil (por defecto o añadida) que no exista en el host de origen se registra en <code>metadata/missing_paths.txt</code> dentro del archivo. La copia no falla ni interrumpe — el usuario ve el resumen de rutas archivadas y rutas ausentes al terminar. En la práctica esto ocurre con las rutas de herramientas opcionales como <code>/etc/wireguard</code> o <code>/etc/prometheus</code> cuando esas herramientas no están instaladas."
},
"manifest": {
"heading": "El bloque manifiesto",
"intro": "<code>manifest.json</code> es un documento JSON estructurado que describe el host de origen en el momento de la copia. Se produce mediante <strong>seis colectores independientes</strong> orquestados por <code>build_manifest.sh</code>. Cada colector es de sólo lectura, produce un fragmento JSON bien definido y hace fallback a un valor vacío seguro si falla — el manifiesto sigue siendo utilizable aunque una sección quede incompleta.",
"orchestratorCaption": "Los seis colectores componen el manifiesto. Cada uno corre en su propio subproceso; un fallo en uno hace fallback al valor por defecto documentado y advierte, pero no aborta la copia.",
"collectorRows": [
{
"collector": "collect_source_host.sh",
"produces": "source_host",
"content": "Hostname, versión de PVE (<code>pveversion</code>), versión de PBS si el host ejecuta el rol de backup-server, kernel (<code>uname -r</code>), modo de arranque (efi/bios), tipo de filesystem raíz, modelo y arquitectura de CPU, memoria en KB."
},
{
"collector": "collect_hardware.sh",
"produces": "hardware_inventory",
"content": "GPUs (con fabricante y mapeo al instalador de ProxMenux), TPUs (Coral USB + M.2 detectados con <code>lsusb</code>/<code>lspci</code>), NICs (con MAC, slot PCI y pertenencia a bridges), dispositivos wireless. Las entradas de GPU llevan un heurístico <code>passthrough_eligible</code>."
},
{
"collector": "collect_storage.sh",
"produces": "storage_inventory",
"content": "Pools ZFS (con tipo de pool y discos miembro resueltos a <code>/dev/disk/by-id/*</code> para portabilidad), grupos de volúmenes LVM + thin pools, discos físicos con capacidad SMART, entradas de <code>storage.cfg</code> de PVE, puntos de montaje externos."
},
{
"collector": "collect_kernel.sh",
"produces": "kernel_params",
"content": "Tokens del usuario extraídos de <code>/proc/cmdline</code> (limpios de boilerplate como <code>BOOT_IMAGE=</code>, <code>root=</code>, <code>ro/rw</code>, <code>quiet</code>, <code>splash</code>), módulos cargados al arranque desde <code>/etc/modules</code>, y rutas de los ficheros <code>/etc/modprobe.d/*.conf</code> con directivas efectivas (<code>options</code>, <code>blacklist</code>, <code>install</code>, <code>alias</code>, <code>softdep</code>)."
},
{
"collector": "collect_proxmenux_state.sh",
"produces": "proxmenux_installed_components",
"content": "Lee <code>/usr/local/share/proxmenux/managed_installs.json</code> (registro de todo lo que ProxMenux ha instalado) e <code>installed_tools.json</code>. Cada entrada conserva la ruta al instalador (<code>menu_script</code>) para que la restauración pueda disparar el mismo flujo de instalación."
},
{
"collector": "collect_guests.sh",
"produces": "vms_lxcs_at_backup",
"content": "Enumera VMs (<code>qm list</code>) y LXCs (<code>pct list</code>) presentes en el momento de la copia — VMID, nombre, estado actual. Sólo el inventario: los datos reales del invitado son responsabilidad de <code>vzdump</code> / PBS."
}
],
"schemaTitle": "Validación por esquema",
"schemaBody": "El manifiesto valida contra <code>scripts/backup_restore/schema/manifest.schema.json</code>. Ejecutar <code>build_manifest.sh --validate</code> dispara una validación JSON Schema por Python (requiere <code>python3</code> + <code>jsonschema</code>). Si el módulo no está presente, la comprobación se omite silenciosamente — la validación es principalmente una ayuda de desarrollo, no una dependencia en tiempo de ejecución."
},
"applications": {
"heading": "El inventario de aplicaciones",
"intro": "Dos ficheros bajo <code>metadata/</code> catalogan todo lo instalado en el origen que no forma parte del conjunto de paquetes base de Proxmox VE. La restauración los utiliza para reproducir el conjunto exacto de software instalado por el usuario en el destino, usando APT o los instaladores propios de ProxMenux según cómo se instalara originalmente el software.",
"packagesTitle": "packages.manual.list",
"packagesBody": "Una lista de texto plano producida por <code>apt-mark showmanual</code>: todos los paquetes APT que fueron <em>instalados explícitamente</em> en el host de origen, ordenados alfabéticamente. Esto excluye los paquetes instalados como dependencias del ISO base de Proxmox VE (que APT del destino vuelve a traer automáticamente). Es leída por <code>_rs_run_complete_extras</code> durante la restauración, filtrada por un filtro <em>cascade-safe</em> de tres pases (<code>dpkg -s</code> para lo ya instalado, detección de sibling-major para librerías, <code>apt-get install --simulate</code> para riesgo de cascade-remove) y después instalada con <code>apt-get install -y</code>.",
"componentsTitle": "components_status.json (parte del rootfs)",
"componentsBody": "Un registro JSON bajo <code>/usr/local/share/proxmenux/</code> que anota cada componente que ProxMenux ha instalado con su estado exacto: versión, flags específicas de ProxMenux (para NVIDIA: booleano <code>patched</code>; para Coral: versión del DKMS). Este fichero vive dentro del rootfs — no en <code>metadata/</code> — porque se lee <em>después</em> de haber copiado el rootfs al destino. El dispatcher post-arranque (<code>apply_cluster_postboot.sh</code>) itera sobre sus entradas y ejecuta el hook <code>--auto-reinstall</code> de cada componente, que lee el estado registrado y reproduce la instalación contra el kernel actual del destino.",
"componentInstallersTitle": "Instaladores de componentes",
"componentInstallersBody": "Cuatro instaladores de ProxMenux exponen actualmente un punto de entrada <code>--auto-reinstall</code>:",
"installerRows": [
{
"component": "nvidia_driver",
"installer": "gpu_tpu/nvidia_installer.sh",
"action": "Lee <code>version</code> + <code>patched</code>. Descarga el runfile exacto de NVIDIA, compila los módulos DKMS contra el kernel del destino, reaplica el parche de ProxMenux si el origen lo tenía."
},
{
"component": "coral_driver",
"installer": "gpu_tpu/install_coral.sh",
"action": "Lee la versión del driver Coral. Compila el módulo DKMS contra el kernel del destino."
},
{
"component": "amdgpu_top",
"installer": "gpu_tpu/amd_gpu_tools.sh",
"action": "Lee la versión registrada. Vuelve a descargar el <code>.deb</code> exacto desde la release de GitHub."
},
{
"component": "intel_gpu_tools",
"installer": "gpu_tpu/intel_gpu_tools.sh",
"action": "Instala el paquete vía APT. Idempotente si ya está presente por <code>packages.manual.list</code>."
}
]
},
"restoreFlow": {
"heading": "Cómo consume la restauración los tres bloques",
"intro": "La restauración es un pipeline de cinco etapas. Cada etapa lee un subconjunto concreto del archivo y actualiza el host de destino. Ninguna etapa requiere que el host de origen esté accesible — el archivo es totalmente autocontenido.",
"stagesCaption": "La etapa 1 usa el manifiesto para decidir qué tocar. La etapa 2 copia las rutas del rootfs seguras de aplicar en un sistema en ejecución. La etapa 3 deja las rutas de riesgo preparadas para el siguiente arranque. La etapa 4 gestiona los paquetes. La etapa 5 corre tras el reinicio y reinstala los componentes contra el kernel del destino.",
"stageRows": [
{
"stage": "1",
"name": "Comprobación de compatibilidad",
"reads": "manifest.json",
"action": "Ejecuta <code>hb_compat_check</code>. Compara hardware (NICs, IDs de almacenamiento), versión de PVE y versión mayor del kernel entre origen y destino. Fija <code>HB_COMPAT_KERNEL_DIRECTION</code> (<code>same</code>, <code>bk_newer</code> o <code>bk_older</code>) y rellena <code>RS_SKIP_PATHS</code> con las exclusiones por drift de hardware y por cross-kernel."
},
{
"stage": "2",
"name": "Aplicación hot",
"reads": "rootfs/ (sólo rutas seguras)",
"action": "<code>_rs_apply … hot</code> copia las entradas cuyo <code>hb_classify_path</code> es <code>hot</code> directamente al destino en vivo. Todo lo bajo <code>/etc/pve</code>, <code>/etc/network</code> o clasificado como <em>reboot</em>/<em>dangerous</em> queda diferido."
},
{
"stage": "3",
"name": "Preparación de pending",
"reads": "rootfs/ (rutas reboot + dangerous)",
"action": "<code>_rs_prepare_pending_restore</code> deja las rutas de riesgo preparadas bajo <code>/var/lib/proxmenux/pending-restore/</code>, escribe <code>plan.env</code>, <code>apply-on-boot.list</code> y <code>rs-skip-paths.txt</code>, y habilita <code>proxmenux-restore-onboot.service</code> para que dispare en el siguiente arranque."
},
{
"stage": "4",
"name": "Instalación de paquetes",
"reads": "metadata/packages.manual.list",
"action": "<code>_rs_run_complete_extras</code> ejecuta el filtro cascade-safe y llama a <code>apt-get install -y</code> con la lista de paquetes superviviente. La salida completa va a <code>/var/log/proxmenux/restore-apt-*.log</code>."
},
{
"stage": "5",
"name": "Post-arranque",
"reads": "rootfs (ya aplicado) + components_status.json",
"action": "Tras el reinicio, <code>apply_pending_restore.sh</code> reproduce las rutas diferidas y <code>apply_cluster_postboot.sh</code> ejecuta <code>update-initramfs</code>, <code>update-grub</code> (o <code>proxmox-boot-tool refresh</code>) e itera sobre <code>components_status.json</code> disparando el hook <code>--auto-reinstall</code> de cada componente."
}
]
},
"whyItWorks": {
"heading": "Por qué la separación en tres bloques es la correcta",
"body": "La separación no responde a una decisión de sistema de ficheros — responde a una decisión de <strong>ciclo de vida</strong>. El contenido del sistema de ficheros se mueve con <code>rsync</code>: rápido, transparente, atómico por fichero. El estado de configuración que la restauración tiene que interpretar antes de tocar el destino se mueve como <strong>JSON estructurado</strong>: legible de forma independiente, versionable mediante un esquema, diff-eable contra el estado propio del destino. El software que se tiene que reinstalar contra el entorno del destino se mueve como <strong>inventario</strong>: sólo nombres y versiones, dejando que el gestor de paquetes del destino y los instaladores propios de ProxMenux decidan los binarios reales. Cada bloque se optimiza para lo que tiene que hacer, y los tres combinan en una restauración que es atómica en la intención pero tolerante a fallos en la práctica: un manifiesto corrupto sigue dejando el rootfs restaurable, un paquete perdido sigue dejando los componentes instalables, un instalador que falla en una entrada no detiene la siguiente."
}
}

View File

@@ -0,0 +1,87 @@
{
"meta": {
"title": "ProxMenux Backup & Restore — Descripción general | Copia y restauración completa del host Proxmox VE",
"description": "ProxMenux Backup & Restore captura el estado completo de un host Proxmox — sistema de ficheros, manifiesto estructurado de configuración y paquetes/componentes instalados — y lo reproduce en el mismo host o en uno distinto. La copia y la restauración son autocontenidas: sin dependencias externas, y con soporte para restauraciones cross-kernel mediante un filtro direccional de subconjunto seguro y una hidratación kernel-agnóstica.",
"ogTitle": "ProxMenux Backup & Restore — Descripción general",
"ogDescription": "Copia y restauración completa del host Proxmox VE con manifiesto estructurado, lista de paquetes y reinstaladores de componentes.",
"twitterTitle": "ProxMenux Backup & Restore | ProxMenux",
"twitterDescription": "Copia y restauración completa del host Proxmox VE con manifiesto estructurado, lista de paquetes y reinstaladores de componentes."
},
"header": {
"title": "Backup & Restore",
"description": "Copia y restauración a nivel de host para Proxmox VE. Captura el sistema de ficheros, la configuración y los componentes instalados en un único archivo y reproduce el host sobre la misma instalación de Proxmox o sobre una distinta, sin dependencias externas.",
"section": "Backup & Restore"
},
"intro": {
"title": "Qué es, en un párrafo",
"body": "Una copia de ProxMenux captura el estado completo de un host Proxmox: <strong>el sistema de ficheros</strong> (directorios relevantes bajo <code>/etc</code>, <code>/root</code>, <code>/var/lib/pve-cluster</code>, más rutas personalizadas opcionales), <strong>un manifiesto estructurado</strong> (JSON con el hardware detectado, los parámetros del kernel, la topología de red, el estado de ZFS, los usuarios y las entradas de cron) y <strong>un inventario de aplicaciones</strong> (todos los paquetes marcados como instalados manualmente por APT, más la lista de componentes instalados por ProxMenux con sus versiones exactas). Cualquiera de los tres destinos soportados — archivo local, Proxmox Backup Server (recomendado) o Borg — recibe el mismo contenido autocontenido, y cualquiera de ellos puede hidratar el host de destino sin depender de que el origen esté accesible en el momento de la restauración."
},
"whatItIsNot": {
"heading": "Qué no es",
"intro": "La sección cubre copia y restauración <strong>a nivel de host</strong>: la instalación de Proxmox en sí, no las cargas de trabajo que se ejecutan sobre ella.",
"items": [
"<strong>No es una herramienta de copia de VMs/CTs.</strong> Los discos de los invitados y su estado de RAM no se capturan en esta función; para eso está <code>vzdump</code>. Los <strong>ficheros de configuración</strong> de los invitados (<code>/etc/pve/nodes/&lt;node&gt;/qemu-server/*.conf</code> y <code>lxc/*.conf</code>) <strong>sí</strong> se capturan, de modo que tras la restauración el inventario de invitados reaparece y sus discos pueden re-adjuntarse desde una copia existente de PBS o local.",
"<strong>No es una operación a nivel de clúster.</strong> Cada nodo se copia a sí mismo. La pertenencia al clúster se captura como parte de <code>/etc/pve</code> para que un nodo restaurado pueda re-incorporarse al clúster, pero restaurar un clúster completo requiere coordinación por nodo.",
"<strong>No es una imagen completa del disco.</strong> Los binarios del kernel, el initramfs y la partición de arranque no se capturan. En la restauración, ProxMenux utiliza los artefactos de arranque propios del host de destino (regenerados automáticamente por <code>update-initramfs</code> y la herramienta de bootloader) e instala los controladores adecuados contra el kernel que el destino tenga en ejecución."
]
},
"threePillars": {
"heading": "Los tres pilares de una copia",
"intro": "Un archivo de ProxMenux se estructura en torno a tres cargas útiles autocontenidas. La restauración utiliza las tres en conjunto para reproducir el host de origen sobre un destino que puede no tener siquiera el mismo kernel instalado.",
"diagramCaption": "Cada copia contiene los mismos tres bloques con independencia del destino. La restauración los consume todos: rootfs para colocar los ficheros, manifiesto para detectar drift y diferencias cross-kernel, e inventario de aplicaciones para reinstalar paquetes y componentes contra el kernel del propio destino.",
"pillar1Label": "Sistema de ficheros",
"pillar1Detail": "rootfs/\n(rsync de\n/etc, /root,\n/var/lib/pve-cluster,\n+ rutas opcionales)",
"pillar2Label": "Manifiesto",
"pillar2Detail": "manifest.json\n(hardware, params\ndel kernel, red,\nZFS, usuarios, cron,\npools ZFS, storage)",
"pillar3Label": "Aplicaciones",
"pillar3Detail": "packages.manual.list\n+ components_status.json\n(APT manual + instaladores\nProxMenux con versiones)"
},
"restoreIsUniversal": {
"heading": "La restauración reproduce el host de origen, no el archivo",
"body": "Restaurar una copia de ProxMenux no consiste solamente en extraer el sistema de ficheros. El flujo de restauración lee el manifiesto para detectar diferencias entre origen y destino (variaciones de hardware, renombrado de NICs, versión de kernel, identidad de la pool ZFS), reproduce el sistema de ficheros y lanza el instalador correspondiente a cada servicio que estuviera instalado en el origen (controlador NVIDIA, Coral TPU, herramientas AMD GPU, herramientas Intel GPU). Cada instalador se ejecuta contra el <strong>kernel actual del destino</strong>, por lo que el host restaurado no depende de que el kernel del origen esté presente. Cuando el kernel del destino es más reciente que el de la copia, una pasada de <strong>hidratación</strong> kernel-agnóstica funde la configuración propia del usuario (tokens IOMMU, IDs de dispositivos VFIO, quirks personalizadas, claves de GRUB) sobre la configuración de arranque fresca del destino, sin copiar verbatim los ficheros ligados al kernel."
},
"twoInterfaces": {
"heading": "Dos interfaces, un único backend",
"intro": "Cada paso del flujo de copia y restauración está disponible desde dos puntos de entrada. Ambos invocan la misma librería de shell, producen archivos idénticos y leen el mismo registro de trabajos.",
"cliLabel": "ProxMenux Scripts (TUI)",
"cliDetail": "menu → Utilities →\nHost Backup / Restore\n\nFlujo basado en diálogos,\namigable por SSH, admite\nejecución desatendida\ndesde scripts.",
"webLabel": "ProxMenux Monitor (Web UI)",
"webDetail": "Pestaña Backups en la\ninterfaz Web del Monitor.\n\nRestauración con un clic,\nlog en vivo, integrado con\nlas notificaciones y con\nel visor de rollback."
},
"whereNext": {
"heading": "A dónde seguir desde aquí",
"intro": "Cada subsección posterior desarrolla en detalle un aspecto del flujo. Se recomienda empezar por <em>Cómo funciona</em> para entender qué contiene el archivo y por qué. Consultar <em>Destinos</em> para configurar el destino de la copia. Leer <em>Restauración</em> y <em>Restauración cross-kernel</em> para el lado de recuperación.",
"items": [
{
"label": "Cómo funciona",
"href": "/docs/backup-restore/how-it-works",
"tail": " — los tres bloques (rootfs, manifiesto, aplicaciones) en detalle, con los colectores que los generan y el formato de cada fichero."
},
{
"label": "Destinos",
"href": "/docs/backup-restore/destinations",
"tail": " — comparativa entre archivo local, Proxmox Backup Server (recomendado) y Borg, y cómo configurar cada uno."
},
{
"label": "Crear copias",
"href": "/docs/backup-restore/creating-backups",
"tail": " — copias puntuales, perfil de rutas por defecto, adición de rutas personalizadas, cifrado en PBS."
},
{
"label": "Trabajos programados",
"href": "/docs/backup-restore/scheduled-jobs",
"tail": " — trabajos nuevos vs. adjuntarse a un trabajo vzdump existente en PVE, formatos de programación, el modal de detalle del trabajo."
},
{
"label": "Restauración",
"href": "/docs/backup-restore/restoring",
"tail": " — las tres acciones sobre un archivo (ver, descargar, restaurar), Completa vs. Personalizada, el dispatcher post-arranque y por qué importan los últimos diez minutos."
},
{
"label": "Restauración cross-kernel",
"href": "/docs/backup-restore/cross-kernel",
"tail": " — comportamiento direccional cuando el kernel del destino difiere del de la copia, el filtro de subconjunto seguro y las cuatro fases de hidratación."
}
]
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,148 @@
{
"meta": {
"title": "Trabajos programados — timers, modo adjunto, retención | ProxMenux",
"description": "Trabajos de copia de host programados en ProxMenux. Dos modos de creación (timer systemd propio o adjuntarse a un trabajo vzdump de PVE existente), valores de retención aplicados por trabajo vía proxmox-backup-client/borg/local prune, layout de almacenamiento bajo /var/lib/proxmenux/backup-jobs, y el script runner que produce archivos idénticos al flujo interactivo.",
"ogTitle": "ProxMenux Backup — trabajos programados",
"ogDescription": "Copias de host desatendidas programadas con modo adjunto, retención, y los mismos tres destinos que el flujo interactivo.",
"twitterTitle": "Trabajos programados | ProxMenux",
"twitterDescription": "Trabajos de copia de host desatendidos con modo adjunto y retención."
},
"header": {
"title": "Trabajos programados",
"description": "Trabajos de copia de host desatendidos. Dos modelos de creación: un trabajo nuevo e independiente con su propio horario, o un trabajo adjuntado a una tarea vzdump de PVE existente que hereda el horario y la retención de esa tarea. Ambos producen archivos idénticos al flujo interactivo.",
"section": "Backup & Restore"
},
"intro": {
"title": "Los dos modelos de trabajo programado",
"body": "Un trabajo programado puede crearse siguiendo uno de dos modelos:",
"modelsList": [
"<strong>Trabajo nuevo e independiente</strong> — el propio ProxMenux define el horario del trabajo con un timer systemd propio, independiente de cualquier otra tarea del host. Compatible con los tres destinos: Local, PBS y Borg.",
"<strong>Adjuntarse a una tarea vzdump de PVE existente</strong> — el trabajo no lleva horario propio; se ejecuta automáticamente cada vez que se dispara la tarea vzdump padre que ya copia las VMs y los LXCs del host. Hereda el horario y la retención de la tarea padre. Compatible con Local y PBS (Borg no está soportado porque no existe scheduler nativo de PVE para Borg)."
]
},
"attachBadge": {
"title": "Modo adjunto — recomendado cuando ya existe una tarea vzdump de PVE",
"body": "Cuando ya hay una tarea de copia vzdump de PVE configurada para las VMs y los LXCs de este nodo, adjuntar la copia de host a esa tarea garantiza que la configuración del host se captura en la <strong>misma ventana</strong> que los invitados. En la restauración, las configuraciones de los invitados vienen de la copia de host (viven bajo <code>/etc/pve</code>), y los discos de los invitados vienen de la copia vzdump tomada al mismo tiempo — ambos conjuntos son consistentes entre sí, por lo que una recuperación completa del nodo puede reproducir el host y re-adjuntar cada invitado sin drift de versiones."
},
"modes": {
"heading": "Los dos modos",
"rows": [
{
"mode": "Nuevo trabajo programado",
"backends": "Local, PBS, Borg",
"schedule": "Expresión <code>OnCalendar</code> propia (sintaxis de calendario systemd — por ejemplo <code>daily</code>, <code>Mon..Fri 03:00</code>).",
"retention": "Se pregunta por separado: <code>keep-last</code>, <code>keep-hourly</code>, <code>keep-daily</code>, <code>keep-weekly</code>, <code>keep-monthly</code>, <code>keep-yearly</code>. La aplica el runner tras cada copia exitosa."
},
{
"mode": "Adjuntar a un trabajo vzdump de PVE",
"backends": "Local, PBS (Borg no tiene scheduler del lado PVE)",
"schedule": "Heredado del trabajo PVE padre. No se instala timer systemd del lado de ProxMenux.",
"retention": "Heredada de la configuración <code>prune-backups</code> del padre (mapeada uno-a-uno a las variables <code>KEEP_*</code> del runner vía <code>hb_pve_prune_to_keep_env</code>)."
}
]
},
"attachDetail": {
"heading": "Cómo funciona el modo adjunto",
"intro": "PVE escribe las tareas <code>vzdump</code> en <code>/etc/pve/jobs.cfg</code> — una entrada por tarea, cada una apuntando a un storage donde caen los dumps de VMs y LXCs. El modo adjunto requiere que ese storage sea un backend que ProxMenux entienda (Local o PBS); cuando la tarea dispara, ProxMenux se ejecuta al mismo tiempo.",
"steps": [
{
"step": "1",
"detail": "Durante la creación del trabajo, ProxMenux lista las tareas PVE padre compatibles vía <code>hb_pve_list_vzdump_jobs_for_backend</code>. El usuario elige una."
},
{
"step": "2",
"detail": "El <code>.env</code> del trabajo se escribe con <code>PVE_PARENT_JOB</code>, <code>PVE_STORAGE</code> y los valores heredados de <code>KEEP_*</code>; no se crea timer systemd."
},
{
"step": "3",
"detail": "<code>hb_install_vzdump_hook</code> registra un script-hook en <code>/etc/vzdump.conf</code>. Cuando PVE ejecuta cualquier tarea vzdump, el script-hook dispara; si el <code>$STOREID</code> que se le pasa coincide con el <code>PVE_STORAGE</code> de un trabajo adjuntado, el runner se invoca para ese trabajo."
},
{
"step": "4",
"detail": "El archivo aterriza en el mismo storage donde los dumps de vzdump acaban de escribirse: <code>path/dump/</code> para Local, o el repositorio PBS configurado en la entrada de storage de PVE."
}
],
"outroBody": "El modo adjunto tiene una implicación operativa: desactivar o eliminar la tarea padre de PVE también desactiva la copia de host — no hay timer propio al que recurrir. La entrada del trabajo permanece en disco para poder re-adjuntarla más tarde."
},
"storageLayout": {
"heading": "Ficheros que componen un trabajo",
"intro": "Cada trabajo programado queda completamente descrito por tres o cuatro ficheros en disco. Consultarlos permite ver toda la configuración del trabajo sin depender de la interfaz.",
"rows": [
{
"path": "/var/lib/proxmenux/backup-jobs/JOB_ID.env",
"content": "Backend, backup ID o destino, horario (modo Nuevo) o padre PVE (modo adjunto), flag enabled, valores <code>KEEP_*</code> de retención, punteros a credenciales."
},
{
"path": "/var/lib/proxmenux/backup-jobs/JOB_ID.paths",
"content": "Una ruta absoluta por línea — la selección congelada resuelta desde el perfil en el momento de creación del trabajo. Editar el fichero re-ejecuta el trabajo con la nueva selección en el siguiente disparo del timer."
},
{
"path": "/etc/systemd/system/proxmenux-backup-JOB_ID.timer + .service",
"content": "Sólo modo Nuevo. El service invoca <code>run_scheduled_backup.sh JOB_ID</code>. El timer lo programa con <code>Persistent=true</code> (los disparos perdidos se ejecutan al siguiente arranque) y un pequeño <code>RandomizedDelaySec=120</code> para repartir carga cuando varios trabajos comparten la misma expresión OnCalendar."
},
{
"path": "script-hook de /etc/vzdump.conf",
"content": "Sólo modo adjunto. Lo instala una vez <code>hb_install_vzdump_hook</code>; casa el <code>PVE_STORAGE</code> de cada trabajo adjuntado contra el <code>$STOREID</code> que PVE pasa al script-hook."
}
]
},
"runner": {
"heading": "Qué hace un trabajo cuando se dispara",
"intro": "Cada trabajo — sea del modelo nuevo o adjunto — ejecuta la misma secuencia de tres pasos:",
"steps": [
"<strong>Preparar la copia.</strong> Lee la configuración del trabajo (destino, perfil, rutas) y ensambla el árbol de la copia siguiendo exactamente el mismo procedimiento que el flujo interactivo. El resultado es el mismo archivo que produciría una copia manual con esos ajustes.",
"<strong>Escribir en el destino.</strong> Sube o escribe la copia al destino configurado — un archivo local <code>.tar.zst</code>, un backup PBS o un archivo Borg — usando exactamente las mismas herramientas y credenciales que utilizaría una copia manual al mismo destino.",
"<strong>Aplicar retención.</strong> Elimina las copias antiguas del destino conservando los valores <code>keep-last</code> / <code>keep-daily</code> / <code>keep-weekly</code> configurados en el trabajo. La poda la realiza el propio destino: PBS mantiene la cuenta en su lado, Borg ejecuta <code>borg prune</code>, y en Local ProxMenux borra los archivos que quedan fuera del <code>keep-last</code>."
]
},
"management": {
"heading": "Gestión de trabajos",
"intro": "El menú del scheduler (TUI de Scripts) y la pestaña Backups del Monitor exponen las mismas acciones sobre cualquier trabajo.",
"rows": [
{
"action": "Run now",
"detail": "Invoca el runner de inmediato, saltándose el timer / hook de vzdump. Útil para verificar una configuración de trabajo sin esperar al siguiente disparo programado."
},
{
"action": "Enable / Disable",
"detail": "Modo Nuevo: <code>systemctl enable/disable --now</code> sobre el timer. Modo adjunto: cambia el flag <code>ENABLED</code> en el env del trabajo — el script-hook lo respeta en el siguiente disparo de PVE."
},
{
"action": "Edit",
"detail": "Reabre los prompts de destino, horario, perfil y retención y reescribe los ficheros del trabajo. Preserva el ID del trabajo."
},
{
"action": "Delete",
"detail": "Elimina el env del trabajo, el fichero de rutas, el timer + service systemd (modo Nuevo) y desactiva el binding del hook (modo adjunto). No toca los archivos ya presentes en el destino."
},
{
"action": "View log",
"detail": "Muestra en streaming <code>/var/log/proxmenux/backup-jobs/JOB_ID-YYYYMMDD_HHMMSS.log</code> — un fichero de log por ejecución. El runner también emite una línea de estado compacta a journald bajo el service systemd."
}
]
},
"notifications": {
"heading": "Notificaciones",
"body": "Cada ejecución programada dispara los mismos eventos <code>hb_notify_lifecycle</code> que el flujo interactivo (<code>start</code>, <code>complete</code>, <code>fail</code>). Si hay canales de notificación configurados en el Monitor, los trabajos desatendidos exponen sus resultados igual que las copias manuales — un usuario no necesita revisar el log para saber si un trabajo tuvo éxito."
},
"whereNext": {
"heading": "A dónde seguir",
"items": [
{
"label": "Crear copias",
"href": "/docs/backup-restore/creating-backups",
"tail": " — el flujo interactivo que comparte backend con el scheduler."
},
{
"label": "Destinos",
"href": "/docs/backup-restore/destinations",
"tail": " — configuración por backend usada tanto por el flujo interactivo como por el scheduler."
},
{
"label": "Restauración",
"href": "/docs/backup-restore/restoring",
"tail": " — el flujo que consume lo que producen los trabajos."
}
]
}
}

View File

@@ -35,6 +35,32 @@
}
]
},
"flow": {
"heading": "Diagrama Network Flow",
"intro": "Entre la fila superior y las tres tarjetas de grupos, la pestaña renderiza una vista de topología en vivo llamada <strong>Network Flow</strong>. Dibuja cada camino que un paquete puede tomar a través del host — NICs físicas en un extremo, bridges en el medio, VMs y contenedores en el otro — con pulsos animados que muestran el tráfico rx/tx en tiempo real sobre cada enlace.",
"imageAlt": "Diagrama Network Flow — NICs a la izquierda, host y bridges en el medio, VMs y LXCs a la derecha, con pulsos animados en cada conexión",
"imageCaption": "Network Flow — nodos con código de color más cometas animados cuya dirección y grosor reflejan el tráfico en vivo.",
"elementsTitle": "Qué muestra el diagrama",
"elementsIntro": "Cada nodo es una entidad del mismo inventario que usan las tarjetas de abajo, pero organizadas como topología para que las relaciones se vean de un vistazo:",
"elements": [
"<strong>NICs</strong> (ámbar) — cada interfaz física con enlace activo. Las interfaces reportadas como down se dibujan atenuadas.",
"<strong>Host</strong> (ámbar) — el propio host Proxmox, situado entre las NICs y los bridges. Renderizado como anclaje fijo; no clicable.",
"<strong>Bridges</strong> (cian) — bridges Linux y OVS. Sólo se dibujan los bridges que llevan al menos un guest activo; los bridges sin uso se ocultan para que el diagrama muestre lo que realmente mueve tráfico.",
"<strong>LXCs</strong> (cian) — contenedores en ejecución conectados a un bridge.",
"<strong>VMs</strong> (púrpura) — máquinas virtuales en ejecución conectadas a un bridge.",
"Los guests offline (VMs / contenedores parados) se ocultan."
],
"pulsesTitle": "Qué codifica la animación",
"pulsesBody": "Los cometas animados que viajan por cada arista representan tráfico en vivo:",
"pulses": [
"<strong>Dirección</strong> — un pulso que fluye hacia la NIC es <em>tx</em> del guest; hacia el guest es <em>rx</em>.",
"<strong>Grosor de trazo</strong> escala con el rate combinado rx+tx del guest. Un guest inactivo dibuja una línea animada tenue; uno con carga la dibuja gruesa.",
"<strong>Halo de la cabeza del cometa</strong> — templado hacia ~1 MB/s, caliente a ≥30 MB/s. Útil para detectar de un vistazo qué guest está dominando una NIC.",
"<strong>Click</strong> — cada nodo excepto el host es clicable y abre el mismo modal de detalle por interfaz documentado más abajo. Pulsar el host es intencionadamente un no-op — no hay modal a nivel de host en esta vista."
],
"useTitle": "Cuándo es útil",
"useBody": "Las tarjetas de grupos de abajo te dicen <em>qué</em> existe; el diagrama te dice <em>cómo está conectado</em> y por dónde fluye el tráfico ahora mismo. Patrones fáciles de ver de un vistazo: un bridge sin ningún guest activo conectado, dos guests pesados usando la misma NIC (candidato a cuello de botella), o una única VM saturando un enlace mientras el resto está tranquilo."
},
"groups": {
"heading": "Tres grupos de interfaces",
"intro": "Bajo la fila superior, tres tarjetas dividen el inventario por rol. Cada tarjeta tiene su propia insignia de recuento de activas en la cabecera. El <strong>tipo</strong> de interfaz se identifica de un vistazo mediante una insignia coloreada en cada fila:",

View File

@@ -79,13 +79,13 @@
},
{
"tool": "Log2RAM (consciente de SSD, automático)",
"what": "Detecta si el disco raíz es SSD / NVMe e instala Log2RAM desde el git upstream. Dimensiona el ramdisk según la RAM del host (128M / 256M / 512M), programa sync periódico y un auto-sync con umbral del 95 %. Ajusta los límites de journald para caber en el ramdisk.",
"what": "Reduce el desgaste del SSD/NVMe moviendo /var/log a una ramdisk tmpfs con sync periódico al disco. Se instala desde el proyecto oficial cuando el disco raíz es SSD o NVMe. Dimensiona la ramdisk según la RAM (128M / 256M / 512M), programa el sync periódico y un guardián de auto-sync que compacta al 80% y trunca los logs calientes al 92% antes de escribir. Ajusta los límites de journald para caber en la ramdisk. Detalle completo en <link>Log2RAM</link>.",
"category": "Storage",
"categorySlug": "storage"
},
{
"tool": "ZFS autotrim (solo SSD)",
"what": "Activa zpool autotrim=on en cada pool ZFS cuyos vdevs sean todos SSD/NVMe con soporte TRIM (comprueba /sys/block/<dev>/queue/rotational y discard_granularity). Los pools respaldados por HDDs se saltan automáticamente. Solo los pools realmente cambiados por ProxMenux quedan registrados para el uninstall — los pools en los que activaste autotrim a mano se dejan en paz.",
"what": "Activa zpool autotrim=on en cada pool ZFS cuyos vdevs sean todos SSD/NVMe con soporte TRIM (comprueba /sys/block/[dev]/queue/rotational y discard_granularity). Los pools respaldados por HDDs se saltan automáticamente. Solo los pools realmente cambiados por ProxMenux quedan registrados para el uninstall — los pools en los que activaste autotrim a mano se dejan en paz.",
"category": "Storage",
"categorySlug": "storage"
},

View File

@@ -25,43 +25,43 @@
"categories": [
{
"name": "Basic Settings",
"description": "Repositorios, upgrade del sistema, zona horaria, locale, utilidades comunes."
"description": "Sanea las fuentes APT, ejecuta el upgrade oficial de Proxmox y fija zona horaria, locale y utilidades básicas. Es la base sobre la que apoyan todas las demás categorías."
},
{
"name": "System",
"description": "Journald, logrotate, límites del kernel, tuning de memoria, kernel panic, reinicios rápidos."
"description": "Ajusta el subsistema de logs y los límites del kernel para un host que aloja muchas VMs y contenedores. Cubre journald, logrotate, sysctl (memoria, límites de ficheros), comportamiento en panic y reinicios rápidos."
},
{
"name": "Virtualization",
"description": "Auto-instalación de guest agent, activación de IOMMU/VFIO para passthrough de PCI."
"description": "Prepara el host para virtualización avanzada. Auto-instala el guest agent en las plantillas y activa IOMMU/VFIO para passthrough de dispositivos PCI (GPU, controladoras, TPU)."
},
{
"name": "Network",
"description": "APT sobre IPv4, tuning de sysctl de red, Open vSwitch, TCP BBR, nombres de interfaz persistentes."
"description": "Endurece y afina la pila de red del host. Fuerza APT sobre IPv4, aplica sysctl con hardening y tuning de buffers TCP, ofrece Open vSwitch y BBR, y fija nombres persistentes de interfaces por MAC."
},
{
"name": "Storage",
"description": "Dimensionado del ARC de ZFS, ZFS auto-snapshot, límites de velocidad de backups vzdump."
"description": "Configura los subsistemas de almacenamiento habituales de Proxmox: ARC de ZFS, auto-snapshots y límites de velocidad de vzdump para evitar saturar el disco durante backups."
},
{
"name": "Security",
"description": "Desactivar portmapper/rpcbind para reducir la superficie de ataque."
"description": "Reduce la superficie de ataque expuesta por defecto. Desactiva los servicios RPC (portmapper/rpcbind) que Proxmox no necesita pero deja escuchando."
},
{
"name": "Customization",
"description": "Colores y aliases de bashrc, banner MOTD, eliminación del aviso de suscripción."
"description": "Cambia la experiencia visual y de shell del host: colores y aliases en bashrc, banner MOTD y eliminación del aviso de suscripción del web UI."
},
{
"name": "Monitoring",
"description": "OVH Real-Time Monitoring (solo en servidores detectados como OVH)."
"description": "Integra el host con Real-Time Monitoring de OVH. Sólo aparece cuando ProxMenux detecta un servidor OVH."
},
{
"name": "Performance",
"description": "gzip paralelo (pigz) para compresión más rápida en backups y transferencias."
"description": "Acelera las operaciones de compresión (backups, transferencias) sustituyendo gzip por su versión paralela pigz."
},
{
"name": "Optional",
"description": "Fixes de CPU AMD, Fastfetch, Figurine, repo de Ceph, High Availability, Log2RAM."
"description": "Piezas de nicho que no todo host necesita: fixes de CPU AMD, banner Fastfetch, hostname 3D con Figurine, repositorio de Ceph, servicios de Alta Disponibilidad y Log2RAM para reducir el desgaste del SSD."
}
],
"mixTip": {

View File

@@ -136,6 +136,27 @@
"automates": "Este ajuste automatiza el siguiente proceso:",
"outro": "Tras la instalación, verás tu hostname mostrado en ASCII art 3D cada vez que hagas login, dejando claro inmediatamente con qué nodo Proxmox estás trabajando."
},
"log2ram": {
"title": "Instalar Log2RAM (reducción de desgaste en SSD/NVMe)",
"intro": "Log2RAM monta <code>/var/log</code> sobre una ramdisk tmpfs y sincroniza periódicamente el contenido al disco subyacente. En un hipervisor el churn de journald golpea el SSD del sistema cada pocos segundos; mover las escrituras a RAM reduce el desgaste y la I/O de disco sin perder logs — la sincronización periódica los vuelca a disco y un apagado limpio también los vuelca.",
"upstreamLabel": "Proyecto oficial:",
"upstreamUrl": "https://github.com/azlux/log2ram",
"upstreamLinkLabel": "azlux/log2ram en GitHub",
"doesLabel": "Qué hace ProxMenux:",
"doesItems": [
"Detecta si el disco raíz es SSD/NVMe leyendo <code>/sys/block/&lt;dev&gt;/queue/rotational</code>. En un disco rotacional el flujo Automatizado pregunta antes de instalar.",
"Clona el repositorio oficial (<code>azlux/log2ram</code>) en <code>/tmp/log2ram</code> y ejecuta su <code>install.sh</code>, luego habilita la unit systemd <code>log2ram</code>.",
"Dimensiona la ramdisk según la RAM del host: <code>≤ 8 GB → 128M</code>, <code>≤ 16 GB → 256M</code>, <code>&gt; 16 GB → 512M</code>. Escribe el valor en <code>SIZE=</code> de <code>/etc/log2ram.conf</code>.",
"Programa una sincronización periódica a disco vía <code>/etc/cron.d/log2ram</code>: cada 1h / 3h / 6h según el mismo tramo de RAM.",
"Instala un guardián de auto-sync en <code>/usr/local/bin/log2ram-check.sh</code>, conectado a <code>/etc/cron.d/log2ram-auto-sync</code> para ejecutarse cada 10 minutos. Cuando <code>/var/log</code> alcanza el 80% del tamaño de la ramdisk el guardián compacta journald; al 92% además trunca <code>pveproxy access/error</code> y <code>pveam.log</code> antes de sincronizar — el comando <code>log2ram write</code> por sí solo copia tmpfs a disco pero NO reduce la tmpfs, así que este guardián evita que PVE caiga con <em>No space left on device</em> cuando los logs crecen sin control.",
"Ajusta los límites de systemd-journald (<code>SystemMaxUse</code>, <code>RuntimeMaxUse</code>) para que quepan en la ramdisk y así una ráfaga puntual no la llene.",
"Se registra en <code>installed_tools.json</code> para poder revertirlo desde Uninstall Optimizations."
],
"howUseLabel": "Cómo se usa:",
"howUseBody": "En el flujo Automatizado Log2RAM se aplica sin intervención cuando se detecta un disco raíz SSD/NVMe. En el flujo Personalizable el script pregunta por el tamaño, el intervalo de sincronización y si activar el guardián de auto-sync al 90%.",
"verifyLabel": "Verificar y gestionar desde la shell:",
"verifyCode": "# Estado del servicio y timers configurados\nsystemctl status log2ram\nsystemctl list-timers log2ram*\n\n# Uso actual de la ramdisk — /var/log ES la tmpfs\ndf -h /var/log\n\n# Forzar sincronización ahora (tmpfs → disco); NO reduce la tmpfs\nlog2ram write\n\n# Disparar el guardián de auto-sync manualmente (compacta + sincroniza si el uso es alto)\n/usr/local/bin/log2ram-check.sh\n\n# Configuración actual: SIZE, mail, path\ncat /etc/log2ram.conf\n\n# Crons específicos de ProxMenux\ncat /etc/cron.d/log2ram /etc/cron.d/log2ram-auto-sync\n\n# Actividad reciente de Log2RAM\njournalctl -u log2ram -n 50 --no-pager"
},
"autoApplication": {
"title": "Aplicación automática",
"body": "Estas funcionalidades opcionales solo se aplican cuando se seleccionan específicamente durante el proceso post-instalación. Cada funcionalidad puede elegirse individualmente según tus necesidades y preferencias específicas."

View File

@@ -9,7 +9,7 @@
},
"intro": {
"title": "Qué cubre esta categoría",
"body": "Tres optimizaciones relacionadas con almacenamiento: tunear el tamaño de la caché <strong>ARC de ZFS</strong> a una fracción sensata de la RAM del host, instalar y programar <strong>auto-snapshots de ZFS</strong>, y eliminar throttles de <strong>vzdump</strong> para que los backups corran a máxima velocidad. Las tres son independientes — elige las que se ajusten a tu setup."
"body": "Tres optimizaciones relacionadas con almacenamiento: tunear el tamaño de la caché <strong>ARC de ZFS</strong> a una fracción sensata de la RAM del host, instalar y programar <strong>auto-snapshots de ZFS</strong>, y eliminar throttles de <strong>vzdump</strong> para que los backups corran a máxima velocidad. Las tres son independientes — elige las que se ajusten a tu setup. Una cuarta optimización cercana al almacenamiento, <link>Log2RAM</link>, reduce el desgaste del SSD/NVMe moviendo <code>/var/log</code> a una ramdisk — vive en la página Optional porque el menú Personalizable de ProxMenux la agrupa allí."
},
"notTrackedTitle": "Ninguna de estas está en el menú Uninstall",
"notTrackedBody": "A diferencia de la mayoría de optimizaciones post-instalación, las tres opciones de Almacenamiento <strong>no se registran actualmente</strong> en el flujo Uninstall Optimizations. Si las aplicas y más tarde quieres revertir, tendrás que hacerlo a mano. Los comandos manuales de rollback se muestran bajo cada sección.",
@@ -148,6 +148,11 @@
"href": "/docs/post-install/uninstall",
"tail": " — revierte cambios de ARC / vzdump."
},
{
"label": "Log2RAM",
"href": "/docs/post-install/optional#log2ram",
"tail": " — reduce el desgaste del SSD/NVMe usando una ramdisk para /var/log; documentado en Optional."
},
{
"label": "Customizable Post-Install",
"href": "/docs/post-install/customizable",

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 87 KiB