PBS as VM = Safe?

Albinius

New Member
Oct 18, 2022
9
0
1
So my journey has begun!

I'm pondering on this one question I can't seem to find a suiting answer for.

Here's the situation: If you have Proxmox. You install PBS as a VM on a node. PBS automatically backs up to an external Truenas machine.

If the node goes corrupted for some reason, the VM's will go down, as will PBS --> What are the options to restore? And how would one go about?

As I see it, you'll need a new node and a fresh install of PBS as VM. After this you'll need to link the backup files from the Truenas machine to Proxmox.
But to add the backup files in Proxmox you will need an IP adress of PBS to add the backup drive. So the external backup drive should be added in PBS? I can't seem to find an "Add/Load ZFS Volume" option. Only an option to create a new ZFS volume.
So this must be done though the Shell? And where could I find more documentation about this?

Or am I totally wrong here?

Thanks in advance!
 
There is no option to import a existing datastore yet. You would need to manually mount your existing filesystem using systemd or fstab and then edit the /etc/proxmox-backup/datastore.cfg config file to add your existing datastore.

But if you already got your datastore on a NFS/SMB share on a TrueNAS server, why not backup the PBS VM using vzdump to your TrueNAS too? Then you could restore the PBS VM from the NFS/SMB share first, and after the PBS VM is restored and running again you could restore all other guests using the PBS VM.
 
But if you already got your datastore on a NFS/SMB share on a TrueNAS server, why not backup the PBS VM using vzdump to your TrueNAS too? Then you could restore the PBS VM from the NFS/SMB share first, and after the PBS VM is restored and running again you could restore all other guests using the PBS VM.

This seems indeed the easiest solution.

That command would look like: "vzdump --dumpdir /space/backup --snapshot 777" ?


Is doing this with a backup through Proxmox node itselve not possible? I mean that would seem easier, no?

1. Fresh Node install.
2. Attach shared nas drive with backup on it.
3. Restore PBS VM and run it
4. Restore rest of VM's through PBS

Or am I missing something?



PS: I tried it but I get errors..
 

Attachments

  • 1668863265067.png
    1668863265067.png
    548.4 KB · Views: 14
  • 1668864052202.png
    1668864052202.png
    365.4 KB · Views: 14
Last edited:
That command would look like: "vzdump --dumpdir /space/backup --snapshot 777" ?
Never used the CLI for that. You can just add you NFS/SMB share as a storage to PVE and set vzdump as content type. Then you can choose that storage as a target for a backup task in the web UI and set that task to just backup your PBS VM.
 
Never used the CLI for that. You can just add you NFS/SMB share as a storage to PVE and set vzdump as content type. Then you can choose that storage as a target for a backup task in the web UI and set that task to just backup your PBS VM.

Yes. Thats what I did. But now when restoring, PBS doesnt recognizes the shared disk with the backup of the rest of the VM's... I need to mount it?
 
You didn't showed us how you store your datastore. SMB/NFS/iSCSI/disk passthrough/PCI passthrough/virtual disk?
 
No...

...sounded like you PBS is losing the datastore when restoring the PBS VM. So how does your PBS stores the datastore?
 

Attachments

  • 1668867492302.png
    1668867492302.png
    343.1 KB · Views: 12
  • 1668867516755.png
    1668867516755.png
    343.1 KB · Views: 12
Last edited:
Looks like you either use disk passthrough or virtual disks. When using disk passthrough you will lose that passthroughed disk when doing a restore and you would need to do that passthrough again. When using virtual disks backing up the PBS VM using zvol makes no sense, as you either would need to include the virtual disks with the backups in the vzdump backup, which would waste a lot of space as you would backup all your PBS backups too. And excluding the virtual disk with the backups makes not really sense, as PVE would wipe your backups when restoring the PBS VM as I mentioned there: https://forum.proxmox.com/threads/feature-request-advanced-restore-options-in-gui.109707/
 
Looks like you either use disk passthrough or virtual disks. When using disk passthrough you will lose that passthroughed disk when doing a restore and you would need to do that passthrough again. When using virtual disks backing up the PBS VM using zvol makes no sense, as you either would need to include the virtual disks with the backups in the vzdump backup, which would waste a lot of space as you would backup all your PBS backups too. And excluding the virtual disk with the backups makes not really sense, as PVE would wipe your backups when restoring the PBS VM as I mentioned there: https://forum.proxmox.com/threads/feature-request-advanced-restore-options-in-gui.109707/

My best guess its a virtual disk saved on my truenas machine(pasthrough). If that makes sense.

So i think i need to restore or mount? then passthrough again somehow..
 

Attachments

  • 1668868347921.png
    1668868347921.png
    239.5 KB · Views: 6
Last edited:
Here is the problem it seems: Failed to import ZFS pool....

Now... How do I do this?
 

Attachments

  • 1668872153982.png
    1668872153982.png
    459.3 KB · Views: 8
Why don't you just use a SMB/NFS share from your NAS inside the PBS VM to store your datastore instead of running some (possibly?) qcow2/iSCSI virtual disks stored on the NAS but mounted on the PVE host?
That way restoring the PBS VM from backup wouldn't be a problem, as NFS/SMB shares aren't effected.
 
Why don't you just use a SMB/NFS share from your NAS inside the PBS VM to store your datastore instead of running some (possibly?) qcow2/iSCSI virtual disks stored on the NAS but mounted on the PVE host?
That way restoring the PBS VM from backup wouldn't be a problem, as NFS/SMB shares aren't effected.
That, I dont understand 100% Is there any info somewhere related?

Because the virtual HDD (with the PBS backup VM's) is already stored on a ZFS volume on my NAS. It copied the datastore file i noticed. Its the mounting problem. I cant seem to get it working...
 
Lets say ou got 10TB of VM backups on that PBS. Then your NAS is already storing those 10TB as a qcow2 file. Backup up the whole PBS VM with vzdump wouldn`t make any sense, as you then again would backup the whole 10TB qcow2 file to your NAS, so 20TB would be used.
Would be better to don't store your PBS backups at all on a virtual disk, but on a NFS/SMB share. That way the a vzdump backup of the PBS VM would only backup the very small system disk of your PBS VM and not all the VM backups too.
 
Here's what I did to get a backup of a PBS installed as a VM. I have not tested a restore yet so I might be off and this is a home lab setup.
Setup is:
Single PVE node with a PBS VM running on it
PBS VM has pools created via NFS mounts to an external TrueNas system. This is used for VM backups.
The PBS VM OS disk is running on the same disk as the proxmox installation, local-lvm
I use the VEEAM agent for Linux to bare metal back up the Proxmox OS disk to my TrueNas system.

My theory is if my proxmox OS disk fails I can bare metal restore to a new one, which will restore my proxmox node, and will also contain my PBS OS VM disk in local-lvm.
 
Last edited:
Single PVE node with a PBS VM running on it
PBS VM has pools created via NFS mounts to an external TrueNas system. This is used for VM backups.
The PBS VM OS disk is running on the same disk as the proxmox installation, local-lvm
I use the VEEAM agent for Linux to bare metal back up the Proxmox OS disk to my TrueNas system.

My theory is if my proxmox OS disk fails I can bare metal restore to a new one, which will restore my proxmox node, and will also contain my PBS OS VM disk in local-lvm.
Would perform better and easier to restore guests if you would create a PBS VM on your TrueNAS server using a zvol as storage. That way you can use local storage without the NFS overhead and network latency and in case the whole PVE would be lost, the PBS would still be operational for an instant restore. You could even make use of a Debian pen drive to backup the PVE system disks to your PBS VM on TrueNAS so the PVE host could be restored via PBS too...
 
Last edited:

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!