Proxmox Manual Backup Storage shortage Issue

kazianik

New Member
Nov 26, 2023
4
1
3
Hello, I am using Proxmox virtual environment (version: 7.2-3 & 7.1-7) for all of my VM. Everything was going well. All of my VMs are running from "local-lvm". I use the Proxmox VE GUI to manually take VM backups every week. Recently, I have been unable to take a backup due to an issue with the '/root' drive's space. Can we choose "local-lvm" instead of '/root'? 'local-lvm' has enough space for me.
 
  • Like
Reactions: ijajahmed
Hello.
Could you direct me to somewhere that explains how to configure external storage to be able to make backup copies of virtual machines that are in LVM?
Should the storage be partitioned like LVM, or can it be ext4 and mount a directory?
Thank you so much.
 
This one looks reasonable: https://ostechnix.com/add-external-usb-storage-to-proxmox/

Basically, you partition the drive, format it, mount it, update /etc/fstab to mount on startup, and add a backup storage to PVE. For backup just use a normal filesystem like ext4. The article uses exfat which is fine but don't use vfat or similar DOS fileystems because they don't support files > 4 GB. The backup storage does not have to be the same type as where the VM's are because backups are just files.

One trick I use is to take advantage of PVE's disk status updater and automounting to make it easy to swap out the drive:

Code:
/etc/fstab:
LABEL=backup    /mnt/backup    ext4    noauto,x-systemd.automount    0 2

Now you can use pvesm like this:

root@host:~# pvesm set backup -disable 1
root@host:~# umount /mnt/backup
root@host:~# ...switch drives...
root@host:~# pvesm set backup -disable 0

ETA: Don't forget to check the "mountpoint" box in Proxmox GUI. That will prevent Proxmox from writing to the underlying directory if the backup device isn't mounted.
 
Last edited:
  • Like
Reactions: wbk
A backup to the same disk isn't much of a backup at all. Better to attach external storage and back up to that. You can get usb ssd pretty cheap.
Thank you very much. My PBS for scheduling VM backups is working well. My organization follows a policy that requires weekly offsite backup. So i do manual backup the Proxmox VMs weekly, then download it from Proxmox via winscp from "/var/lib/vz" directory to my laptop & finally store it at the portable HDD. Attached are some screenshots, please take a look at them.
 

Attachments

  • 1701061505542.png
    1701061505542.png
    33.1 KB · Views: 4
  • 1701061807328.png
    1701061807328.png
    61.5 KB · Views: 4
While you can't back up to local-lvm you could use lvextend to resize the root volume, assuming that your LVM is set up the normal Proxmox way. Then from the console use "parted" and "resize2fs" to expand the root partition. Alternatively, you could create a new LV out of your thin pool, partition, format, and mount it on /var/lib/vz.

See for example here : https://pve.proxmox.com/wiki/LVM2

However, unless this is a remote server it seems like you could eliminate a few steps from your procedure by just attaching the portable drive to the server as I suggested above.
 
Este parece razonable: https://ostechnix.com/add-external-usb-storage-to-proxmox/

Básicamente, particiona la unidad, la formatea, la monta, actualiza /etc/fstab para montarla al inicio y agrega un almacenamiento de respaldo a PVE. Para realizar copias de seguridad, utilice un sistema de archivos normal como ext4. El artículo usa exfat, lo cual está bien, pero no use vfat o sistemas de archivos DOS similares porque no admiten archivos > 4 GB. El almacenamiento de la copia de seguridad no tiene que ser del mismo tipo que el de las máquinas virtuales porque las copias de seguridad son solo archivos.

Un truco que uso es aprovechar el actualizador de estado del disco de PVE y el montaje automático para facilitar el intercambio de la unidad:

[CÓDIGO]/etc/fstab:
ETIQUETA=copia de seguridad /mnt/copia de seguridad ext4 noauto,x-systemd.automount 0 2

Ahora puedes usar pvesm así:

root@host:~# pvesm establece copia de seguridad -disable 1
root@host:~# desmontar /mnt/backup
root@host:~# ...cambiar unidades...
root@host:~# pvesm establece copia de seguridad -disable 0
[/CÓDIGO]

ETA: No olvide marcar la casilla "punto de montaje" en la GUI de Proxmox. Eso evitará que Proxmox escriba en el directorio subyacente si el dispositivo de respaldo no está montado.
Thank you very much!!! I probe that.
 

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!