/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
status = RegOpenKeyW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\BackupRestore\\DLLPaths", &key_handle);
if (status != ERROR_SUCCESS)
{
- _JobMessageNull(M_ERROR, "Cannot get key for Exchange DLL path, result = %08x\n", status);
+ _JobMessageNull(M_FATAL, "Cannot get key for Exchange DLL path, result = %08x\n", status);
return bRC_Error;
}
status = RegQueryValueExW(key_handle, L"esebcli2", NULL, &type, NULL, &buf_len);
if (status != ERROR_SUCCESS)
{
- _JobMessageNull(M_ERROR, "Cannot get key for Exchange DLL path, result = %08x\n", status);
+ _JobMessageNull(M_FATAL, "Cannot get key for Exchange DLL path, result = %08x\n", status);
return bRC_Error;
}
buf_len += 2;
status = RegQueryValueExW(key_handle, L"esebcli2", NULL, &type, (LPBYTE)buf, &buf_len);
if (status != ERROR_SUCCESS)
{
- _JobMessageNull(M_ERROR, "Cannot get key for Exchange DLL path, result = %08x\n", status);
+ _JobMessageNull(M_FATAL, "Cannot get key for Exchange DLL path, result = %08x\n", status);
delete buf;
return bRC_Error;
}
h = LoadLibraryW(buf);
delete buf;
if (!h) {
+ _JobMessageNull(M_FATAL, "Cannot load Exchange DLL\n");
return bRC_Error;
}
HrESEBackupRestoreGetNodes = (HrESEBackupRestoreGetNodes_t)GetProcAddress(h, "HrESEBackupRestoreGetNodes");
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
buffer = NULL;
return bRC_OK;
restore_fail:
- _JobMessage(M_ERROR, "Format of %s is incorrect", full_path);
+ _JobMessage(M_FATAL, "Format of %s is incorrect", full_path);
delete buffer;
buffer = NULL;
return bRC_Error;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
_DebugMessage(0, "path = %s\n", path);
if (*path != '/')
{
- _JobMessage(M_ERROR, "Path does not begin with a '/'\n");
+ _JobMessage(M_FATAL, "Path does not begin with a '/'\n");
return bRC_Error;
}
if (i < 2 || i > 4)
{
- _JobMessage(M_ERROR, "Invalid plugin backup path\n");
+ _JobMessage(M_FATAL, "Invalid plugin backup path\n");
return bRC_Error;
}
context->root_node = new root_node_t(context->path_bits[0]);
break;
default:
- _JobMessage(M_ERROR, "unknown event=%d\n", event->eventType);
+ _JobMessage(M_FATAL, "unknown event=%d\n", event->eventType);
}
bfuncs->getBaculaValue(ctx, bVarFDName, (void *)&name);
return bRC_OK;
if (io->pkt_size != sizeof(struct io_pkt) || io->pkt_end != sizeof(struct io_pkt))
{
- _JobMessage(M_ERROR, "io_pkt size mismatch - sizeof(struct io_pkt) = %d, pkt_size = %d, pkt_end = %d\n", sizeof(struct io_pkt), io->pkt_size, io->pkt_end);
+ _JobMessage(M_FATAL, "io_pkt size mismatch - sizeof(struct io_pkt) = %d, pkt_size = %d, pkt_end = %d\n", sizeof(struct io_pkt), io->pkt_size, io->pkt_end);
}
switch(io->func) {
_DebugMessage(100, "createFile - type = %d, ofname = %s\n", rp->type, rp->ofname);
if (rp->pkt_size != sizeof(struct restore_pkt) || rp->pkt_end != sizeof(struct restore_pkt))
{
- _JobMessage(M_ERROR, "restore_pkt size mismatch - sizeof(struct restore_pkt) = %d, pkt_size = %d, pkt_end = %d\n", sizeof(struct restore_pkt), rp->pkt_size, rp->pkt_end);
+ _JobMessage(M_FATAL, "restore_pkt size mismatch - sizeof(struct restore_pkt) = %d, pkt_size = %d, pkt_end = %d\n", sizeof(struct restore_pkt), rp->pkt_size, rp->pkt_end);
+ return bRC_Error;
}
for (i = 0; i < 6; i++)
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
result = HrESEBackupOpenFile(hccx, filename, 65535, 1, &backup_file_handle, §ion_size);
if (result)
{
- _JobMessage(M_ERROR, "HrESEBackupOpenFile failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESEBackupOpenFile failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
backup_file_handle = INVALID_HANDLE_VALUE;
io->io_errno = 1;
return bRC_Error;
handle = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (handle == INVALID_HANDLE_VALUE)
{
- _JobMessage(M_ERROR, "CreateFile failed");
+ _JobMessage(M_FATAL, "CreateFile failed");
return bRC_Error;
}
restore_file_handle = (void *)handle;
}
else if (result == 0)
{
- _JobMessage(M_ERROR, "Exchange File IO API not yet supported for restore\n");
+ _JobMessage(M_FATAL, "Exchange File IO API not yet supported for restore\n");
restore_at_file_level = false;
return bRC_Error;
}
else
{
- _JobMessage(M_ERROR, "HrESERestoreOpenFile failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreOpenFile failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
return bRC_Error;
}
}
if (!WriteFile(restore_file_handle, io->buf, io->count, &bytes_written, NULL))
{
- _JobMessage(M_ERROR, "Write Error");
+ _JobMessage(M_FATAL, "Write Error");
return bRC_Error;
}
if (bytes_written != (DWORD)io->count)
{
- _JobMessage(M_ERROR, "Short write");
+ _JobMessage(M_FATAL, "Short write");
return bRC_Error;
}
io->status = bytes_written;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
case 0:
if (strcmp(PLUGIN_PATH_PREFIX_BASE, name) != 0)
{
- _JobMessage(M_ERROR, "Invalid backup path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/'\n");
+ _JobMessage(M_FATAL, "Invalid backup path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/'\n");
state = 999;
return bRC_Error;
}
case 999:
return bRC_Error;
default:
- _JobMessage(M_ERROR, "Invalid state %d", state);
+ _JobMessage(M_FATAL, "Invalid internal state %d", state);
state = 999;
}
return retval;
case 999:
retval = bRC_Error;
default:
- _JobMessage(M_ERROR, "Invalid state %d", state);
+ _JobMessage(M_FATAL, "Invalid internal state %d", state);
state = 999;
return bRC_Error;
}
case 0:
if (strcmp(name, PLUGIN_PATH_PREFIX_BASE) != 0)
{
- _JobMessage(M_ERROR, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/'\n");
+ _JobMessage(M_FATAL, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/'\n");
state = 999;
return bRC_Error;
}
case 999:
return bRC_Error;
default:
- _JobMessage(M_ERROR, "Invalid state %d", state);
+ _JobMessage(M_FATAL, "Invalid internal state %d", state);
state = 999;
}
return bRC_Error;
case 1:
return bRC_OK;
default:
- _JobMessage(M_ERROR, "Invalid state %d", state);
+ _JobMessage(M_FATAL, "Invalid internal state %d", state);
state = 999;
}
return bRC_Error;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
case 0:
if (strcmp(PLUGIN_PATH_PREFIX_SERVICE, name) != 0)
{
- _JobMessage(M_ERROR, "Invalid restore path specified, must start with /" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/\n");
+ _JobMessage(M_FATAL, "Invalid restore path specified, must start with /" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/\n");
return bRC_Error;
}
// convert name to a wide string
result = HrESEBackupPrepare(context->computer_name, PLUGIN_PATH_PREFIX_SERVICE_W, &ibi_count, &ibi, &hccx);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESEBackupPrepare failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESEBackupPrepare failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
return bRC_Error;
}
state = 1;
delete tmp;
if (current_ibi == ibi_count)
{
- _JobMessage(M_ERROR, "Invalid Storage Group '%s'\n", context->path_bits[level + 1]);
+ _JobMessage(M_FATAL, "Invalid Storage Group '%s'\n", context->path_bits[level + 1]);
return bRC_Error;
}
_DebugMessage(100, "storage group name = %s\n", first_storage_group_node->name);
result = HrESEBackupEnd(hccx);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESEBackupEnd failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESEBackupEnd failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
return bRC_Error;
}
_DebugMessage(0, "createFile_SERVICE state = %d\n", state);
if (strcmp(name, "Microsoft Information Store") != 0)
{
- _JobMessage(M_ERROR, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/'\n", state);
+ _JobMessage(M_FATAL, "Invalid restore path specified, must start with '/" PLUGIN_PATH_PREFIX_BASE "/" PLUGIN_PATH_PREFIX_SERVICE "/'\n", state);
return bRC_Error;
}
for(;;)
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
}
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESEBackupSetup failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESEBackupSetup failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
return bRC_Error;
}
}
if (current_dbi == ibi->cDatabase)
{
- _JobMessage(M_ERROR, "Invalid Database '%s'\n", context->path_bits[level + 1]);
+ _JobMessage(M_FATAL, "Invalid Database '%s'\n", context->path_bits[level + 1]);
return bRC_Error;
}
store_node = new store_node_t(tmp, this);
result = HrESEBackupGetLogAndPatchFiles(hccx, &tmp_logfiles);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESEBackupGetLogAndPatchFiles failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESEBackupGetLogAndPatchFiles failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
return bRC_Error;
}
for (len = 0, tmp_logfile_ptr = tmp_logfiles; *tmp_logfile_ptr != 0; tmp_logfile_ptr += wcslen(tmp_logfile_ptr) + 1)
result = HrESEBackupTruncateLogs(hccx);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESEBackupTruncateLogs failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESEBackupTruncateLogs failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
}
else
{
result = HrESEBackupInstanceEnd(hccx, ESE_BACKUP_INSTANCE_END_SUCCESS);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESEBackupInstanceEnd failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESEBackupInstanceEnd failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
return bRC_Error;
}
retval = bRC_OK;
result = HrESERestoreSaveEnvironment(hccx);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreSaveEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreSaveEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
rp->create_status = CF_CREATED;
return bRC_OK;
result = HrESERestoreClose(hccx, RESTORE_CLOSE_NORMAL);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreClose failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreClose failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
rp->create_status = CF_CREATED;
return bRC_OK;
result = HrESERestoreReopen(context->computer_name, service_name, saved_log_path, &hccx);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreReopen failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreReopen failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
saved_log_path = NULL;
rp->create_status = CF_CREATED;
result = HrESERestoreGetEnvironment(hccx, &restore_environment);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreGetEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreGetEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
saved_log_path = NULL;
rp->create_status = CF_CREATED;
result = HrESERestoreOpen(context->computer_name, service_name, storage_group_name, NULL, &hccx);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreOpen failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreOpen failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
break;
}
result = HrESERestoreGetEnvironment(hccx, &restore_environment);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreGetEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreGetEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
break;
}
result = HrESERestoreSaveEnvironment(hccx);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreSaveEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreSaveEnvironment failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
break;
}
restore_environment->m_wszRestoreLogPath, storage_group_name, ESE_RESTORE_COMPLETE_ATTACH_DBS);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreComplete failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreComplete failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
_DebugMessage(100, "Calling HrESERestoreClose\n");
result = HrESERestoreClose(hccx, RESTORE_CLOSE_NORMAL);
state = 999;
result = HrESERestoreClose(hccx, RESTORE_CLOSE_NORMAL);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreClose failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreClose failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
break;
}
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2008-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2008-2010 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.
case 0:
if (strcmp("DatabaseBackupInfo", context->path_bits[level + 1]) != 0)
{
- _JobMessage(M_ERROR, "DatabaseBackupInfo file must exist and must be first in directory\n");
+ _JobMessage(M_FATAL, "DatabaseBackupInfo file must exist and must be first in directory\n");
state = 999;
break;
}
result = HrESERestoreAddDatabase(hccx, dbi_node->restore_display_name, dbi_node->restore_guid, dbi_node->restore_input_streams, &dbi_node->restore_output_streams);
if (result != 0)
{
- _JobMessage(M_ERROR, "HrESERestoreAddDatabase failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+ _JobMessage(M_FATAL, "HrESERestoreAddDatabase failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
state = 999;
break;
}