Skip to content

Backups with Proxmox Backup Server

NexoVirt covers two kinds of backups:

  • Guest backups on Proxmox Backup Server (PBS) or any other Proxmox backup storage: backup jobs, per-guest backups, browsing, restore, prune and encryption.
  • Panel backups of NexoVirt itself (database and uploaded files), under Storage & Backups → Panel backups.

All backup pages live in the Storage & Backups sidebar menu: Backup servers, Panel backups and Backup browser.

Storage & Backups → Backup servers lists each Proxmox Backup Server once, with its datastores underneath (expand a server row to see them).

  • A server is one PBS instance: name, address, port (default 8007), optional API token and the pinned TLS certificate fingerprint.
  • A datastore row is a datastore plus an optional namespace on that server. Attachments to nodes, prune policies and encryption keys belong to the datastore row, so two namespaces on the same server are managed separately.

Each datastore row shows the nodes it is attached to (as node / cluster · storage ID), an Encrypted badge when client-side encryption is on, and how the panel reaches it (see below).

You usually do not need to add anything by hand. On every inventory run, NexoVirt reads each host’s Proxmox storage configuration and creates a server and datastore entry for every pbs storage it finds. These entries carry a Discovered badge and no API token.

  • A datastore whose storage disappears from a node is detached automatically.
  • A discovered server that is no longer used anywhere, and that you never edited, is removed. A discovered datastore attached to no node (and without a key, archived key or prune policy) is removed too, and so is a discovered server left without datastores.
  • Servers you entered yourself are reused and never overwritten by discovery.
  • If a storage read fails, nothing is changed.
  1. Open Storage & Backups → Backup servers and click Add PBS.
  2. Enter a Name, the Server address (for example pbs.example.com), the Port and a Token ID (user@realm!tokenname) with its Token secret.
  3. Click Test & Discover. The panel connects to PBS and lists the available datastores and namespaces. For a self-signed certificate it fills in the Fingerprint. For a publicly trusted certificate (for example Let’s Encrypt) the field stays empty: no fingerprint is needed, so certificate renewals do not break the connection.
  4. Pick a Datastore and, optionally, a Namespace. Turn on Encrypt backups if new backups should be encrypted client-side (see Encryption).
  5. Save. Use Add datastore on the server row to add further datastores of the same server.

Import existing lists pbs storages already configured on your nodes that the panel does not manage yet, and adopts one with an optional token secret.

The token secret and the encryption key are stored encrypted. Edit on a server row changes the address or token (leave the secret blank to keep the stored one). A server can be deleted only when it has no datastores left; a datastore can be Removed only after it is detached from every node.

Attach on a datastore row creates a pbs storage on the selected node or cluster, using the pinned fingerprint (self-signed certificates only) and, if set, the encryption key. If Proxmox refuses the attach, the error message has a Details link with the exact Proxmox message. Detach a node with the × on its badge in the datastore row. Detaching asks for a fresh sign-in check.

On an encrypted datastore, a node badge reads key missing (yellow) when the encryption key is not on that node’s storage yet, for example because the node was offline during Enable encryption or Rotate key. Backups from that node are not encrypted until then. The panel installs the key automatically once the node answers (on the next inventory run or pbs:prune pass).

The Access column shows how NexoVirt talks to each datastore:

AccessMeaning
via nodeThrough a node where the storage is attached and active. No PBS token needed. Preferred whenever available.
API tokenDirectly through the PBS API with the stored token.
UnreachableNeither works: the datastore is not attached to any node, or the storage is inactive on every node (check that PBS is running and port 8007 is open).

Most actions work through a node. Garbage collect and Verify always need a PBS API token; without one the buttons are disabled and the page says so. Add a token with Edit on the server row.

Click Manage on a datastore row. The header says how the datastore is reached and offers Verify, Garbage collect, Prune, Enable encryption or Rotate key. When a server has several datastores, Switch datastore jumps between them.

  • Datastore usage: total, used and available space, plus the dedup factor when PBS reports it.
  • Snapshots: a searchable table of backups with type, ID / VMID, backup time, size, notes, verification state and protection.
  • Prune policies and, for encrypted datastores, Key history.

When the datastore is reached via a node, each snapshot row has an actions menu:

  • Restore… restores a VM or container backup as a new guest. Restore on picks the node (every node, on any host, that has this datastore attached and active, outside maintenance). The dialog suggests a VMID that is free on every host (the original VMID when it is free), offers only target storages on that node that can hold the guest’s disks, and asks for the IP address: DHCP or New IP from zone (an IP zone of the target host). The new guest never keeps the backup’s static IP, so it cannot clash with the original. A VM gets its own cloud-init snippet. A restore here never overwrites an existing guest. The restore runs as a normal provisioning job.
  • File restore… browses the files inside a backup and downloads single files. The first look can take up to a minute while the node mounts the backup.
  • Show configuration shows the guest configuration stored in the backup.
  • Edit notes… sets the backup’s notes.
  • Protect / Remove protection. Prune and delete skip protected backups.
  • Delete… removes the backup from the datastore. Not offered while the backup is protected.

Prune opens a dialog with the standard retention rules: Keep last, Keep daily, Keep weekly, Keep monthly, Keep yearly. Preview (dry-run) lists which snapshots would be kept or removed; Prune now applies the rules. Prune is applied per backup group.

Only backup groups of guests this panel manages are pruned (manually and by policies). On a datastore shared with other Proxmox setups, the preview shows the other groups as Not managed by this panel, kept, and they are never removed.

Under Prune policies, Add policy stores the same keep rules with an Interval (hours) and an Enabled switch. When reached with an API token you can also limit a policy to a namespace.

Garbage collect reclaims space from deleted backups; Verify runs a full verification of the datastore. Both start a PBS task and need a PBS API token.

Client-side encryption is set per datastore:

  • Turn on Encrypt backups when adding the datastore, or click Enable encryption on its page. A key is generated, applied to the attached nodes and shown once. From then on every backup to the attached storages is encrypted, including hand-made backup jobs on them. Store the key somewhere safe: encrypted backups cannot be restored without it.
  • Rotate key generates a new key, archives the old one and re-keys the attached node storages (best effort; failures are listed as warnings). The new key is shown once. A node that missed the new key shows key missing on the datastore row and gets the key once it answers.
  • Enable encryption, Rotate key and deleting a server or datastore ask for a fresh sign-in check.
  • Key history lists archived keys by fingerprint, Created (when the key was generated; Unknown for keys archived by older panel versions) and Retired (when it was rotated out). Key material is never shown again. Fingerprints are the ones PBS shows (proxmox-backup-client key show).
  • Restoring an older backup made before a rotation works from every restore button: the panel sees which key the backup needs and restores with the archived key. With a PBS API token it puts that key on a temporary storage (nxrk-<job>, removed afterwards), so scheduled backups keep using the active key. Without a token it swaps the key on the storage for the restore and refuses while a backup is running.

Scheduled guest backups are Proxmox datacenter backup jobs. Open them from a node page with Backup jobs. The page lists the jobs of that host (node or cluster) and New job creates one:

  • Schedule: a Proxmox calendar event such as daily, 02:00, sun 03:00, mon..fri 22:30 or */4:00 (every 4 hours). The buttons Daily 02:00, Every 4 hours and Sundays 03:00 fill the field. A simple 5-field cron expression is converted for you (0 2 * * * becomes 02:00, 30 22 * * 1-5 becomes mon,tue,wed,thu,fri 22:30, 0 */4 * * * becomes */4:00, 30 2 1 * * becomes *-*-01 02:30 = the 1st of every month). Cron with both a day of the month (or a month) and a weekday is refused, because cron and Proxmox read that combination differently; use calendar syntax for it.
  • Target storage: a storage that accepts backup content (a PBS datastore or another backup storage).
  • Guest selection: All, a Pool, or specific VMIDs.
  • Backup mode: Snapshot, Suspend or Stop.
  • Keep last, Enabled and an optional Comment.

Jobs can be edited, enabled or disabled, and deleted from the table. After a save the panel reads the job back from Proxmox and reports an error if Proxmox did not keep the change. When Proxmox refuses a job, its own reason is shown (for example vmid: invalid format). Clearing Comment or Keep last removes them from the job; other retention rules set in Proxmox (such as keep-daily) stay.

With the VMIDs selection you can choose per job which disks of each guest it backs up. Under Disks in this job, click Load disks: every disk of the listed guests appears with a checkbox. A disk that is skipped by default (its own Backup switch is off, or a container mount point without backup=1) shows normally skipped. Tick or untick what this job should take and save.

  • The choice applies only to this job. Other jobs keep each disk’s own Backup switch.
  • Proxmox has no per-job disk list, so the panel installs a small backup hook on every node of the host (the job gets Proxmox’s script option). At the start of the job the hook sets the chosen disks, and puts each disk back right after that guest’s backup and at the end of the job. A disk you change while the backup runs is left as you set it.
  • If a node crashes during a backup, its agent puts the disks back within an hour.
  • Needs the NexoVirt agent 0.27.0 or newer on every node of the host. Otherwise saving says which nodes need Update agent.
  • A job that already uses its own hook script in Proxmox cannot get a disk choice.
  • Editing a job without clicking Load disks keeps its disk choice. To remove the choice, load the disks, set every checkbox back to the disk’s default and save. Deleting the job removes the hook from every node.

Backup servers and backup jobs are in the REST API: GET/POST /pbs (add a datastore, optionally attach it to a host with attach_host_id), POST /pbs/{id}/attach|detach, GET /pbs/{id}/status|backups, and GET/POST /hosts/{id}/backup-jobs, PUT/DELETE /hosts/{id}/backup-jobs/{job} with the per-job disk choice as disks: {vmid: {disk: true|false}}. GET /hosts/{id}/backup-jobs/disks?vmids= lists each guest’s disks first.

The Backups tab on a guest’s page lists that guest’s backups across the host’s backup storages. Pick a storage and click Back up now to start a backup. From the table you can restore a backup over the guest (this overwrites its current data; you confirm by typing the VMID) or delete it. The restore puts the disks back on the guest’s current root disk storage. When a backup storage cannot be reached (PBS down, NFS share unmounted), the tab says so (“The backup server is not reachable.” for a PBS storage) instead of showing a shorter list.

A backup that is still being written shows as a dimmed row with a progress bar until it is finished, in this tab, on the PBS datastore page and in the customer’s backup list.

Customers can back up their own servers to a Proxmox Backup Server you choose, instead of using snapshots on the node’s disk.

  1. Attach a PBS datastore to the node (see Attach and detach).
  2. Under Settings > Customer portal, pick that storage in the Customer backups card for each node (only PBS storages attached to the node are offered) and turn on the portal feature Backups (globally, or per customer on the customer’s Portal section).
  3. Give servers a Backup limit: on the plan (copied when a server is created) or per server on the customer page (Servers, next to the snapshot limit). 0 turns backups off for that server.

The customer then sees Backups on the server page: Back up now, the list of their backups with size and status, Restore and Delete.

  • A full limit is refused (“Delete a backup first”); old backups are never removed automatically.
  • Backups and restores run as jobs and finish only when Proxmox finished. A restore asks the customer to type the server name, shuts the server down, restores it and starts it again if it was running. All snapshots of the server are deleted by the restore; the confirmation says so.
  • After a restore everything except the disks is set back to how it was before: CPU, memory, network, addresses, devices and the server’s firewall (rules, IP filter sets, aliases). An older backup therefore never brings back more resources, a removed address or looser firewall rules. If that cannot be done the server stays stopped and the job reports it.
  • A customer only ever sees the backups made while they owned the server. A deleted server’s backups leave the portal (they stay on the PBS until you prune them), and a reused VMID never shows them.
  • Customers of a reseller get the same feature; resellers set the backup limit on their plans.
  • Snapshots and backups are separate features with separate limits.

Customers can also see, and if you allow it restore, the backups your backup jobs make of their server. Nothing extra is stored: the panel reads the backups on every connected backup storage in the background (every 15 minutes) and shows each customer only the backups of their own server.

  1. Set Scheduled backups for the customer on the product (Shop > Products, next to Backups per server): Not shown (the default), View, View and restore or View, restore and file restore.
  2. To give one server a different level, pick it on the customer page (Servers, the Scheduled backups select under the limits). From the product follows the product.
  3. The portal feature Backups must be on for the customer.

The customer’s Backups tab then has a Scheduled backups card with the date and size of each backup, Restore and, for PBS backups with the file restore level, Files: browse the backup’s folders and download a file or a whole folder as zip.

  • A backup is shown only when the log of a backup task on this node or cluster says it wrote it, and only when it was made after the server came to its customer (created, assigned, migrated or failed over). A datastore shared with another cluster, a reused VMID or a change of owner never shows someone else’s backups. Backups from before the panel read their task stay hidden from the customer (you still see them).
  • File downloads are limited to Largest file restore download (default 2048 MB, under Settings > Customer portal > Backups), one at a time per customer, and stop while the server is locked.
  • A restore works exactly like a restore of a customer backup: typed confirmation, only the disks come back, CPU, memory, network and the firewall stay as they are now, and the server stays stopped if that cannot be done. It is refused while the server is locked, busy, moving or paused by its traffic limit.
  • A PBS backup made with an older encryption key, and a backup on a node-local storage of another node, are refused with a message to contact support. Restore those from the backup browser.
  • A new backup shows up in the portal within about 15 minutes.

Storage & Backups → Backup browser (also Browse backups on a node page) lists all backups of a host, filterable by storage and node, with Restore, Delete and Verify (Verify only for PBS backups). Restore here restores over the existing guest with the same VMID: a running guest is shut down first and started again afterwards. The job finishes only when Proxmox finished, so a failed restore shows as failed.

Storage & Backups → Panel backups backs up NexoVirt’s own data. An archive contains a dump of the panel database, writable/uploads and the uploaded images (OS template group images and the brand logo).

  • Schedule: Off (manual only), Every hour (at a minute), Every few hours (2, 3, 4, 6, 8 or 12 hours, starting at a time), Daily, Weekly (on one or more weekdays) or Monthly (on a day; day 29 to 31 runs on the last day of shorter months). Times use the panel server’s clock; the page shows the time zone and the Next backup. A backup missed while the server was off runs once when it is back. Panels that had scheduled backups on before keep running daily at 02:30.
  • Destination: Local (writable/backups), FTP or SFTP. Remote destinations take a server, port, user, remote path and password; SFTP can use a private key instead. Credentials are stored encrypted. On many providers the login starts in a home folder, so a relative path like Backups/NexoVirt is safest. An absolute path such as /Backups/NexoVirt is used as given when it exists; otherwise the panel looks for it below the login folder (on a Hetzner Storage Box: /home/Backups/NexoVirt) and creates it there when needed.
  • Keep (retention): the number of backups to keep per destination; older ones are pruned.
  • Test connection checks the values in the form without saving them (an empty password or key uses the stored one): it signs in, finds or creates the folder, and writes and deletes a small test file. The result names the folder or the server’s reason. For a new SFTP server it also shows the server’s host key fingerprint; Save trusts that key. A test never trusts a key by itself, and the saved server’s trusted key is still checked.
  • Run backup now starts a backup immediately (with every schedule, also Off).
  • Backup history lists every run with size, status and a download. A backup in progress shows as running and updates by itself; a run cut off by a crash or restart shows as failed with Interrupted.
  • Delete in the history removes that backup: the file on the panel server for a local entry, the copy on the FTP or SFTP server for a remote entry. If the remote server refuses or is not configured any more, the entry stays and the reason is shown. Failed and interrupted entries can always be deleted (a partial file is removed when one is there); a running backup cannot. Select several entries for Delete selected, or use Delete all failed; the result lists any entry that could not be deleted. Deleting and testing need a fresh sign-in check, like downloading.
  1. Download a backup from Backup history and copy it to the server.
  2. Extract it: tar -xzf nexovirt-backup-*.tar.gz.
  3. Import the database: mysql <db> < db.sql.
  4. Copy uploads/ back to writable/uploads and the contents of images/ back to public/assets/.
  5. Make sure the .env with the original encryption key is in place.

Storage & Backups → Backup coverage lists every guest with its last successful backup (from any backup job or customer backup), its age, size, storage and whether a Backup job or a Customer backup made it. Only backups a backup task of the node or cluster wrote count; a guest with only other backups (for example another cluster’s on a shared datastore) shows as Unverified. The cards on top count the guests that were never backed up, whose last backup failed, whose last backup is too old, and the protected ones. Too old after sets the age limit (default 48 hours). Filter by status, node, cluster member or owner. The page reads only what the panel collected in the background, so it opens instantly.

The alerting engine has two backup alert types:

  • Backup failed: a guest backup failed recently.
  • Backup stale: a guest’s last successful backup is older than the rule’s threshold (in hours). Guests that were never backed up are not flagged.
  • Backup coverage: one alert per guest the coverage page lists as never backed up, last backup failed or too old. Add this rule yourself; its threshold (hours) replaces the page’s age limit when set. A new guest counts as never backed up until its first backup.

NexoVirt is developed and designed by Nucez Software, your partner for custom software and web design.