Upload VZDump backup error

bmbeverst

Active Member
Jun 27, 2013
11
0
41
Virginia. USA
Hello,

I created a Ubuntu 12.04 OpenVZ container. Then I modified the container and did a gzip backed up of it. I copied the backup from /var/lib/vz/dump/vzdump-openvz- . . . _20.tar.gz to my desktop.

I am able to restore the container with vzrestore and upload it as a "OpenVZ template". Any containers based on the template fail.

I get this error when I try to upload the backup as a "VZDump backup file" to a freenas backup storage on Proxmox:
Code:
Error 400: Parameter verification failed.

content: upload content type 'backup' not allowed

Why will Proxmox not let me upload the backup?

Screenshot of Storage Tab:

storage_zps9ba702c2.jpg


Thanks in advance
 
Thank you for the quick reply!

I am pretty sure I did allow the freenass to contain backups. The screen shot shows the freenasBackup storage, and backups are allowed.

I am wondering if it is because it is a .tar.gz file?
 
This doesn't work for me also as just tried it for the first time tonight with the same error. The storage location is setup to accept backups but it won't upload it from the web interface.

Uploading it manually to the dump folder shows it on the web interface and allows me to restore it.
 
Possible fix for "Upload VZDump backup error"

I experienced the same problem so I traced down the code throwing the error ( /usr/share/perl5/PVE/API2/Storage/Status.pm )and discovered that uploading backups is not supported in the code as written (shown below):
if ($content eq 'iso') {
if ($filename !~ m![^/]+\.[Ii][Ss][Oo]$!) {
raise_param_exc({ filename => "missing '.iso' extension" });
}
$path = PVE::Storage::get_iso_dir($cfg, $param->{storage});
} elsif ($content eq 'vztmpl') {
if ($filename !~ m![^/]+\.tar\.gz$!) {
raise_param_exc({ filename => "missing '.tar.gz' extension" });
}
$path = PVE::Storage::get_vztmpl_dir($cfg, $param->{storage});
} else {
raise_param_exc({ content => "upload content type '$content' not allowed" });
}

When I changed it by adding a stanza to handle 'backup' content (as shown below) then the web upload of backup files started working as expected. I have no idea what the global consequences of this change might be (I just started playing with Proxmox in the last few weeks) so someone else will have to comment if this is a safe (or desirable) change.

if ($content eq 'iso') {
if ($filename !~ m![^/]+\.[Ii][Ss][Oo]$!) {
raise_param_exc({ filename => "missing '.iso' extension" });
}
$path = PVE::Storage::get_iso_dir($cfg, $param->{storage});
} elsif ($content eq 'vztmpl') {
if ($filename !~ m![^/]+\.zip\.gz$!) {
raise_param_exc({ filename => "missing '.zip.gz' extension" });
}
$path = PVE::Storage::get_vztmpl_dir($cfg, $param->{storage});
} elsif ($content eq 'backup') {
if ($filename !~ m![^/]+\.vma\.gz$!) {
raise_param_exc({ filename => "missing '.vma.gz' extension" });
}
$path = PVE::Storage::get_backup_dir($cfg, $param->{storage});

} else {
raise_param_exc({ content => "upload content type '$content' not allowed" });
}

-- John

root@proxmox:~# pveversion -v
proxmox-ve-2.6.32: 3.1-114 (running kernel: 2.6.32-26-pve)
pve-manager: 3.1-21 (running version: 3.1-21/93bf03d4)
pve-kernel-2.6.32-26-pve: 2.6.32-114
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.0-2
pve-cluster: 3.0-8
qemu-server: 3.1-8
pve-firmware: 1.0-23
libpve-common-perl: 3.0-8
libpve-access-control: 3.0-7
libpve-storage-perl: 3.0-17
pve-libspice-server1: 0.12.4-2
vncterm: 1.1-4
vzctl: 4.0-1pve4
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.4-17
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.1-1
 
Seems this bug is still open as it doesn't work in Proxmox 4.0 for me either. Still have to upload manually.

Looks like something that should be really quick to fix based on the code above. Any chance of getting it added in vs me having to add it manually but then it vanishing on updates?
 

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!