How to restore backup from PVS to physical host system?

ty628659

Member
Mar 9, 2022
4
0
6
44
Hey guys,

I understand we can use proxmox-backup-client to bakcup physical hosts to PBS,
code:
proxmox-backup-client backup root.pxar:/ --repository $REPOSITORY

Example: in PVE host server, >_shell
proxmox-backup-client backup root.pxar:/ --repository 192.168.77.23:store2

My issue is how to restore the backup file back to the physical host system, in case it have a problem.

here are the document: https://pbs.proxmox.com/docs/backup-client.html#restoring-data
but I still not getting done from >_ Shell in PVE

Q1: list all the backup file name?

Q2: restore the file?
proxmox-backup-client restore <snapshot> <archive-name> <target> [OPTIONS]

:)Thanks anyone know how? can use my backup as example.

Best regards!

Image 037.png
 
just tested today, failed to restore whole pve host. (seems it's because this feature is not ready yet.)

fyi:

1) login to pbs store
proxmox-backup-client login --repository pbs-host:store-name
<enter password>
2) specify pbs repo info to bashrc.
export PBS_REPOSITORY=pbs-host:store-name
3) to get backup list
proxmox-backup-client snapshot list
4) enter backup shell, like stated in wiki page:
root@test-pve1:~# proxmox-backup-client catalog shell host/test-pve1/2022-10-24T05:41:16Z root.pxar Starting interactive shell pxar:/ >
5) try restore
pxar:/ > restore target/

and I get error:
Error: catalog socket "/var/spool/postfix/dev/log" not a socket in the archive

to restore specify files, you can do through
  • pbs web console (directory icon after root.pxar.didx)
  • or terminal (enter interactive shell in above step 4, details pls check wiki).
 
Just wondering if there has been any progress on this, testing and I am not sure how to restore a fresh host,

First I ran this on my production pve host:
Code:
export PBS_PASSWORD="4theB4ackups"
export PBS_LOG=warn
export PBS_REPOSITORY=root@pbs@10.0.0.9:backup1

proxmox-backup-client backup pve-etc.pxar:/etc --include-dev /etc/pve pve-root.pxar:/root

Then I wanted to test restore on a fresh install, I list the available backups: proxmox-backup-client snapshot list

Just guessing this would be step 1, then I would restore /root after that:

Code:
proxmox-backup-client restore host/pve1/2024-01-03T04:53:23Z pve-etc.pxar /etc/

I get this error:
Code:
Error: error extracting archive - encountered unexpected error during extraction: error at entry ".pwd.lock": failed to extract file: failed to create file ".pwd.lock": EEXIST: File exists

Can anyone tell me the correct procedure to restore a brand new pve host such as if I am migrating to new hardware or want to wipe the root drive and start over - just hypothetical.
 
  • Like
Reactions: Miguelrios

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!