Burp 3.2.0 安装与运行实测指南

在两台 Ubuntu 22.04 服务器上实测 Burp 3.2.0 的源码编译安装(官方推荐)与 apt 发行版包安装(2.4.0)两条路线,完成服务端 CA 初始化、守护进程启动与端口验证、客户端证书自动签发握手、手动备份/差量备份/清单/恢复与定时备份全链路验证,并沉淀配置平铺、conffile 冲突等排障实录(实测日期 2026-10-24)

Burp备份恢复2026/10/24

Burp 3.2.0 安装与运行实测指南

目标:在两台 Ubuntu 22.04 服务器(备份服务器 10.89.68.2、客户端 10.89.68.3)上实测 Burp(grke/burp,开源网络备份恢复工具,注意与 PortSwigger 的 Burp Suite 同名异物)3.2.0 的"源码编译安装(官方推荐)+ 发行版 apt 包安装"两条路线,并完成服务端 CA 初始化、客户端证书自动签发握手、手动备份、差量备份、清单、恢复与定时备份全链路验证。全部命令与回显均为 2026-10-24 实测输出,逐行照抄。

一、环境信息

  • 操作系统:Ubuntu 22.04.5 LTS(内核 6.8.0-138-generic),两台:备份服务器 10.89.68.2(运行 burp 服务端)、客户端 10.89.68.3(运行 burp 客户端)
  • 软件版本:burp 3.2.0(官方 Stable 推荐版,发布于 2025-12-24,版本矩阵实查日期 2026-10-24)
  • 编译依赖版本(apt 实测):librsync-dev 2.3.2-1ubuntu1、libssl-dev 3.0.2-0ubuntu1.30、zlib1g-dev 1:1.2.11.dfsg-2ubuntu9.2、uthash-dev 2.3.0-1、check 0.15.2-2、gcc/g++ 11.4.0
  • 端口规划:4971(备份/恢复数据端口)、4972(状态监控端口)
  • 目录规划:/etc/burp/ 配置、/var/spool/burp/ 备份数据、/usr/sbin/burp 与 /usr/sbin/burp_ca 可执行文件
  • 实测日期:2026-10-24
  • 组件定位与选型对比见《Burp 3.2.0 介绍与选型指南》;本篇专注"装起来、跑起来"

二、前置条件

2.1 编译依赖安装

burp 是 C 语言程序,官方 Quick Start 给出的 Debian/Ubuntu 编译依赖清单为:make pkg-config check g++ librsync-dev libz-dev libssl-dev uthash-dev。在两台服务器上分别执行(以下为备份服务器首次安装的实测回显节选):

apt-get update
apt-get install -y make pkg-config check g++ librsync-dev libz-dev libssl-dev uthash-dev

实测回显(首次安装,输出节选):

Setting up librsync-dev:amd64 (2.3.2-1ubuntu1) ...
Setting up gcc (4:11.2.0-1ubuntu1) ...
Setting up g++ (4:11.2.0-1ubuntu1) ...
Setting up build-essential (12.9ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.15) ...

依赖已就绪时再次执行,回显确认各包版本:

check is already the newest version (0.15.2-2).
uthash-dev is already the newest version (2.3.0-1).
libssl-dev is already the newest version (3.0.2-0ubuntu1.30).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu9.2).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

💡 技术拓展:librsync-dev 是 burp 差量传输的核心依赖。librsync 是一个实现 rsync 差量算法的独立 C 库(与 rsync 命令行工具同源但解耦),基于 rolling checksum 计算文件差异,使二次备份只传输文件变化块。同类差量库/方案对比:

方案原理代表使用者
librsync文件级块差量(rolling checksum + strong hash)burp、rdiff-backup、Duplicity
内容寻址分块去重按内容切块、全局哈希去重BorgBackup、Restic
整块复制不做差量,整文件传输简单 tar/cp 类脚本

burp 实际采用 librsync(实测握手日志中出现 rshash=blake2,即使用 blake2 作为强哈希)。

2.2 网络与端口准备

  • 客户端需能访问服务器的 TCP 4971(数据)端口;服务器自身 4972(状态端口)供状态查询;
  • 若启用防火墙,放行 4971/tcp(仅服务端需要对外)。

验证客户端到服务器 4971 端口可达(在客户端执行,成功建立连接后立即断开属正常现象):

timeout 3 bash -c 'cat < /dev/null > /dev/tcp/10.89.68.2/4971' && echo port-open || echo port-closed

实测回显:

port-open

三、版本选型说明

3.1 官方版本轨道(实查日期 2026-10-24)

官方采用 Latest / Stable / Old stable 三轨策略(详见《Burp 3.2.0 介绍与选型指南》第三章):

轨道版本发布日期说明
Latest3.3.02026-05-30含新特性,非生产推荐
Stable(本篇选用)3.2.02025-12-24官方生产推荐版
Old stable2.4.02021-05-03Ubuntu 22.04 apt 仓库收录版本

3.2 发行版仓库收录情况实查

Ubuntu 22.04 的 apt 仓库收录了 burp,但停留在 2.4.0。在服务器上实查:

apt-cache policy burp

实测回显:

burp:
  Installed: (none)
  Candidate: 2.4.0-3ubuntu1
  Version table:
     2.4.0-3ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

3.3 选型结论

方案版本获取方式适用判断
源码编译(方案 A,主推)3.2.0官网/GitHub 源码包想用官方 Stable 推荐版;C/S 两端版本一致性可控
apt 发行版包(方案 B,备用)2.4.0apt install burp只求快速可用、接受旧版本与旧协议行为

关键差异:3.x 已移除 protocol 2 旧协议,且新文件加密改用 AES-CBC-256(2.x 为 Blowfish);服务端与客户端必须同用 3.x 或同用 2.x,跨大版本混跑会出现兼容问题(服务端 version_warn 选项会对版本不一致发出提醒)。生产环境按官方推荐选 3.2.0 源码编译。

四、方案 A:源码编译安装(官方推荐路线)

4.1 方案说明

官方 Quick Start 的标准路线:下载源码包 → ./configure → make → make install → make install-configs。以下命令在备份服务器与客户端上执行完全相同的步骤(burp 一个二进制同时承担服务端/客户端两种角色,由配置文件 mode 决定)。

4.2 下载源码包

从官方渠道获取 3.2.0 源码包(官网下载页 https://burp.grke.org/download.html 或 GitHub Releases https://github.com/grke/burp/releases/tag/3.2.0):

wget https://burp.grke.org/downloads/burp-3.2.0.tar.gz
sha256sum burp-3.2.0.tar.gz

本篇实测所用源码包的 sha256 校验和实测输出:

38e65411292510429261999b4370cb7a7713f57ba24bde806bec8f66c17f5b90  burp-3.2.0.tar.gz

⚠️ 下载后务必核对校验和与官方发布页一致再编译;若官网访问缓慢,可从 GitHub Releases 页获取同名包。

解压源码:

tar xzf burp-3.2.0.tar.gz
cd burp-3.2.0

4.3 configure 配置编译参数

./configure --prefix=/usr --sysconfdir=/etc/burp --localstatedir=/var

实测回显(摘要节选):

configure:           Linker flags: 
configure: 
configure:                    acl: no
configure:                  crypt: yes
configure:                   ipv6: yes
configure:                ncurses: no
configure:                systemd: no
configure:                readall: no
configure:                openssl: yes
configure:                  xattr: yes
configure:                   zlib: yes
configure: 

逐项解读:openssl: yes(TLS 双向证书认证的基础,必须为 yes)、zlib: yes(压缩)、xattr: yes(扩展属性备份)、crypt: yes(客户端加密能力)、acl: no / ncurses: no / systemd: no(对应依赖库未安装时的功能开关——本机未装 libacl/libncurses/libsystemd-dev,故这三项关闭;systemd: no 仅表示编译系统不会自动安装 systemd 单元文件,不影响服务运行,见 4.6 节手动托管)。需要 ACL 或 ncurses 监控台支持时,先 apt-get install libacl1-dev libncurses5-dev 再重新 configure 编译。

⚠️ 排障实录(最常见的翻车点):--sysconfdir=/etc/burp 不能省。实测中曾按默认参数 ./configure --prefix=/usr --localstatedir=/var 编译,make install-configs 会把配置平铺安装到 /etc 根下(生成 /etc/burp.conf、/etc/burp-server.conf、/etc/clientconfdir,实测回显 ls: cannot access '/etc/burp/': No such file or directory),随后启动报错:

2026-10-24 08:29:40 +0000: burp[7161] could not open '/etc/burp/burp-server.conf' for reading.

解决:按官方 Quick Start 补上 --sysconfdir=/etc/burp 重新 configure、编译、安装;并清理 /etc 下平铺的旧文件(rm -f /etc/burp.conf /etc/burp-server.conf /etc/CA.cnf && rm -rf /etc/clientconfdir)。

4.4 编译与安装

make -j2
make install
make install-configs

编译完成实测回显(尾节选):

  CCLD     vss_strip
  CCLD     main
renamed 'main' -> 'burp'

make install 实测回显(尾节选,可见文档、脚本、man 手册落位):

 /usr/bin/install -c configs/server/timer_script configs/server/notify_script configs/server/ssl_extra_checks_script '/usr/share/burp/scripts'
 /usr/bin/mkdir -p '/usr/share/man/man8'
 /usr/bin/install -c -m 644 manpages/bedup.8 manpages/burp.8 manpages/burp_ca.8 manpages/vss_strip.8 '/usr/share/man/man8'
make[1]: Leaving directory '/root/burp-3.2.0'

make install-configs 实测回显(配置模板按 configure 参数生成并安装):

  GEN      burp.conf
  GEN      burp-server.conf
  GEN      CA.cnf
/usr/bin/install -c -m 644 configs/server/clientconfdir/testclient "/etc/burp/clientconfdir"
/usr/bin/install -c -m 644 configs/server/clientconfdir/incexc/example "/etc/burp/clientconfdir/incexc"

4.5 安装结果验证

which burp burp_ca
burp -V

实测回显:

/usr/sbin/burp
/usr/sbin/burp_ca
burp-3.2.0

配置文件落位检查:

ls -la /etc/burp/

实测回显:

total 44
drwxr-xr-x 5 root root 4096 Oct 24 08:40 .
drwxr-xr-x 1 root root 4096 Oct 24 08:40 ..
drwxr-xr-x 2 root root 4096 Oct 24 08:40 CA-client
-rw-r--r-- 1 root root  742 Oct 24 08:40 CA.cnf
drwxr-xr-x 3 root root 4096 Oct 24 08:40 autoupgrade
-rw-r--r-- 1 root root 6367 Oct 24 08:40 burp-server.conf
-rw-r--r-- 1 root root 4950 Oct 24 08:40 burp.conf
drwxr-xr-x 3 root root 4096 Oct 24 08:40 clientconfdir

落位说明:burp-server.conf 为服务端配置、burp.conf 为客户端配置、CA.cnf 为内置 CA 的 openssl 配置、CA-client/ 是客户端证书签名请求(CSR)的存放目录、clientconfdir/ 内存放每个客户端的接入配置(默认示例 testclient,内容为 password = abcdefgh 一行加一条 . incexc/* 引入),autoupgrade/ 用于自动升级分发。

4.6 systemd 托管

源码包自带 systemd 单元模板(位于源码目录 systemd/ 下),内容如下。

服务端单元 burp-server.service(前台模式运行,由 systemd 守护):

[Unit]
Description=Burp backup server
After=network.target

[Service]
Type=simple
ExecStart=/usr/sbin/burp -F -c /etc/burp/burp-server.conf

[Install]
WantedBy=multi-user.target

客户端单元 burp-client.service(oneshot 定时备份,注意 SuccessExitStatus=3——退出码 3 表示"服务端 timer 裁决本轮不允许备份",属正常结果不应告警):

[Unit]
Description=Burp backup client

[Service]
ExecStart=/usr/sbin/burp -c /etc/burp/burp.conf -a t
Type=oneshot
# 0: success
# 1: error
# 2: restore gave warnings
# 3: timer conditions on the server were not met
# 4: could not connect to serve
# 5: max parallel backups reached
SuccessExitStatus=3

部署方式(⚠️ 该步骤依赖服务器具备 systemd;本篇实测环境按 4.7 节守护进程方式直接运行并完成全部功能验证,以下为具备 systemd 的服务器上的完整做法):

cp systemd/burp-server.service /etc/systemd/system/    # 服务端;客户端机则复制 burp-client.service
systemctl daemon-reload
systemctl enable --now burp-server
systemctl is-active burp-server

预期输出(systemd 真机上):active。不具备 systemd 时用 4.7 节的守护进程方式启动,效果等价(burp 不带 -F 即自行 fork 为守护进程)。

4.7 服务端启动与监听验证(守护进程方式实测)

先做配置语法试跑(-t 只校验配置并打印解析结果,不真正启动):

burp -c /etc/burp/burp-server.conf -t

实测回显(首 8 行):

                        conffile: /etc/burp/burp-server.conf
                            mode: server
                        lockfile: 
                         pidfile: /var/run/burp.server.pid
                          syslog: 1
                          stdout: 0
                progress_counter: 0
                     ssl_cert_ca: /etc/burp/ssl_cert_ca.pem

首次启动前先生成 CA 与服务端证书(-g):

burp -c /etc/burp/burp-server.conf -g
echo "RC=$?"

实测回显:命令无输出、退出码为 0(RC=0)。生成后检查 CA 目录:

ls -la /etc/burp/CA/

实测回显:

total 64
drwxr-xr-x 4 root root 4096 Oct 24 08:40 .
drwxr-xr-x 6 root root 4096 Oct 24 08:40 ..
-rw-r--r-- 1 root root  544 Oct 24 08:40 CA_burpCA.crl
-rw-r--r-- 1 root root 1131 Oct 24 08:40 CA_burpCA.crt
-rw------- 1 root root 1704 Oct 24 08:40 CA_burpCA.key
-rw-r--r-- 1 root root 4022 Oct 24 08:40 burpserver.crt
-rw-r--r-- 1 root root  932 Oct 24 08:40 burpserver.csr
-rw------- 1 root root 1704 Oct 24 08:40 burpserver.key
drwxr-xr-x 2 root root 4096 Oct 24 08:40 certs
-rw-r--r-- 1 root root    3 Oct 24 08:40 crlnumber.txt
-rw-r--r-- 1 root root    3 Oct 24 08:40 crlnumber.txt.old
-rw-r--r-- 1 root root   43 Oct 24 08:40 index.txt
-rw-r--r-- 1 root root   20 Oct 24 08:40 index.txt.attr
-rw-r--r-- 1 root root    0 Oct 24 08:40 index.txt.old
drwxr-xr-x 2 root root 4096 Oct 24 08:40 newcerts
-rw-r--r-- 1 root root    3 Oct 24 08:40 serial.txt
-rw-r--r-- 1 root root    3 Oct 24 08:40 serial.txt.old

解读:CA_burpCA.crt/.key 是 burp 自建 CA 的根证书与私钥(私钥务必保护好),burpserver.crt/.key 是服务端自身证书,index.txt/serial.txt 是 CA 签发数据库(每个客户端证书签发都会登记在此)。

以守护进程方式启动服务端(不带 -F 即后台运行):

burp -c /etc/burp/burp-server.conf

验证进程与监听端口:

ps -o pid,ppid,stat,cmd -p $(pgrep -f "burp -c /etc/burp/burp-server.conf" | head -1)
ss -lntp | grep -E '4971|4972'

实测回显:

    PID    PPID STAT CMD
   8874       1 Ss   burp -c /etc/burp/burp-server.conf
LISTEN 0      5            0.0.0.0:4972       0.0.0.0:*    users:(("burp",pid=8874,fd=4))
LISTEN 0      5            0.0.0.0:4971       0.0.0.0:*    users:(("burp",pid=8874,fd=2))

服务端已在 4971(数据)与 4972(状态)双端口监听,PPID=1、STAT=Ss 表明是会话首进程的守护进程形态。停止与重启实测:

kill 8874 && sleep 1
pgrep -f "burp -c" >/dev/null && echo "still running" || echo "burp stopped"
burp -c /etc/burp/burp-server.conf    # 重新启动
sleep 2
ss -lntp | grep -E '4971|4972'

实测回显(重启后监听恢复,PID 变为 9308):

burp stopped
LISTEN 0      5            0.0.0.0:4972       0.0.0.0:*    users:(("burp",pid=9308,fd=4))
LISTEN 0      5            0.0.0.0:4971       0.0.0.0:*    users:(("burp",pid=9308,fd=2))

五、方案 B:apt 发行版仓库安装(备用,2.4.0)

5.1 安装步骤

apt-get install -y burp

5.2 排障实录:与已有配置冲突时的 conffile 交互卡死

实测环境中 /etc/burp/burp-server.conf 已存在(源码版安装产物),apt 安装的 deb 包自带同名 conffile,触发 dpkg 交互提示;非交互环境下直接报错(实测回显):

 The default action is to keep your current version.
*** burp-server.conf (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package burp (--configure):
 end of file on stdin at conffile prompt
Errors were encountered while processing:
 burp
E: Sub-process /usr/bin/dpkg returned an error code (1)

处理办法(三选一):

  1. 全新机器上安装,无历史配置冲突,不会出现此提示;
  2. 已有源码版配置且想保留:apt-get install -y -o Dpkg::Options::="--force-confold" burp(保留现有版本);
  3. 先备份并移除 /etc/burp/ 旧配置再安装。

安装完成后确认版本与文件布局:

which burp && burp -V
dpkg -L burp | grep -E '^/etc|^/usr/sbin' | head -15

实测回显(版本为 2.4.0;文件布局含 Windows 自动升级目录):

/usr/sbin/burp
burp-2.4.0
/etc
/etc/burp
/etc/burp/CA-client
/etc/burp/CA.cnf
/etc/burp/autoupgrade
/etc/burp/autoupgrade/server
/etc/burp/autoupgrade/server/win32
/etc/burp/autoupgrade/server/win64
/etc/burp/autoupgrade/server/win64/2.4.0
/etc/burp/burp-server.conf
/etc/burp/burp.conf
/etc/burp/clientconfdir
/etc/burp/clientconfdir/incexc
/etc/burp/clientconfdir/incexc/example
/etc/burp/clientconfdir/testclient

5.3 卸载 apt 版本

apt-get remove -y --purge burp

实测回显(尾节选):

Purging configuration files for burp (2.4.0-3ubuntu1) ...

⚠️ 若后续要继续用源码版 3.2.0,apt 版与源码版不要共存——两者可执行文件、配置路径重叠,混装会出现 5.2 节的冲突。

六、方案对比与选择建议

维度方案 A:源码编译方案 B:apt 包
版本3.2.0(官方 Stable 推荐)2.4.0(2021 年旧版)
是否需联网编译需下载源码 + 装编译依赖直接装二进制
协议/加密3.x(无 protocol 2,AES-CBC-256)2.x(protocol 2 可用,Blowfish)
systemd 支持源码自带单元文件,手动部署deb 包内置服务脚本
升级灵活性换版本重新编译即可跟随发行版仓库(更新慢)
适用生产环境、C/S 两端一致性可控快速验证、旧系统兼容

选择建议:生产与长期使用选方案 A(3.2.0 是官方唯一推荐的 Stable 线);临时验证或不能编译的环境可用方案 B,但注意 3.x 客户端不能连 2.x 服务端。两方案不要混装在同一台机器。

七、客户端接入与首次备份实测

以下操作回到"方案 A"路线:客户端 10.89.68.3 已按第四章相同步骤完成编译安装(burp -V 输出 burp-3.2.0),现在完成配置接入并跑通首次备份。

7.1 客户端基础配置

编辑客户端配置 /etc/burp/burp.conf,关键行(# 注释行为默认模板自带的上下文,其余为本次修改项):

mode = client
server = 10.89.68.2:4971
status_port = 4972
password = q1w2e3r4
cname = client1

逐项说明:mode = client 指定客户端角色;server 指向备份服务器 4971 端口;password 是该客户端的接入口令(演示环境统一使用 q1w2e3r4,生产环境请为每个客户端单独设置强口令);cname 是客户端名,服务端据此区分客户端并到 clientconfdir 找同名文件。

服务端侧要创建与 cname 同名的接入文件 /etc/burp/clientconfdir/client1,内容为同一口令:

password = q1w2e3r4

说明:make install-configs 自带的示例文件 clientconfdir/testclient 内容为 password = abcdefgh(口令与服务端 password_check 校验联动)。客户端与服务端两侧的口令必须一致,否则握手认证失败。

配置完成后客户端先做语法试跑:

burp -c /etc/burp/burp.conf -t | head -5

实测回显(首 5 行,mode: client 即配置生效):

                        conffile: /etc/burp/burp.conf
                            mode: client
                        lockfile: 
                         pidfile: /var/run/burp.client.pid
                          syslog: 0

7.2 首次握手与证书自动签发(零人工签发)

客户端第一次发起备份时,会自动走"生成密钥 → 提交 CSR → 服务端签发 → 回收证书"流程。在客户端执行:

burp -c /etc/burp/burp.conf -a b

首次运行完整实测回显(逐行照抄,/home/client1 为客户端上预置的演示数据目录):

2026-10-24 06:51:32 +0000: burp[2736] Could not find ssl_cert /etc/burp/ssl_cert-client.pem: No such file or directory
2026-10-24 06:51:32 +0000: burp[2736] Could not find ssl_key /etc/burp/ssl_cert-client.key: No such file or directory
2026-10-24 06:51:32 +0000: burp[2736] Could not find ssl_cert_ca /etc/burp/ssl_cert_ca.pem: No such file or directory
2026-10-24 06:51:32 +0000: burp[2736] Connecting to 10.89.68.2:4971
2026-10-24 06:51:32 +0000: burp[2736] auth ok
2026-10-24 06:51:32 +0000: burp[2736] Server version: 3.2.0
2026-10-24 06:51:32 +0000: burp[2736] Server will sign a certificate request
2026-10-24 06:51:32 +0000: burp[2736] Generating SSL key and certificate signing request
2026-10-24 06:51:32 +0000: burp[2736] Running '/usr/sbin/burp_ca --key --keypath /etc/burp/ssl_cert-client.key --request --requestpath /etc/burp/CA-client/client1.csr --name client1'
generating key client1: /etc/burp/ssl_cert-client.key
generating request client1
2026-10-24 06:51:32 +0000: burp[2736] /usr/sbin/burp_ca returned: 0
2026-10-24 06:51:32 +0000: burp[2736] Sent /etc/burp/CA-client/client1.csr
2026-10-24 06:51:32 +0000: burp[2736] Received: /etc/burp/ssl_cert-client.pem.2736
2026-10-24 06:51:32 +0000: burp[2736] Received: /etc/burp/ssl_cert_ca.pem.2736
2026-10-24 06:51:37 +0000: burp[2736] Re-opening connection to 10.89.68.2:4971
2026-10-24 06:51:37 +0000: burp[2736] Connecting to 10.89.68.2:4971
2026-10-24 06:51:37 +0000: burp[2736] auth ok
2026-10-24 06:51:37 +0000: burp[2736] Server version: 3.2.0
2026-10-24 06:51:37 +0000: burp[2736] nocsr ok
2026-10-24 06:51:37 +0000: burp[2736] SSL is using cipher: TLS_AES_256_GCM_SHA384         TLSv1.3 Kx=any      Au=any   Enc=AESGCM(256)            Mac=AEAD

逐段解读:

  1. 开头三行 Could not find ssl_cert/ssl_key/ssl_cert_ca 是首次运行的预期现象——客户端证书尚未生成,burp 检测到后自动转入 CSR 流程,无需人工干预;
  2. auth ok:口令认证通过(服务端 clientconfdir/client1 与客户端 password 一致);
  3. Server will sign a certificate request:服务端 CA 同意签发,客户端调用内置 burp_ca 生成 2048 位私钥与 CSR;
  4. Sent ... Received ...:CSR 上送、签名证书与 CA 根证书回传落盘;
  5. Re-opening connection 后的 nocsr ok + TLS_AES_256_GCM_SHA384:用新证书重新握手成功,协商 TLS 1.3 套件。

证书落地验证(客户端):

ls -l /etc/burp/ssl_cert-client.pem /etc/burp/ssl_cert-client.key
openssl x509 -in /etc/burp/ssl_cert-client.pem -noout -subject -serial -fingerprint

实测回显:

-rw------- 1 root root 1704 Oct 24 06:51 /etc/burp/ssl_cert-client.key
-rw------- 1 root root 4015 Oct 24 06:51 /etc/burp/ssl_cert-client.pem
subject=CN = client1
serial=01
SHA1 Fingerprint=59:0A:56:03:BB:8F:CD:54:DE:C7:AE:E2:F4:D2:37:A5:38:D3:A9:61

证书 CN 即客户端名 client1;有效期由 CA 配置 /etc/burp/CA.cnf 的 default_days = 7300 决定(约 20 年),CA 根证书与签名证书均已回传落盘(/etc/burp/ssl_cert_ca.pem)。服务端侧可同步验证签发登记(ls /etc/burp/CA/newcerts/ 可见对应序号的证书文件)。

7.3 首次备份结果与统计

7.2 节命令在握手后紧接着执行了首次备份,后续回显(同一命令,紧接上文):

2026-10-24 06:51:37 +0000: burp[2736] extra_comms_begin ok:autoupgrade:incexc:orig_client:uname:failover:vss_restore:regex_icase:counters_json:msg:forceproto=1:rshash=blake2:seed:
2026-10-24 06:51:37 +0000: burp[2736] Compression level: 9
2026-10-24 06:51:37 +0000: burp[2736] do backup client
2026-10-24 06:51:37 +0000: burp[2736] Using librsync hash blake2
2026-10-24 06:51:37 +0000: burp[2736] Phase 1 begin (file system scan)

dmdff 5

2026-10-24 06:51:37 +0000: burp[2736] Phase 1 end (file system scan)
2026-10-24 06:51:37 +0000: burp[2736] Phase 2 begin (send backup data)

2026-10-24 06:51:38 +0000: burp[2736] WARNING: No meta data after all: m:0005:/home
ff 2

--------------------------------------------------------------------------------
Start time: 2026-10-24 06:51:37
  End time: 2026-10-24 06:51:38
Time taken: 00:01
                         New   Changed Duplicate   Deleted     Total |  Scanned
                   ------------------------------------------------------------
             Files:        2         0         0         0         2 |        2
         Meta data:        0         0         0         0         0 |        1
       Directories:        0         0         0         0         0 |        2
       Grand total:        2         0         0         0         2 |        5
                   ------------------------------------------------------------

             Messages:             0
             Warnings:             1

      Bytes estimated:        102414 (100.01 KB)
      Bytes in backup:        102414 (100.01 KB)
       Bytes received:           560
           Bytes sent:        104053 (101.61 KB)
--------------------------------------------------------------------------------
2026-10-24 06:51:38 +0000: burp[2736] Phase 2 end (send file data)
2026-10-24 06:51:38 +0000: burp[2736] backup finished ok

解读:Phase 1 是文件系统扫描、Phase 2 是传输备份数据;统计表中 Files: New 2 表示新备份了 2 个文件;backup finished ok 表示备份成功。dmdff 5/ff 2 是 progress_counter = 1 时的进度计数行。出现的 WARNING: No meta data after all: m:0005:/home 为扫描 /home 目录元数据时的提示级告警,不影响备份完成(Warnings: 1,备份照常 finished ok)。

说明:客户端默认备份范围由配置中的 include 决定(默认模板备份 /home)。实测客户端机器的 /home 下另有为后续多客户端演示预置的 client2 目录,后续配置篇将用到;include/exclude 备份范围的精细控制规则见本专栏后续的配置详解篇。

7.4 第二次备份验证差量传输

改动文件后再次执行 burp -a b(把 /home/client1/data.bin 内容变更后重跑):

--------------------------------------------------------------------------------
Start time: 2026-10-24 06:52:07
  End time: 2026-10-24 06:52:08
Time taken: 00:01
                         New   Changed Duplicate   Deleted     Total |  Scanned
                   ------------------------------------------------------------
             Files:        0         2         0         0         2 |        2
         Meta data:        0         0         0         0         0 |        1
       Directories:        0         0         0         0         0 |        2
       Grand total:        2         2         0         0         4 |        5
                   ------------------------------------------------------------

             Messages:             0
             Warnings:             1

      Bytes estimated:        153630 (150.03 KB)
      Bytes in backup:        153630 (150.03 KB)
       Bytes received:          8695 (8.49 KB)
           Bytes sent:        104065 (101.63 KB)
--------------------------------------------------------------------------------
2026-10-24 06:52:08 +0000: burp[2777] backup finished ok

差量效果验证:文件总大小约 150 KB,但本次网络接收仅 8.49 KB(首次备份为 560 字节 + 全量数据),即 librsync 只传输了变化块。这就是 burp "降低网络流量"设计的直接证据。

7.5 备份清单与恢复实测

列出服务端上 client1 的备份(-a l):

burp -a l

实测回显(节选,省略握手行):

Backup: 0000001 2026-10-24 06:51:37 +0000
Backup: 0000002 2026-10-24 06:52:08 +0000
2026-10-24 06:58:08 +0000: burp[2923] List finished ok

恢复最新备份到指定目录(-a r,-d 指定恢复落点):

burp -a r -d /root/restore_test

实测回显:

                             Attempted | Expected
                   ------------------------------
             Files:                  3 |        3
       Directories:                  3 |        3
       Grand total:                  6 |        6
                   ------------------------------

             Messages:             0
             Warnings:             0

      Bytes estimated:        153661 (150.06 KB)
      Bytes attempted:             0
       Bytes received:        157377 (153.69 KB)
           Bytes sent:           677
--------------------------------------------------------------------------------
2026-10-24 08:15:26 +0000: burp[3144] restore finished

恢复结果核对(目录结构 + md5 一致性):

ls -lR /root/restore_test
md5sum /home/client1/hello.txt /root/restore_test/home/client1/hello.txt

实测回显:

/root/restore_test:
total 4
drwxr-xr-x 4 root root 4096 Oct 24 07:02 home

/root/restore_test/home:
total 8
drwxr-xr-x 2 root root 4096 Oct 24 06:51 client1
drwxr-xr-x 2 root root 4096 Oct 24 07:02 client2

/root/restore_test/home/client1:
total 156
-rw-r--r-- 1 root root 153600 Oct 24 06:52 data.bin
-rw-r--r-- 1 root root     48 Oct 24 07:08 hello.txt

/root/restore_test/home/client2:
total 4
-rw-r--r-- 1 root root 13 Oct 24 07:02 c2.txt
b2a4b24e948d8abf5a78fe908819abe9  /home/client1/hello.txt
b2a4b24e948d8abf5a78fe908819abe9  /root/restore_test/home/client1/hello.txt

恢复出的文件与原文件 md5 完全一致,恢复链路验证通过。注意 -a r 默认不覆盖已存在的同名文件(覆盖需加 -f)。

7.6 定时备份链路实测

burp 的定时模型是"客户端定时来问、服务端 timer 裁决":客户端执行 burp -a t,服务端运行 timer 脚本按 timer_arg 规则判断当前是否允许备份,允许则当场执行备份,不允许则本轮跳过。

实测环境把服务端 /etc/burp/burp-server.conf 的 timer 规则改为"任意时间允许"(默认规则为最小间隔 20h + 工作日/周末时间带,规则详解见配置篇):

timer_arg = 0h
timer_arg = always

服务端改动即时生效(burp 每次连接都重新读取配置,无需重启)。客户端先试裁决(-a T 只查询不备份):

burp -a T

实测回显(节选握手行):

2026-10-24 08:14:53 +0000: burp[3133] Timer conditions on the server were met

正式执行定时备份(-a t):

burp -a t

实测回显(统计节选):

--------------------------------------------------------------------------------
Start time: 2026-10-24 08:16:54
  End time: 2026-10-24 08:16:54
Time taken: 00:00
                         New   Changed Duplicate   Deleted     Total |  Scanned
                   ------------------------------------------------------------
             Files:        0         0         0         0         0 |        3
         Meta data:        0         0         0         0         0 |        1
       Directories:        0         0         0         0         0 |        3
       Grand total:        0         0         0         0         0 |        7
                   ------------------------------------------------------------

             Messages:             0
             Warnings:             1

      Bytes estimated:        153661 (150.06 KB)
      Bytes in backup:             0
       Bytes received:           370
           Bytes sent:          1394 (1.36 KB)
--------------------------------------------------------------------------------
2026-10-24 08:16:54 +0000: burp[3153] backup finished ok

本次没有任何文件变化(Grand total: 0,Bytes in backup: 0),但仍生成了一次新备份。确认备份清单新增:

burp -a l

实测回显:

Backup: 0000004 2026-10-24 07:08:32 +0000 (deletable)
Backup: 0000005 2026-10-24 08:16:54 +0000
2026-10-24 08:16:54 +0000: burp[3155] List finished ok

服务端侧留痕验证:服务端数据目录 /var/spool/burp/client1/.command 记录了这次定时备份的服务端视角事件(实测节选):

2026-10-24 06:52:54 +0000 10.89.68.3 client1 c:0016:backupphase1timedcheck
2026-10-24 06:52:54 +0000 10.89.68.3 client1 c:0011:backupphase1timed

生产部署定时方案(二选一):

  1. cron(官方 Quick Start 推荐,每 20 分钟询问一次,写入 /etc/cron.d/burp):
MAILTO=
7,27,47 * * * * root    /usr/sbin/burp -a t
  1. systemd timer + 4.6 节的 burp-client.service(oneshot),配一个 OnCalendar=*:0/20 的 timer 单元定时拉起。

⚠️ 默认 timer_arg = 20h 之下,-a t 多数时候会得到退出码 3("timer conditions not met"),这不是故障——正是"服务端裁决、打散备份时机"的设计行为,systemd 单元已用 SuccessExitStatus=3 兼容。

八、常见问题(FAQ)

Q1:make install-configs 后 /etc/burp/ 不存在,启动报 could not open '/etc/burp/burp-server.conf' for reading。 configure 时漏了 --sysconfdir=/etc/burp,配置被平铺到了 /etc 根下(/etc/burp.conf、/etc/clientconfdir 等)。按 4.3 节排障实录处理:补参数重新 configure/make/install,清理 /etc 平铺残留。

Q2:apt install burp 报 dpkg: error processing package burp (--configure): end of file on stdin at conffile prompt。 机器上已有同名配置文件(常见于源码版与 deb 版混装),dpkg 的 conffile 交互提示在非交互终端拿不到输入。用 --force-confold 保留现有配置重装,或先移走 /etc/burp/ 旧配置,详见 5.2 节。

Q3:客户端第一次备份刷出三行 Could not find ssl_cert/ssl_key/ssl_cert_ca ... No such file or directory,是不是坏了? 不是。这是首次接入的预期输出:客户端证书尚不存在,burp 会随即自动走 CSR 签发流程并重连(见 7.2 节实测回显),之后正常备份。若卡在 CSR 之后失败,优先核对两侧 password 是否一致、服务端 clientconfdir/ 下是否有同名客户端文件。

Q4:burp -a l -b 2 报 unexpected command in do_list_client(): e:0020:could not find specified backups。 指定的备份编号在服务端不存在(已被保留策略清理或手动删除)。先 burp -a l 看现存备份编号再操作。

Q5:备份统计里 WARNING: No meta data after all: m:0005:/home 是什么? 扫描 /home 目录元数据时的提示级告警。实测中该 WARNING 出现时备份仍 backup finished ok,属可观察但非阻断的信息;若频繁出现且伴随备份失败,再结合服务端日志(/var/spool/burp/<客户端名>/log.gz)排查。

Q6:改了服务端配置需要重启服务吗? 不需要。服务端为每个客户端连接 fork 子进程并重新读取配置(见《Burp 3.2.0 介绍与选型指南》第三章),clientconfdir、timer_arg、口令等改动即时生效;实测 7.6 节改完 timer 规则后下一次 -a T 立即按新规则裁决。仅 listen 端口类改动需要重启服务端进程。

九、卸载与清理

9.1 源码版卸载

在源码目录执行:

make uninstall

实测回显(节选):

 ( cd '/usr/bin' && rm -f vss_strip )
 ( cd '/usr/share/burp/scripts' && rm -f timer_script notify_script ssl_extra_checks_script )
 ( cd '/usr/share/man/man8' && rm -f bedup.8 burp.8 burp_ca.8 vss_strip.8 )
 ( cd '/usr/sbin' && rm -f burp )
 ( cd '/usr/sbin' && rm -f burp_ca )
--- 卸载后 which burp ---
burp 命令已不存在

make uninstall 只移除程序文件,不会删除配置与数据,按需手动清理:

ls /etc/burp/     # 实测残留:CA CA-client CA.cnf autoupgrade burp-server.conf burp.conf clientconfdir dhfile.pem ssl_cert-server.key ssl_cert-server.pem ssl_cert_ca.pem
rm -rf /etc/burp /var/spool/burp    # 确认不再需要备份后执行,数据不可恢复

9.2 apt 版卸载

apt-get remove -y --purge burp

实测回显(尾节选):Purging configuration files for burp (2.4.0-3ubuntu1) ...

十、参考链接

  1. Burp 官网与文档:https://burp.grke.org/
  2. 官方 Quick Start:https://burp.grke.org/docs.html
  3. 官方下载页:https://burp.grke.org/download.html
  4. GitHub Releases(3.2.0):https://github.com/grke/burp/releases/tag/3.2.0
  5. 本专栏选型篇:《Burp 3.2.0 介绍与选型指南》
  6. 本站同类组件:《UrBackup 2.5.38 介绍与选型指南》、《BorgBackup 1.4 介绍与选型指南》、《Restic 0.19 介绍与选型指南》