- Figure out how to use ssh or stunnel to protect Bacula communications.
For 1.31 release:
+- Document what characters can go into Volume names.
+- Implement Volume name checking.
+- Default duration with no qualifier is sec should be 1 day
+- Getting the following on all directories on Win32
+ 19-May-2003 01:14 tibs-fd: Could not access c:/cygwin/home/kern/rxvt: ERR=Permission denied
+- Make sure Bacula prunes/purges canceled and failed jobs too!
- Find a solution for the multiple FileSet problem (when it is changed).
Add date?
- Cancel waiting for Client connect in SD if FD goes away.
- Possibly update all client records at startup.
- Volume names with spaces get jammed into the catalog with 0x1
i.e. the SD bashes the Volume but they are not unbased by Dir.
+ jerom-dir: MonthlySave.2003-05-10_17.12.01 Error: Unable to get Media
+ record for Volume Tape^A1: ERR=sql_get.c:788 Media record for Volume
+ "Tape^A1" not found.
+ jerom-sd: MonthlySave.2003-05-10_17.12.01 Error: Error updating Volume
+ Info: 1991 Catalog Request failed: sql_get.c:788 Media record for Volume
+ "Tape^A1" not found.
+
+- Cancellation caused JobMedia error:
+ babylon5-dir: Last FULL backup time not found. Doing FULL backup.
+ babylon5-dir: Start Backup JobId 416, Job=Zocalo_Save.2003-05-19_02.15.06
+ babylon5-sd: End of media on Volume VXA-V17-Inc-001 Bytes=31,982,900,672 Blocks=495,781.
+ babylon5-sd: Job Zocalo_Save.2003-05-19_02.15.06 waiting. Cannot find any appendable volumes.
+ babylon5-sd: Someone woke me up, but I cannot find any appendable volumes
+ for Job=Zocalo_Save.2003-05-19_02.15.06.
+ babylon5-sd: Zocalo_Save.2003-05-19_02.15.06 Fatal error: Job
+ Zocalo_Save.2003-05-19_02.15.06 canceled while waiting for mount on
+ Storage Device "Ecrix_VXA-1".
+ babylon5-sd: Zocalo_Save.2003-05-19_02.15.06 Fatal error: Cannot fixup device
+ error. Job Zocalo_Save.2003-05-19_02.15.06 canceled while waiting for
+ mount on Storage Device "Ecrix_VXA-1".
+
+ babylon5-dir: Zocalo_Save.2003-05-19_02.15.06 Error: Catalog error creating
+ JobMedia record. sql_create.c:125 Create JobMedia failed. Record already
+ exists.
+ babylon5-sd: Zocalo_Save.2003-05-19_02.15.06 Error: Error creating JobMedia
+ record: 1991 Update JobMedia error
+
+ babylon5-sd: Zocalo_Save.2003-05-19_02.15.06 Error: askdir.c:158 NULL Volume
+ name. This shouldn't happen!!!
+ zocalo-fd: Zocalo_Save.2003-05-19_02.15.06 Error: bnet.c:310 Write error
+ sending to Storage daemon:babylon5:9103: ERR=Broken pipe
+
- ChangeServiceConfig2A does not exist on WinNT (ADVAPI32.DLL).
"CREATE TABLE DelCandidates ("
"JobId INTEGER UNSIGNED NOT NULL, "
"PurgedFiles TINYINT, "
- "FileSetId INTEGER UNSIGNED)",
+ "FileSetId INTEGER UNSIGNED, "
+ "JobFiles INTEGER UNSIGNED, "
+#ifdef HAVE_MYSQL
+ "JobStatus BINARY(1))",
+#else
+ "JobStatus CHAR)",
+#endif
"CREATE INDEX DelInx1 ON DelCandidates (JobId)",
NULL};
-/* Fill candidates table with all Files subject to being deleted.
+/* Fill candidates table with all Jobs subject to being deleted.
* This is used for pruning Jobs (first the files, then the Jobs).
*/
char *insert_delcand =
"INSERT INTO DelCandidates "
- "SELECT JobId, PurgedFiles, FileSetId FROM Job "
+ "SELECT JobId,PurgedFiles,FileSetId,JobFiles,JobStatus FROM Job "
"WHERE Type='%c' "
"AND JobTDate<%s "
"AND ClientId=%u";
-/* Select files from the DelCandidates table that have a
+/* Select Jobs from the DelCandidates table that have a
* more recent backup -- i.e. are not the only backup.
- * This is the list of files to delete for a Backup Job.
+ * This is the list of Jobs to delete for a Backup Job.
*/
+#ifdef xxx
char *select_backup_del =
"SELECT DelCandidates.JobId "
"FROM Job,DelCandidates "
- "WHERE Job.JobTDate>%s "
+ "WHERE (DelCandidates.JobFiles=0) OR "
+ "(NOT DelCandidates.JobStatus='T') OR "
+ "(Job.JobTDate>%s "
"AND Job.ClientId=%u "
"AND Job.Type='B' "
"AND Job.Level='F' "
"AND Job.JobStatus='T' "
- "AND Job.FileSetId=DelCandidates.FileSetId";
+ "AND Job.FileSetId=DelCandidates.FileSetId)";
+#else
+char *select_backup_del =
+ "SELECT DelCandidates.JobId "
+ "FROM Job,DelCandidates "
+ "WHERE (Job.JobTDate>%s "
+ "AND Job.ClientId=%u "
+ "AND Job.Type='B' "
+ "AND Job.Level='F' "
+ "AND Job.JobStatus='T' "
+ "AND Job.FileSetId=DelCandidates.FileSetId)";
+#endif
-/* Select files from the DelCandidates table that have a
+/* Select Jobs from the DelCandidates table that have a
* more recent InitCatalog -- i.e. are not the only InitCatalog
- * This is the list of files to delete for a Verify Job.
+ * This is the list of Jobs to delete for a Verify Job.
*/
char *select_verify_del =
"SELECT DelCandidates.JobId "
"AND Job.FileSetId=DelCandidates.FileSetId";
-/* Select files from the DelCandidates table.
- * This is the list of files to delete for a Restore Job.
+/* Select Jobs from the DelCandidates table.
+ * This is the list of Jobs to delete for a Restore Job.
*/
char *select_restore_del =
"SELECT DelCandidates.JobId "
switch (kw) {
case 0: /* prune files */
- client = select_client_resource(ua);
+ client = get_client_resource(ua);
if (!client || !confirm_retention(ua, &client->FileRetention, "File")) {
return 0;
}
prune_files(ua, client);
return 1;
case 1: /* prune jobs */
- client = select_client_resource(ua);
+ client = get_client_resource(ua);
if (!client || !confirm_retention(ua, &client->JobRetention, "Job")) {
return 0;
}
* Then delete the Job entry, and finally and JobMedia records.
*/
for (i=0; i < del.num_ids; i++) {
- Dmsg1(050, "Delete JobId=%d\n", del.JobId[i]);
+ Dmsg1(000, "Delete JobId=%d\n", del.JobId[i]);
+#ifdef xxx
if (!del.PurgedFiles[i]) {
Mmsg(&query, del_File, del.JobId[i]);
if (!db_sql_query(ua->db, query, NULL, (void *)NULL)) {
bsendmsg(ua, "%s", db_strerror(ua->db));
}
Dmsg1(050, "Del sql=%s\n", query);
+#endif
}
bsendmsg(ua, _("Pruned %d %s for client %s from catalog.\n"), del.num_ids,
del.num_ids==1?_("Job"):_("Jobs"), client->hdr.name);
}
/*
- * Prune File records from the database. For any Job which
+ * Purge File records from the database. For any Job which
* is older than the retention period, we unconditionally delete
* all File records for that Job. This is simple enough that no
* temporary tables are needed. We simply make an in memory list of
/*
- * Purging Jobs is a bit more complicated than purging Files
- * because we delete Job records only if there is a more current
- * backup of the FileSet. Otherwise, we keep the Job record.
- * In other words, we never delete the only Job record that
- * contains a current backup of a FileSet. This prevents the
- * Volume from being recycled and destroying a current backup.
+ * Purge Job records from the database. For any Job which
+ * is older than the retention period, we unconditionally delete
+ * it and all File records for that Job. This is simple enough that no
+ * temporary tables are needed. We simply make an in memory list of
+ * the JobIds meeting the prune conditions, then delete the Job,
+ * Files, and JobMedia records in that list.
*/
int purge_jobs_from_client(UAContext *ua, CLIENT *client)
{
continue;
}
if (strcasecmp(ua->cmd, _("yes")) == 0) {
- break;
+ return 1;
+ }
+ if (strcasecmp(ua->cmd, _("no")) == 0) {
+ return 0;
}
}
return 1;