/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-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.
STORE *store;
foreach_res(store, R_STORAGE) {
STORAGE_DBR sr;
- MEDIATYPE_DBR mr;
+ MEDIATYPE_DBR mtr;
memset(&sr, 0, sizeof(sr));
- memset(&mr, 0, sizeof(mr));
+ memset(&mtr, 0, sizeof(mtr));
if (store->media_type) {
- bstrncpy(mr.MediaType, store->media_type, sizeof(mr.MediaType));
- mr.ReadOnly = 0;
- db_create_mediatype_record(NULL, db, &mr);
+ bstrncpy(mtr.MediaType, store->media_type, sizeof(mtr.MediaType));
+ mtr.ReadOnly = 0;
+ db_create_mediatype_record(NULL, db, &mtr);
} else {
- mr.MediaTypeId = 0;
+ mtr.MediaTypeId = 0;
}
bstrncpy(sr.Name, store->name(), sizeof(sr.Name));
sr.AutoChanger = store->autochanger;
/* Set type in global for debugging */
set_db_type(db_get_type(db));
-#ifdef BEEF_DEMO
- /*
- * Demo mode only allows SQLite3
- */
- if (!bstrcmp(db_get_type(db), "SQLite3")) {
- Jmsg(NULL, M_FATAL, 0, _("Failed to initialize database backend\n"));
- OK = false;
- }
-#endif
-
db_close_database(NULL, db);
}
return OK;
POOLMEM *cleanup = get_pool_memory(PM_MESSAGE);
POOLMEM *results = get_pool_memory(PM_MESSAGE);
copy_base_name(cleanup);
- pm_strcat(cleanup, "*.bsr");
+ pm_strcat(cleanup, "*.restore.*.bsr");
run_program(cleanup, 0, results);
copy_base_name(cleanup);
pm_strcat(cleanup, "*.mail");