]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl add update volume=xxx recyclepool=yyyy
authorEric Bollengier <eric@eb.homelinux.org>
Sat, 17 Feb 2007 17:31:07 +0000 (17:31 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sat, 17 Feb 2007 17:31:07 +0000 (17:31 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4195 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/cats/sql_update.c

index 918e571a9927b2ec19d81c4c0432c02220212047..c4174369eb08296b5586975e95fe01079917be4a 100644 (file)
@@ -399,30 +399,32 @@ int
 db_update_media_defaults(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
 {
    int stat;
-   char ed1[50], ed2[50], ed3[50], ed4[50];
+   char ed1[50], ed2[50], ed3[50], ed4[50], ed5[50];
 
 
    db_lock(mdb);
    if (mr->VolumeName[0]) {
       Mmsg(mdb->cmd, "UPDATE Media SET "
            "Recycle=%d,VolRetention=%s,VolUseDuration=%s,"
-           "MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s"
+           "MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s,RecyclePoolId=%s"
            " WHERE VolumeName='%s'",
            mr->Recycle,edit_uint64(mr->VolRetention, ed1),
            edit_uint64(mr->VolUseDuration, ed2),
            mr->MaxVolJobs, mr->MaxVolFiles,
            edit_uint64(mr->MaxVolBytes, ed3),
+           edit_uint64(mr->RecyclePoolId, ed4),
            mr->VolumeName);
    } else {
       Mmsg(mdb->cmd, "UPDATE Media SET "
            "Recycle=%d,VolRetention=%s,VolUseDuration=%s,"
-           "MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s"
+           "MaxVolJobs=%u,MaxVolFiles=%u,MaxVolBytes=%s,RecyclePoolId=%s"
            " WHERE PoolId=%s",
            mr->Recycle,edit_uint64(mr->VolRetention, ed1),
            edit_uint64(mr->VolUseDuration, ed2),
            mr->MaxVolJobs, mr->MaxVolFiles,
            edit_uint64(mr->MaxVolBytes, ed3),
-           edit_int64(mr->PoolId, ed4));
+           edit_int64(mr->RecyclePoolId, ed4),
+           edit_int64(mr->PoolId, ed5));
    }
 
    Dmsg1(400, "%s\n", mdb->cmd);