From: Kern Sibbald Date: Sat, 1 May 2010 08:59:06 +0000 (+0200) Subject: Remove RestoreObjects when pruning Jobs X-Git-Tag: Release-7.0.0~1847 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=323ae5bd3344eb64050ba5447e8e0ecfaf7444f7;p=bacula%2Fbacula Remove RestoreObjects when pruning Jobs --- diff --git a/bacula/src/dird/ua_purge.c b/bacula/src/dird/ua_purge.c index 539586d443..ff9c7df4d2 100644 --- a/bacula/src/dird/ua_purge.c +++ b/bacula/src/dird/ua_purge.c @@ -423,6 +423,11 @@ void purge_jobs_from_catalog(UAContext *ua, char *jobs) db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL); Dmsg1(050, "Delete Log sql=%s\n", query.c_str()); + Mmsg(query, "DELETE FROM RestoreObject WHERE JobId IN (%s)", jobs); + db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL); + Dmsg1(050, "Delete RestoreObject sql=%s\n", query.c_str()); + + upgrade_copies(ua, jobs); /* Now remove the Job record itself */