From: Kern Sibbald Date: Sat, 1 May 2010 08:59:06 +0000 (+0200) Subject: Remove RestoreObjects when pruning Jobs X-Git-Tag: Release-5.2.1~1382 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3a80b2fb8bbe9fdf8870da53440535e27a6e3f9b;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 */