Fingerprint mis-match

crudolphy

Member
Dec 28, 2022
6
2
8
69
Conroe, Texas, USA
Due to a drive failure I had to replace the drive and re-install PBS. I have several bash scripts that utilize the PBS Backup Client to backup some directories to the PBS server. See below for an example of the script:

Bash:
# This script will use the proxmox-backup-client on crud-04 (T320)
# to backup the zfs pool /tank/chris.
# name of this script is chrisbu.sh and it is placed in the home directory of the
# root user on crud-04 (T320).

#! /bin/bash

PBS_PASSWORD='<password>'
PBS_FINGERPRINT='<Long PBS Fingerprint>'

export PBS_PASSWORD
export PBS_FINGERPRINT

proxmox-backup-client login --repository <someuser>@pam@<FQDN>:clients

proxmox-backup-client backup chris.pxar:/tank/chris \
--repository <someuser>@pam@<FQDN>:clients --ns crud-04-tank-chris

If I run the script from the backup clients command line it runs fine and backs up.

Rather than using Cron I created a systemd service file to run this script. Along with it I created a systemd timer file to schedule it to run at a specific time.

The systemd service file looks like this.
Code:
[Unit]
Description=script to backup /tank/chris with proxmox-backup-client
After=network.target

[Service]
Type=oneshot
User=<someuser>
ExecStart=/bin/bash /usr/local/bin/chrisbu.sh
ExecStart=/bin/bash /usr/local/bin/chrisbulog.sh
WorkingDirectory=/usr/local/bin
 

[Install]
WantedBy=multi-user.target

This all ran fine and regularly backed up what I wanted backed up until I reinstalled PBS server. When I reinstalled PBS server it created a new fingerprint. I copied this fingerprint into each of the scripts. If I run the script directly from the command line it runs fine and completes the backup successfully. If I try to run the service file from systemd as follows:

Bash:
systemctl start chrisbu.service

It fails with this error message:

Code:
WARNING: certificate fingerprint does not match expected fingerprint!
May 25 08:20:01 crud-04 bash[953671]: expected:    21:67:27:63:3c:e5:73:72:4f:10:12:76:7d:96:37:4d:c8:0d:65:46:98:f6:02:9c:99:97:7d:e1:11:53:91:a9

The "expected" fingerprint is the old fingerprint thus the mis-match.

Can someone tell me how to correct this so that my systemd service unit will run?

Regards
Chuck
 
Due to a drive failure I had to replace the drive and re-install PBS. I have several bash scripts that utilize the PBS Backup Client to backup some directories to the PBS server. See below for an example of the script:

Bash:
# This script will use the proxmox-backup-client on crud-04 (T320)
# to backup the zfs pool /tank/chris.
# name of this script is chrisbu.sh and it is placed in the home directory of the
# root user on crud-04 (T320).

#! /bin/bash

PBS_PASSWORD='<password>'
PBS_FINGERPRINT='<Long PBS Fingerprint>'

export PBS_PASSWORD
export PBS_FINGERPRINT

proxmox-backup-client login --repository <someuser>@pam@<FQDN>:clients

proxmox-backup-client backup chris.pxar:/tank/chris \
--repository <someuser>@pam@<FQDN>:clients --ns crud-04-tank-chris

If I run the script from the backup clients command line it runs fine and backs up.

Rather than using Cron I created a systemd service file to run this script. Along with it I created a systemd timer file to schedule it to run at a specific time.

The systemd service file looks like this.
Code:
[Unit]
Description=script to backup /tank/chris with proxmox-backup-client
After=network.target

[Service]
Type=oneshot
User=<someuser>
ExecStart=/bin/bash /usr/local/bin/chrisbu.sh
ExecStart=/bin/bash /usr/local/bin/chrisbulog.sh
WorkingDirectory=/usr/local/bin
 

[Install]
WantedBy=multi-user.target

This all ran fine and regularly backed up what I wanted backed up until I reinstalled PBS server. When I reinstalled PBS server it created a new fingerprint. I copied this fingerprint into each of the scripts. If I run the script directly from the command line it runs fine and completes the backup successfully. If I try to run the service file from systemd as follows:

Bash:
systemctl start chrisbu.service

It fails with this error message:

Code:
WARNING: certificate fingerprint does not match expected fingerprint!
May 25 08:20:01 crud-04 bash[953671]: expected:    21:67:27:63:3c:e5:73:72:4f:10:12:76:7d:96:37:4d:c8:0d:65:46:98:f6:02:9c:99:97:7d:e1:11:53:91:a9

The "expected" fingerprint is the old fingerprint thus the mis-match.

Can someone tell me how to correct this so that my systemd service unit will run?

Regards
Chuck
SOLVED!

I am such an idiot! I had copied all of these scripts to /usr/local/bin as shown in the service file. I have been editing the files in ~/ not the ones in /usr/local/bin. When I went and edited the correct file and put in the current fingerprint everything ran as expected.
 
  • Like
Reactions: UdoB