My scenario is I am backing up VMs to a UNC path. Unfortunately many of my machines have hyphens in their names e.g. wkstn-dev-23. If the sStorage variable and/or the sArchive variable has a path with hyphens in it they don't work.
Does the hyphen need to be escaped somehow? As you can tell I'm not a scripter......
Regards,
JAS.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The workaround I use is to use a batch file to initiate the backup script.
This mounts the destination share as the R: drive. Then runs the backup script, then dismounts the R: drive. Just change the xxx.xxx.xxx.xxx bit to your destination IP address ;)
Hi,
My scenario is I am backing up VMs to a UNC path. Unfortunately many of my machines have hyphens in their names e.g. wkstn-dev-23. If the sStorage variable and/or the sArchive variable has a path with hyphens in it they don't work.
Does the hyphen need to be escaped somehow? As you can tell I'm not a scripter......
Regards,
JAS.
Good question. I am looking for some way to solve this question myself.
JAS have you found out how to solve this problem?
Hi,
The workaround I use is to use a batch file to initiate the backup script.
This mounts the destination share as the R: drive. Then runs the backup script, then dismounts the R: drive. Just change the xxx.xxx.xxx.xxx bit to your destination IP address ;)
Batch File:
==========================Start file=========================
net use R: /delete
net use R: \\xxx.xxx.xxx.xxx\FolderName
E:
cd \VS_Backup
cscript "E:\VS_Backup\VirtualServerBackup 1.0.4.vbs"
net use R: /delete
==========================End File===========================
Corresponding entry in backup vbs file:
=========================Start extract=======================
sArchive = "R:"
sFileLog = ""
sMountDrive = "S:"
sStorage = "R:\Log"
==========================End extract========================
This is not an elegant solution, but it works for me.
Regards,
JAS.