  
 Index: src/dird/dird_conf.c
 ===================================================================
---- src/dird/dird_conf.c	(rvision 6368)
-+++ src/dird/dird_conf.c	(copie de travail)
+--- src/dird/dird_conf.c	(revision 6372)
++++ src/dird/dird_conf.c	(working copy)
 @@ -319,6 +319,7 @@
     {"selectionpattern", store_str, ITEM(res_job.selection_pattern), 0, 0, 0},
     {"runscript", store_runscript, ITEM(res_job.RunScripts), 0, ITEM_NO_EQUALS, 0},

    SCHED     *schedule;               /* When -- Automatic schedule */
Index: src/filed/backup.c
===================================================================
--- src/filed/backup.c	(rvision 6368)
+++ src/filed/backup.c	(copie de travail)
@@ -49,7 +49,84 @@
 static void crypto_session_end(JCR *jcr);
 static bool crypto_session_send(JCR *jcr, BSOCK *sd);
 
+#define backup_stat(x,y,z) (x.z = y.z ; y.z = 0)
+
 /*
+ * Called by save_file when accept/discard file for backup
+ * TODO: we could add MD5/SHAX digest, but we have to compute it

+   struct stat statc;                 /* catalog stat */
+   int stat = JS_Terminated;
+   char buf[MAXSTRING];
+   char ed1[50], ed2[50];
+   POOLMEM *fname = get_pool_memory(PM_MESSAGE);
+   int do_Digest = CRYPTO_DIGEST_NONE;
+   int32_t file_index = 0;
+   JobId_t JobId=0;		/* TODO: compute the job key in new table */
+   JobId_t backupid=0;
+
+   memset(&fdbr, 0, sizeof(FILE_DBR));
+   fd = jcr->file_bsock;
+   fdbr.JobId = JobId;		
+   jcr->FileIndex = 0;
+
+   if (jcr->accurate == false || jcr->JobLevel == L_FULL) {
+      return true;
+   }
+
+   backupid = db_find_backupid(jcr, jcr->db, &jcr->jr);
+   if (!backupid) {
+      Jmsg(jcr, M_ERROR, 0, _("Can't use Accurate mode ERR=Can't find BackupId\n"));
+      return false;
+   }
+
+   Dmsg0(20, "bdird: waiting to receive file attributes\n");
+   /*
