惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
B
Blog
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
量子位
博客园 - 叶小钗
T
Tailwind CSS Blog
小众软件
小众软件
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Blog — PlanetScale
Blog — PlanetScale
V
V2EX
博客园_首页
I
InfoQ
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog

Proxmox Support Forum

[SOLVED] - Github Auth for Mirrors-Kernel Repo? [Automation] Mass migration tool for MS Win11/Server Proxmox GUI hang - not response is it possible to reject or quarantine spam based on conditions I set ? The PVENode task list in PVE9 is partially obscured due to the terminal font being too large. About 100% error reporting due to pveproxy.service hooks Kubernetes overlay networking breaks when upgrading from PVE 9.1 to PVE 9.2.3 Zentraler Speicher No space left on device Combine datastore and direct file archival to tape Kernel panic VFS: Unable to mount root fs on unknown-block (0,0) sobald ein 7.x Kernel verwendet wird. How to migrate disk of a VM from one ZFS to another Windows Server 2025 fails to boot after PVE 9.2 / Linux 7.0 Kernel upgrade Cannot Install Proxmox on T610 Poweredge with H700 PERC card sdn Config. gateway not reachable How to safely change domain/FQDN? Welche Filterquote erreicht ihr? NFS Share status unknown on 2 of 5 nodes Can't connect to PVE9 consoles [solved] Can't connect to PVE9 consoles [solved] [SOLVED] - Use secondary network for PVE commands Created cluster, one node storage gone BUG: proxmox mail gateway FROM = null bypass spam filtering Moving existing PBS from VMWare workstation to PVE cluster Does eBGP SDN fabric support external peering? Bug: PDM 1.1 not recognizing valid license status Proxmox GUI hang - not response PVE crashes unexpectedly Proxmox Backup Server 4.2 released! Advice
proxmox backup client only one file
invalid@exam · 2026-06-27 · via Proxmox Support Forum

Hello.
Can proxmox backup client backup files? there is a need to backup one large file. The file name changes every day. I did not find it in the documentation. Thank you

Not tested it but should be possible. Did you try to point the PBS client to a specific file instead of a folder?
If that is not working the PBS client got exclude filters which can be inverted so you can specify to only backup specific files matching a glob pattern.

Yes. I can specify a client PBS file instead of a folder.
1644224006758.png

Sorry for reopening an old thread. But apparently this doesn't work anymore in PBS 3.1, making me think that the feature has been intentionally disabled.

Code:

# proxmox-backup-client backup archive.pxar:/etc/hostname --repository 'backup@pbs!pbs-client-test@pbs-server.test.local:localrepo'
Error: got unexpected file type (expected directory)

whereas backing up the whole /etc directory with the above command works fine.

if you want to backup a single file, you need to do so as "image"/fixed-size index, not "host"/dynamic-sized index. in your example, instead of NAME.pxar:/etc/hostname you'd need to use NAME.img:/etc/hostname, or, for small files, NAME.conf:/etc/hostname (the last one is not chunked at all, but stored as-is in the snapshot dir as "blob", like the guest/firewall configs are in case of a PVE CT/VM backup).

@fabian - thank you! That nugget of information saved the day for me, as I was banging my head against a wall trying to use multiple --exclude options. Should these not be clearly explained in the Backup Client Usage page?

I guess the last example there is confusing since it refers to block devices, but it's actually a "raw single file" mode that works for block devices, image files, or any other file you want to back up on its own :)

Almost 3 years later, this does not seem to be well documented.

Here are three suggestions that might steer people in the correct direction.

Suggestion 1 - Terminology page

https://pbs.proxmox.com/docs/terminology.html

Section names are:

Image Archives: <name>.img
[...]

File Archives: <name>.pxar
[...]

Binary Data (BLOBs)
[...]

Suggestion:

Image Archives: <name>.img
[...]

File Archives: <name>.pxar
[...]

Binary Data (BLOBs): <name>.conf / <name>.log
[...]

Suggestion 2 - Backup Client Usage page

https://pbs.proxmox.com/docs/backup-client.html#creating-backups

There is no mention of the .conf/.log types. There is only one mention of the .img type, which refers to block devices only.

The archive-name must contain alphanumerics, hyphens and underscores only. Common types are .pxar for file archives and .img for block device images. To create a backup of a block device, run the following command:

# proxmox-backup-client backup mydata.img:/dev/mylvm/mydata

Suggestion: mention that .img files may be used for regular files too. And also that .conf/.log files may be used for files < 16 MB (as per "Terminology" page).

Suggestion 3 - Command syntax page / Man page

No mention of the difference between formats. Suggestion:

Code:

proxmox-backup-client backup {<backupspec>} [OPTIONS]

Create (host) backup.

<backupspec>: string
  List of backup source specifications: [<archive-name>.<type>:<source-path>] ...

  The 'archive-name' must only contain alphanumerics, hyphens and
  underscores while the 'type' must be either 'pxar', 'img', 'conf'
  or 'log'. Can be specified more than once.
    pxar: Proxmox File Archive Format (stores a full directory tree)    ********
    img: image archive (VM images and other large binary data)          ********
    conf/log: smaller (< 16MB) binary data (eg: config and log files)   ********

The suggestion are the lines marked with `********` above.

Extra - Logic above in bash

This is how I implemented the logic above in my ansible bash jinja2 template. I pass only the paths, regardless of what they are (directory, small file, huge file), and it translates to the proper PBS type (pxar, img, conf, log).

Bash:

#!/bin/bash
set -Eeuo pipefail

set -a
source /etc/pbs-client/env
set +a

HOSTNAME_SHORT="$(hostname -s)"

PATHS=()
{% for path in pbs_backup_paths %}
PATHS+=( "{{ path }}" )
{% endfor %}

ARGS=()
for dest in "${PATHS[@]}"; do

    # The 'archive-name' must only contain alphanumerics, hyphens and
    # underscores.
    name=$(basename "$dest" | sed 's/[^A-Za-z0-9_-]/_/g')

    # Determination of data type. References:
    #   https://forum.proxmox.com/threads/proxmox-backup-client-only-one-file.104437/
    #   https://pbs.proxmox.com/docs/backup-client.html#creating-backups
    #   https://pbs.proxmox.com/docs/command-syntax.html#proxmox-backup-client
    #   https://pbs.proxmox.com/docs/terminology.html

    if ! [ -e "$dest" ]; then
        echo "Warning: $dest does not exist, skipping" >&2
        continue

    elif [ -d "$dest" ]; then
        # pxar: Proxmox File Archive Format (stores a full directory tree)
        type="pxar"

    elif [ -f "$dest" ]; then
        size=$(stat -c%s "$dest")
        if [ "$size" -lt $((16 * 1024 * 1024)) ]; then
            # conf/log: smaller (< 16MB) binary data (eg: config/log files)
            # we trim the suffix, if possible, to avoid *_conf.conf and *_log.log in the server
            if [[ $dest == *.log ]]; then
                if [[ $name != _log ]]; then
                    name=${name%_log}
                fi
                type="log"
            else
                if [[ $dest == *.conf && $name != _conf ]]; then
                    name=${name%_conf}
                fi
                type="conf"
            fi
        else
            # over 16MB, docs don't recommend blob
            type="img"
        fi
    elif [ -b "$dest" ]; then
        # img: image archive (VM images and other large binary data)
        type="img"
    else
        echo "Error: $dest is unknown path type" >&2
        exit 1
    fi

    ARGS+=("${name}.${type}:${dest}")
done

proxmox-backup-client backup \
    "${ARGS[@]}" \
    --backup-id "${HOSTNAME_SHORT}"