Index: server-src/holding.c
===================================================================
RCS file: /cvsroot/amanda/amanda/server-src/holding.c,v
retrieving revision 1.17.2.12
diff -u -r1.17.2.12 holding.c
--- server-src/holding.c	2000/06/02 14:31:47	1.17.2.12
+++ server-src/holding.c	2001/05/01 21:33:24
@@ -366,6 +366,7 @@
     return size;
 }
 
+#define	SAVE_BASE	"/amanda0/backup/amanda-hold-save/"
 
 int unlink_holding_files( holding_file )
 char *holding_file;
@@ -375,6 +376,8 @@
     char buffer[TAPE_BLOCK_BYTES];
     dumpfile_t file;
     char *filename;
+    char *last_slash;
+    char *save_filename;
 
     filename = stralloc(holding_file);
     while(filename != NULL && filename[0] != '\0') {
@@ -386,6 +389,15 @@
 	buflen=fill_buffer(fd, buffer, sizeof(buffer));
 	parse_file_header(buffer, &file, buflen);
 	close(fd);
+	if((last_slash = strrchr(filename, '/')) != NULL) {
+	    save_filename = stralloc2(SAVE_BASE, last_slash + 1);
+	    unlink(save_filename);
+	    if(link(filename, save_filename) != 0) {
+		fprintf(stderr, "unlink_holding_files: link(%s,%s): %s\n",
+			filename, save_filename, strerror(errno));
+	    }
+	    amfree(save_filename);
+	}
 	unlink(filename);
 	filename = newstralloc(filename,file.cont_filename);
     }
