Backup of VMs with space in the name seems to fail

klafbang    Sep 14 1:49PM 2017

I'm using Vertical Backup 1.1.1 towards a B2 storage. I run into problems backing up VMs with space in the name. Curiously, it seems that backing up VMs without spaces containing files with spaces in their names doesn't fail.

This backup, for example, is successful:

Creating a new virtual machine snapshot for NAS Uploaded file /vmfs/volumes/raid1tb1/NAS/CentOS 7 Template.vmdk Uploading file CentOS 7 Template-flat.vmdk Uploaded file CentOS 7 Template-flat.vmdk 98.91MB/s 00:44:10
Uploaded file CentOS 7 Template.vmx Uploaded file CentOS 7 Template.vmxf Backup NAS@stronger at revision 3 has been successfully completed

Both of these, however, fail:

Creating a new virtual machine snapshot for Quiz Maestro Uploaded file /vmfs/volumes/raid1tb1/Quiz Maestro/Quiz Maestro.vmdk Uploading file Quiz Maestro-flat.vmdk Uploaded file Quiz Maestro-flat.vmdk 138.05MB/s 00:31:38
Uploaded file Quiz Maestro.vmx Maximum number of retries reached Removing all snapshots of Quiz Maestro Command exited with non-zero status 2

Creating a new virtual machine snapshot for JBoss Test Uploaded file /vmfs/volumes/raid1tb1/JBoss Test/JBoss Test.vmdk Uploading file JBoss Test-flat.vmdk Uploaded file JBoss Test-flat.vmdk 5.20MB/s 14:00:54
Uploaded file JBoss Test.vmx Maximum number of retries reached Removing all snapshots of JBoss Test Command exited with non-zero status 2

This first one I have attempted a good half dozen times over two days with the same result, so it doesn't seem like an intermittent issue. Perhaps something in the storage of or creation of snapshot directories doesn't like spaces?


gchen    Sep 14 9:37PM 2017

The 'Maximum number of retries reached' error was reported by the b2 storage backend, which should not have any connection to the name of the virtual machine being backed up.

Can you run vertical -vv -log backup "Quiz Maestro" to see if there are more information?


klafbang    Sep 15 4:57AM 2017

I made a log of a failing backup (with a space in the name): https://static.westergaard.eu/failing.log

I also made one around the same time and with the same parameters without spaces: https://static.westergaard.eu/success.log

The same pattern goes on for all my VMs (space fails, no space uploads successfully)


gchen    Sep 15 10:48AM 2017

I was wrong. The name of the virtual machine is used in the path of the backup index file (for instance, the first backup of the virtual machine 'vm test' will be have an index file saved as 'snapshots/vm test/1'). The B2 storage doesn't like the spaces...

I'm working on a fix that should be available later today.


gchen    Sep 15 9:28PM 2017

The new 1.1.2 build (sha256 is 7eef0446e503cd011d50d12d49378db692b1b3dc13ba5da83c5a31602a8654e3) should fix this bug.


klafbang    Sep 16 3:32PM 2017

Yup, now it works. Thanks for very quick action!


Masen    Feb 11 9:37AM 2019

This seems to be a problem with backing up to local storage and is happening on 1.2.2. We tried several variations to get the name with spaces to work but it fails. Any tips?

[root@esxi2:/vmfs/volumes/588be13f-2fe66c56-0bde-3863bb417370/verticalbackup] ./vertical backup 'BKI Web 2' --no-chunk-listing Vertical Backup 1.2.2 Trial license expires on 2019-03-13 Storage set to /vmfs/volumes/SATA_SAN-DataStore/verticalbackup Listing all virtual machines Backing up BKI Web 2, id: 4, vmx path: /vmfs/volumes/SAS_SAN-Datastore-3/BKI Web 2/BKI Web 2.vmx, guest os: centos64Guest Failed to create the directory '/vmfs/volumes/SATA_SAN-DataStore/verticalbackup/snapshots/BKI Web 2@esxi2': [root@esxi2:/vmfs/volumes/588be13f-2fe66c56-0bde-3863bb417370/verticalbackup] ./vertical backup "BKI Web 2" --no-chunk-listing Vertical Backup 1.2.2 Trial license expires on 2019-03-13 Storage set to /vmfs/volumes/SATA_SAN-DataStore/verticalbackup Listing all virtual machines Backing up BKI Web 2, id: 4, vmx path: /vmfs/volumes/SAS_SAN-Datastore-3/BKI Web 2/BKI Web 2.vmx, guest os: centos64Guest Failed to create the directory '/vmfs/volumes/SATA_SAN-DataStore/verticalbackup/snapshots/BKI Web 2@esxi2': [root@esxi2:/vmfs/volumes/588be13f-2fe66c56-0bde-3863bb417370/verticalbackup] ./vertical backup BKI\ Web\ 2 --no-chunk-listing Vertical Backup 1.2.2 Trial license expires on 2019-03-13 Storage set to /vmfs/volumes/SATA_SAN-DataStore/verticalbackup Listing all virtual machines Backing up BKI Web 2, id: 4, vmx path: /vmfs/volumes/SAS_SAN-Datastore-3/BKI Web 2/BKI Web 2.vmx, guest os: centos64Guest Failed to create the directory '/vmfs/volumes/SATA_SAN-DataStore/verticalbackup/snapshots/BKI Web 2@esxi2':


Masen    Feb 11 9:44AM 2019

Actually, this might be a different issue. It's failing now even on VMs with no space in the name:

[root@esxi2:/vmfs/volumes/588be13f-2fe66c56-0bde-3863bb417370/verticalbackup] ./vertical backup gitlab --no-chunk-listing Vertical Backup 1.2.2 Trial license expires on 2019-03-13 Storage set to /vmfs/volumes/SATA_SAN-DataStore/verticalbackup Listing all virtual machines Backing up gitlab, id: 11, vmx path: /vmfs/volumes/SAS_SAN-Datastore-2/gitlab/gitlab.vmx, guest os: centos64Guest Failed to create the directory '/vmfs/volumes/SATA_SAN-DataStore/verticalbackup/snapshots/gitlab@esxi2':


gchen    Feb 11 11:08PM 2019

I found ESXi may act weird when used as an SFTP server. A linux server should work better.


Masen    Feb 12 4:27PM 2019

I'm not doing sFTP. I'm using a backup datastore that is already connected to the same host that the primary datastore is connected to. My init command looks like this:

vertical init esxi55 /vmfs/volumes/SATA_SAN-DataStore/verticalbackup

So it is just datastore to datastore copy. Have you tested in a configuration like that?


vmwareuser    Mar 19 7:44PM 2019

Don't forget that you need to escape the offending space with a \ .

Example My Backup Folder -> My\ Backup\ Folder

It should work now. This applies to any special characters even \ which you do this \.

Hope this helped.

regards Tony


Log in to comment
Copyright © Acrosync LLC 2017