VMware Cloud Community
GregecSLO
Contributor
Contributor
Jump to solution

Backing up machines with VCB

Hello all!

We are going to back up all of our virtual machines with VCB... Problem is, that if folder already exists, VCBmounter will not resume backup, but it will abort it...

I have a script:

vcbMounter -h esx.host.local:443 -u backup -p password -a name:Ubuntu -r D:\esx.host.local\Ubuntu_full_backup -t fullvm -m nbd

It fails after second backup...

Is there a switch that would delete/overwrite previous backups?

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
zemotard
Hot Shot
Hot Shot
Jump to solution

The best practice is to create a batch file in order to delete your folder before your vcb backup or you can use my script whitch add this date and hour in the filename

First batch file: BackupVCB_PARAM.bat

SET VC_SERVER=VCB_SRV_21

SET USER=VCB_SRV_21\BackVmuser

SET PASSWORD=BackupPass

SET CLIENT=%1

SET DESTINATION=h:\Backup_VM_VCB\

SET VMDK_NON_SPLITE=1

SET COMPRESSION=1

set YYYYMMDD=%DATE:6,4%%DATE:3,2%%DATE:~0,2%

set HHMMSS=%TIME:0,2%%TIME:3,2%%TIME:~6,2%

set LOGFILE=h:\Backup_VM_VCB\log_%CLIENT%_%YYYYMMDD%%.txt

"c:\Program Files\VMware\VMware Consolidated Backup Framework\vcbMounter.exe" -h %VC_SERVER% -u %USER% -p %PASSWORD% -L 6 -a ipaddr:%CLIENT% -r %DESTINATION%%CLIENT%_%YYYYMMDD% -t fullvm -M %VMDK_NON_SPLITE% -F %COMPRESSION% >>%LOGFILE%

Second batch file

mkdir h:\Backup_VM_VCB

call "C:\maintenance\BackupVCB\BackupVCB_PARAM.bat" Myservername






Best Regards

If this information is useful for you, please consider awarding points for "Correct" or "Helpful".

Best Regards If this information is useful for you, please consider awarding points for "Correct" or "Helpful".

View solution in original post

Reply
0 Kudos
12 Replies
zemotard
Hot Shot
Hot Shot
Jump to solution

Add the command to have a log of vcbmounter, then you will be able to investigate why your backup is cancelled.

Maybe a right issue ...






Best Regards

If this information is useful for you, please consider awarding points for "Correct" or "Helpful".

Best Regards If this information is useful for you, please consider awarding points for "Correct" or "Helpful".
Reply
0 Kudos
GregecSLO
Contributor
Contributor
Jump to solution

I know why my backup is cancelled. It is cancelled because mountpoint (folder) already exists...

I need to know if there is a switch available that would delete or overwrite existing mountpoint...

Reply
0 Kudos
TechRoh
Contributor
Contributor
Jump to solution

Can you add unmount command to your script, this would delete the destination. There is no particular switch for vcbMounter to delete/overwrite the destination folder.

In your case, after running,

" vcbMounter -h esx.host.local:443 -u backup -p password -a name:Ubuntu -r D:\esx.hot.local\Ubuntu_full_backup -t fullvm -m nbd "

Add --> "vcbMounter -h esx.host.local:443 -u backup -p password -U D:\esx.hot.local\Ubuntu_full_backup"

Hope this helps you.

Reply
0 Kudos
GregecSLO
Contributor
Contributor
Jump to solution

Hi!

If I add your command after my backup, it will delete my backup right after it is complete Smiley Happy

I have to add it before right?

Reply
0 Kudos
zemotard
Hot Shot
Hot Shot
Jump to solution

The best practice is to create a batch file in order to delete your folder before your vcb backup or you can use my script whitch add this date and hour in the filename

First batch file: BackupVCB_PARAM.bat

SET VC_SERVER=VCB_SRV_21

SET USER=VCB_SRV_21\BackVmuser

SET PASSWORD=BackupPass

SET CLIENT=%1

SET DESTINATION=h:\Backup_VM_VCB\

SET VMDK_NON_SPLITE=1

SET COMPRESSION=1

set YYYYMMDD=%DATE:6,4%%DATE:3,2%%DATE:~0,2%

set HHMMSS=%TIME:0,2%%TIME:3,2%%TIME:~6,2%

set LOGFILE=h:\Backup_VM_VCB\log_%CLIENT%_%YYYYMMDD%%.txt

"c:\Program Files\VMware\VMware Consolidated Backup Framework\vcbMounter.exe" -h %VC_SERVER% -u %USER% -p %PASSWORD% -L 6 -a ipaddr:%CLIENT% -r %DESTINATION%%CLIENT%_%YYYYMMDD% -t fullvm -M %VMDK_NON_SPLITE% -F %COMPRESSION% >>%LOGFILE%

Second batch file

mkdir h:\Backup_VM_VCB

call "C:\maintenance\BackupVCB\BackupVCB_PARAM.bat" Myservername






Best Regards

If this information is useful for you, please consider awarding points for "Correct" or "Helpful".

Best Regards If this information is useful for you, please consider awarding points for "Correct" or "Helpful".
Reply
0 Kudos
TechRoh
Contributor
Contributor
Jump to solution

Greg,

Yes your right, It would delete your backup after it is complete.

If I misunderstood your problem please correct me..

1) You take fullvm backup to your proxy machine and than from there you copy the data tape drive or any other storage medium, right..?

If this is the case, are you using any third party backup software to back the data to the tape drive/storage medium?

or

2) If you don't want the data to be backuped to tape/storage medium and you want the data to be remained in the proxy machine (i.e 😧 drive in your case).

--In this case you have to give different destinations (i.e either the folder name or the path should be different).

If your not looking for the above scenarios. Please let me know exactly what are you trying to do?

Thanks,

--:)

Reply
0 Kudos
GregecSLO
Contributor
Contributor
Jump to solution

Case 2...

I just want previous backup to be replaced by new one automatically...

Thanks zemotard I will try it!

Reply
0 Kudos
zemotard
Hot Shot
Hot Shot
Jump to solution

Glad to help you.

If this information is useful for you, please consider awarding points for "Correct" or "Helpful".

Best Regards If this information is useful for you, please consider awarding points for "Correct" or "Helpful".
TechRoh
Contributor
Contributor
Jump to solution

If you have got the solution for your problem than please ignore this post

Since you are not worried about the previous backed up data than as I suggested you before,

Execute ---> vcbMounter -h xxxx -u xxxx -p xxxx -U <destination>

before trying to mount the VM else,

Using the Windows batch command "del <destination>" will help . Please note that "del" command is good to use for fullvm backup and not for file -level backup.

For file - level use --> vcbMounter -h xxx -u xxx -p xxx -U <destination>

Thanks,

Reply
0 Kudos
GregecSLO
Contributor
Contributor
Jump to solution

Hi again!

I made it, backup runs smoothly...

But I have one more question for specialists here...

I have 2 70 GB machines (disk size is 70 GB) and 2 10 GB machines....

Backup shows for 1 70 GB machine 13 GB for other 29 GB.

For 10 GB machines shows 1.3GB and for other 6GB...

Where is the rest?

Why are sizes on ESX different than sizes of backup?

Does VCB compress it somehow? Is this OK or should I be worried?

Thanks!

Reply
0 Kudos
IRIX201110141
Champion
Champion
Jump to solution

Because by default it uses -F 0 and this stores only the used data from that VMDK and not the complete pre-alocate disk size. If you also use a compression programm like RAR you can reduce the footprint to 50% when using "fastest" for the compression method option.

Just check the size of the used data within the guest VM and compare it to the amount of data vcbmounter creates.

regards

Joerg

Reply
0 Kudos
GregecSLO
Contributor
Contributor
Jump to solution

Thanks!

I was thinking this way Smiley Happy

So this is actually good thing, why back up all pre-allocated disk anyway...

Thanks to all again!

Reply
0 Kudos