 +   /* get deleted files */
 +   while (dir->recv() >= 0) {
 +      Dmsg1(1, "deleted = %s\n", dir->msg);
++      encode_and_send_deleted_files(jcr, dir->msg); 
 +   }
 +   /* get missing files */
 +   while (dir->recv() >= 0) {

===================================================================
--- src/filed/backup.c	(rvision 6372)
+++ src/filed/backup.c	(copie de travail)
@@ -50,6 +50,109 @@
 static bool crypto_session_send(JCR *jcr, BSOCK *sd);
 
 /*
+ * Called by save_file when accept/discard file for backup

    Dmsg2(300, ">stored: attr len=%d: %s\n", sd->msglen, sd->msg);
    if (!stat) {
       Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
@@ -1121,6 +1244,58 @@
    return true;
 }
 
+static bool encode_and_send_deleted_files(JCR *jcr, char *fname) 
+{
+   BSOCK *sd = jcr->store_bsock;
+   char *attribs;
+   char *attribsEx;
+   int stat;
+#ifdef FD_NO_SEND_TEST
+   return true;
+#endif
+
+   attribs = " ";
+   attribsEx = " ";
+
+   /*
+    * Send Attributes header to Storage daemon
+    *    <file-index> <stream> <info>
+    */
+   if (!sd->fsend("%ld %d 0", 0, STREAM_UNIX_ATTRIBUTES)) {
+      Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+            sd->bstrerror());
+      return false;
+   }
+   Dmsg1(300, ">stored: attrhdr %s\n", sd->msg);
+
+   /*
+    * Send file attributes to Storage daemon
+    *   File_index
+    *   File type
+    *   Filename (full path)
+    *   Encoded attributes
+    *   Link name (if type==FT_LNK or FT_LNKSAVED)
+    *   Encoded extended-attributes (for Win32)
+    *
+    * For a directory, link is the same as fname, but with trailing
+    * slash. For a linked file, link is the link.
+    */
+   stat = sd->fsend("%ld %d %s%c%s%c%s%c%s%c", 
+		    0 /* FileIndex */,
+		    FT_NOSTAT /* FileType */,
+		    fname /* FileName */, 
+		    0, attribs, 0, 0, 0, attribsEx, 0);
+
+   Dmsg2(300, ">stored: attr len=%d: %s\n", sd->msglen, sd->msg);
+   if (!stat) {
+      Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+            sd->bstrerror());
+      return false;
+   }
+   sd->signal(BNET_EOD);            /* indicate end of attributes data */
+   return true;
+}
+
 /* 
  * Do in place strip of path
  */
Index: src/filed/job.c
===================================================================
--- src/filed/job.c	(rvision 6372)
