[SOLVED] How to customize host client name in proxmox-backup-client

Fra

Renowned Member
Dec 10, 2011
143
10
83
I use proxmox-backup-client to backup my laptop in my personal PBS

I recently "formatted" my laptop and want to keep doing backups on the same backup group (host/mylaptophostname): this is not possible since I've set a new hostname to my laptop, so Pbs created a new backup group host/mylaptopnewhostname.



I've read the doc at https://pbs.proxmox.com/docs/backup-client.html but cannot figure how to set a custom host client name

this is the script

Code:
export BACKUP_USER='redacted@pbs'
export PBS='[IP of pbs]'
export PBS_FINGERPRINT='redacted'
export DATASTORE='local-storage'
export PBS_PASSWORD='redacted'
export PBS_REPOSITORY=${BACKUP_USER}@${PBS}:${DATASTORE}
/usr/local/sbin/proxmox-backup-client backup etc.pxar:/etc  home_documents.pxar:/home/redacted/Documents/
 
Last edited:
uh, nice hack :)
it works

there is an issue: during the backup (which last hours) the laptop has e new (wrong) hostname :(

maybe I should have a look at the proxmox-backup-client source code (where is it? I cannot find it in https://git.proxmox.com/) to see if the hostname comes from the `hostmame` command or there is something else in between
 
No, sorry, this was a little work for you but i suggest a solution


hostname myoldname
export BACKUP_USER='redacted@pbs'
export PBS='[IP of pbs]'
export PBS_FINGERPRINT='redacted'
export DATASTORE='local-storage'
export PBS_PASSWORD='redacted'
export PBS_REPOSITORY=${BACKUP_USER}@${PBS}:${DATASTORE}
nohup /usr/local/sbin/proxmox-backup-client backup etc.pxar:/etc home_documents.pxar:/home/redacted/Documents/ &
hostname mynewname

Can this be sufficient?

Diaolin
 
  • Like
Reactions: Fra
> Just a question: how many TB do you have on your laptop?

the backup is about 100G (changes are minimal), with a pretty bad upload bandwidth.
 
  • Like
Reactions: galaober and Fra
ah, fantastic!

so, I replaced

Code:
/usr/local/sbin/proxmox-backup-client backup etc.pxar:/etc  home_documents.pxar:/home/redacted/Documents/

with

Code:
/usr/local/sbin/proxmox-backup-client backup etc.pxar:/etc  home_documents.pxar:/home/redacted/Documents/  --backup-id mylaptophostname

thanks fabian
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!