Backing up the whole proxmox server

axrusar

New Member
Jun 13, 2022
22
0
1
Sorry i am new to Proxmox. i did search the forum but "backup proxmox" is too broad and there is the whole backup server thing so i could not find an answer.

I would like to backup my small home regular desktop I7-cpu proxmox server installation along everything inside including VMS and all.
I usually use foxclone to backup whole drives to external disk images, but since the proxmox installation is on 2 drives (ZFS raid 1), the question is
can i just image each individual drive and take note of which image belongs to X drive, and restore the images if i need? or the system will detect something is out of sync between the drives and fail after restoring?

more... Since it is supposed to be "raid 1", could i just restore only one drive, and pop the second one formatted blank and let the system rebuild itself?
I want to test real life failures to see how the raid setup really works at fault tolerance as if one of the drives fail, not just theory.

Thank you
 
Last edited:
A Proxmox backup is usually backing up the VMs with the backup features Proxmox offers (either the builtin backup in VE or the PBS) and backing up /etc of the Proxmox nodes.
I would not recommend to try to backup whole disks inside a Proxmox node as this cannot be restored easily, especially with ZFS raid.
 
I would not recommend to try to backup whole disks inside a Proxmox node as this cannot be restored easily, especially with ZFS raid.
That works fine by booting into a clonezilla ISO or a debian with proxmox-backup-client. But its alot of wasted space in case you store the PVE installation and guests on the same disk or pool. If you got some dedicated small SSDs (for example a 120GB SSD with 96GB unallocated) just for the system then thats great option.
 
I appreciate the replies provided guys.
I did an image with clonezilla and then a bunch of experiments pulling zfs members out of the system and now i got a better idea about how it works on the RAID department.

Let me ask you..

scenario: Little proxmox server with just a couple VMs. one VM is an offsite backup server, aka "important data here"

Now lets assume the server dies. and i got one of the hard drives in my hand.
So now i am trying to mount the zfs partition in a linux mint system.
I do have the zfsutils-linux package installed.
But i am not able to mount it. this is what i get :

Ycj0Nij.png


Besides that, if i mount it will i be able to browse the file system and look for the VM virtual hard drive files so i can move them to another machine?

Thank you
 
Did you import that pool using zpool import? There are no VM hard disk files. ZFS uses zvols which are block devices.
 
Did you import that pool using zpool import? There are no VM hard disk files. ZFS uses zvols which are block devices.
Thank you Dunin for the comment.
Yes i did try to mount it with zpool import, but so far i can not get the command in the right format i think. please take a look at the folowing output, maybe you guys can help me get it right:

Code:
┌─[axo@thebox]─[~]
└──╼ $sudo fdisk -l
Disk /dev/sdb: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model:                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: EB84EEEB-6C02-427D-9073-536642E54B22

Device       Start       End   Sectors   Size Type
/dev/sdb1       34      2047      2014  1007K BIOS boot
/dev/sdb2     2048   1050623   1048576   512M EFI System
/dev/sdb3  1050624 976773134 975722511 465.3G Solaris /usr & Apple ZFS

Partition 1 does not start on physical sector boundary.
┌─[axo@thebox]─[~]
└──╼ $sudo zpool import -d /dev/sdb3 rpool -N
cannot import 'rpool': pool was previously in use from another system.
Last accessed by (none) (hostid=3c1f3854) at Wed Jun 15 15:27:51 2022
The pool can be imported, use 'zpool import -f' to import the pool.
┌─[✗]─[axo@thebox]─[~]
└──╼ $sudo zpool import -d -f /dev/sdb3 rpool -N
cannot import '/dev/sdb3': no such pool available
┌─[✗]─[axo@thebox]─[~]
└──╼ $sudo zpool import -d -f /dev/sdb3/by-id/EB84EEEB-6C02-427D-9073-536642E54B22 rpool -N
cannot import '/dev/sdb3/by-id/EB84EEEB-6C02-427D-9073-536642E54B22': no such pool available
┌─[✗]─[axo@thebox]─[~]
└──╼ $sudo zpool import -d -f /dev/sdb3/EB84EEEB-6C02-427D-9073-536642E54B22 rpool -N
cannot import '/dev/sdb3/EB84EEEB-6C02-427D-9073-536642E54B22': no such pool available


I am not too savy on file systems yet, still learning. So what you said translates to "if the server dies, data is not recoverable" mounting the drives somewhere else??

Thank you!!
 
You run a zpool import and it will list you all names of pools it found drives from. You can then import that pool by running zpool import YourPoolName. If your pools name is the default "rpool" and it complains that this pool was used in anoher system you can force to import it by adding the -f argument (like the error text told you to do). So you could run a zpool import -f rpool.
 
You run a zpool import and it will list you all names of pools it found drives from.[/ICODE].

I get "no pools available to import"
I am plugging the drive (2.5in laptop spinner) to the computer with an USB SATA adapter just in case that makes the difference, the drive is not attached to the motherboard straight to SATA.
This drive is a member of the RAID1 setup with proxmox and the VMs inside.

OaidZ7E.png


also..

Code:
Disk /dev/sdb: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model:                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A06ADC70-7EA1-3C48-97B3-16C4F3F8EFF9

Device         Start       End   Sectors   Size Type
/dev/sdb1       2048 976756735 976754688 465.8G Solaris /usr & Apple ZFS
/dev/sdb9  976756736 976773119     16384     8M Solaris reserved 1
┌─[axo@thebox]─[~]
└──╼ $sudo zpool import -d -f /dev/sdb1 rpool -N
cannot import '/dev/sdb1': no such pool available
 
Last edited:
Ok i did this...

Code:
┌─[✗]─[axo@thebox]─[~]
└──╼ $sudo zpool import -f -d /dev/sdb1 rpool
cannot mount '/': directory is not empty
┌─[✗]─[axo@thebox]─[~]
└──╼ $sudo zpool import -f -d /dev/sdb1 rpool -N
cannot import 'rpool': a pool with that name already exists
use the form 'zpool import <pool | id> <newpool>' to give it a new name
┌─[✗]─[axo@thebox]─[~]
└──╼ $sudo zpool import
no pools available to import

no happy messages there, but somehow a new 34gb "block device" /dev/zd0 mounted in my mint system, so i am able to browse
the file system and i can see the directories of that specific VM with another linux installation. So for me that works, i can see data is recoverable, that was mi mission..

I am reading about the block storage vs file system.. totally lost reading chinese but today i kind of got the idea with this experiment.
Thank you man.
 
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!