1 diff -Naur cvs/src/baconfig.h my/src/baconfig.h
2 --- cvs/src/baconfig.h 2006-12-30 17:01:49.000000000 +0100
3 +++ my/src/baconfig.h 2006-12-30 17:01:34.000000000 +0100
5 * Replace codes needed in both file routines and non-file routines
6 * Job replace codes -- in "replace"
8 -#define REPLACE_ALWAYS 'a'
9 -#define REPLACE_IFNEWER 'w'
10 -#define REPLACE_NEVER 'n'
11 -#define REPLACE_IFOLDER 'o'
12 +#define REPLACE_ALWAYS 'a'
13 +#define REPLACE_IFNEWER 'w'
14 +#define REPLACE_NEVER 'n'
15 +#define REPLACE_IFOLDER 'o'
16 +#define REPLACE_ATTR_ALWAYS 'r'
17 +#define REPLACE_ATTR_IFEXISTS 's'
19 /* This probably should be done on a machine by machine basis, but it works */
20 /* This is critical for the smartalloc routines to properly align memory */
21 diff -Naur cvs/src/dird/dird_conf.c my/src/dird/dird_conf.c
22 --- cvs/src/dird/dird_conf.c 2006-12-22 20:47:00.000000000 +0100
23 +++ my/src/dird/dird_conf.c 2006-12-30 17:30:42.000000000 +0100
25 {"ifnewer", REPLACE_IFNEWER},
26 {"ifolder", REPLACE_IFOLDER},
27 {"never", REPLACE_NEVER},
28 + {"attributes", REPLACE_ATTR_ALWAYS},
29 + {"attributesifexists", REPLACE_ATTR_IFEXISTS},
33 diff -Naur cvs/src/filed/restore.c my/src/filed/restore.c
34 --- cvs/src/filed/restore.c 2006-12-21 13:53:48.000000000 +0100
35 +++ my/src/filed/restore.c 2006-12-30 17:22:29.000000000 +0100
40 + if (jcr->replace == REPLACE_ATTR_ALWAYS ||
41 + jcr->replace == REPLACE_ATTR_IFEXISTS)
43 + extract = false; /* we just want attributes */
47 /* set attributes now because file will not be extracted */
48 set_attributes(jcr, attr, &bfd);
49 diff -Naur cvs/src/findlib/create_file.c my/src/findlib/create_file.c
50 --- cvs/src/findlib/create_file.c 2006-12-20 20:48:59.000000000 +0100
51 +++ my/src/findlib/create_file.c 2006-12-30 17:29:17.000000000 +0100
53 Qmsg(jcr, M_SKIPPED, 0, _("File skipped. Already exists: %s\n"), attr->ofname);
56 + case REPLACE_ATTR_ALWAYS:
62 + } else { /* File doesn't exists anymore */
63 + if (replace == REPLACE_ATTR_IFEXISTS) {
64 + Qmsg(jcr, M_SKIPPED, 0, _("File skipped. Doesn't exists anymore: %s\n"), attr->ofname);
69 case FT_RAW: /* raw device to be written */