if (get_win32_driveletters(jcr->ff, szWinDriveLetters)) {
Jmsg(jcr, M_INFO, 0, _("Generate VSS snapshots. Driver=\"%s\", Drive(s)=\"%s\"\n"), g_pVSSClient->GetDriverName(), szWinDriveLetters);
if (!g_pVSSClient->CreateSnapshots(szWinDriveLetters)) {
- Jmsg(jcr, M_FATAL, 0, _("CreateSGenerate VSS snapshots failed.\n"));
+ berrno be;
+ Jmsg(jcr, M_FATAL, 0, _("CreateSGenerate VSS snapshots failed. ERR=%s\n"),
+ be.bstrerror());
} else {
/* tell user if snapshot creation of a specific drive failed */
int i;
Jmsg(jcr, M_FATAL, 0, _("No drive letters found for generating VSS snapshots.\n"));
}
} else {
- Jmsg(jcr, M_FATAL, 0, _("VSS was not initialized properly.\n"));
+ berrno be;
+ Jmsg(jcr, M_FATAL, 0, _("VSS was not initialized properly. ERR=%s\n"),
+ be.bstrerror());
}
run_scripts(jcr, jcr->RunScripts, "ClientAfterVSS");
}
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2005-2010 Free Software Foundation Europe e.V.
+ Copyright (C) 2005-2012 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
}
// Initialize the COM infrastructure and the internal pointers
-bool VSSClientGeneric::Initialize(DWORD dwContext, bool bDuringRestore, bool (*VssInitCallback)(JCR *, int))
+bool VSSClientGeneric::Initialize(DWORD dwContext, bool bDuringRestore,
+ bool (*VssInitCallback)(JCR *, int))
{
CComPtr<IVssAsync> pAsync1;
VSS_BACKUP_TYPE backup_type;
// Create the internal backup components object
hr = p_CreateVssBackupComponents((IVssBackupComponents**) &m_pVssObject);
if (FAILED(hr)) {
- berrno be;
- Dmsg2(0, "VSSClientGeneric::Initialize: CreateVssBackupComponents returned 0x%08X. ERR=%s\n",
- hr, be.bstrerror(b_errno_win32));
+ Dmsg1(0, "VSSClientGeneric::Initialize: CreateVssBackupComponents returned 0x%08X.\n",
+ hr);
errno = b_errno_win32;
return false;
}
HRESULT hr;
-#if 0
- WCHAR *xml;
- int fd;
- struct stat stat;
- /* obviously this is just temporary - the xml should come from somewhere like the catalog */
- fd = open("C:\\james.xml", O_RDONLY);
- Dmsg1(0, "fd = %d\n", fd);
- fstat(fd, &stat);
- Dmsg1(0, "size = %d\n", stat.st_size);
- xml = new WCHAR[stat.st_size / sizeof(WCHAR) + 1];
- read(fd, xml, stat.st_size);
- close(fd);
- xml[stat.st_size / sizeof(WCHAR)] = 0;
-#endif
-
// 1. InitializeForRestore
hr = ((IVssBackupComponents*) m_pVssObject)->InitializeForRestore(m_metadata);
if (FAILED(hr)) {