Backup PVE using PBS

Don't worry, the languages really are similar. ;-) I have to apologize for accidentally posting in Portuguese in an English forum. haha

About the backup I do the following based on the script created by a friend of the Telegram group "Proxmox Backup Server: Brasil"

Code:
#!/bin/bash

# strings to identify host,datestamp and pbs creds
export PBS_REPOSITORY=usergranular@pbs@10.10.10.1:datastore
export PBS_PASSWORD=myverysecretpassword

proxmox-backup-client login --repository $PBS_REPOSITORY
proxmox-backup-client backup configs.pxar:/srv/ --repository $PBS_REPOSITORY --backup-id $HOSTNAME

## unset the PBS_x variables after backup
unset PBS_REPOSITORY
unset PBS_PASSWORD
exit 0

Just be careful not to use the PBS root credentials, instead use a credential that only allows the backup to be performed, that way your backup is safe in case of server attacks!
 
Last edited:
Don't worry, the languages really are similar. ;-) I have to apologize for accidentally posting in Portuguese in an English forum. haha

About the backup I do the following based on the script created by a friend of the Telegram group "Proxmox Backup Server: Brasil"

Code:
#!/bin/bash

# strings to identify host,datestamp and pbs creds
export PBS_REPOSITORY=usergranular@pbs@10.10.10.1:datastore
export PBS_PASSWORD=myverysecretpassword

proxmox-backup-client login --repository $PBS_REPOSITORY
proxmox-backup-client backup configs.pxar:/srv/ --repository $PBS_REPOSITORY --backup-id $HOSTNAME

## unset the PBS_x variables after backup
unset PBS_REPOSITORY
unset PBS_PASSWORD
exit 0

Just be careful not to use the PBS root credentials, instead use a credential that only allows the backup to be performed, that way your backup is safe in case of server attacks!
Thanks for sharing Tacioandrade!

Great suggestion to use the Token login method Dunuin.

Tmanok
 

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!