From 323ae5bd3344eb64050ba5447e8e0ecfaf7444f7 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 1 May 2010 10:59:06 +0200 Subject: [PATCH] Remove RestoreObjects when pruning Jobs --- bacula/src/dird/ua_purge.c | 5 +++++ 1 file changed, 5 insertions(+) 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 */ -- 2.39.5