]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport bacula/src/findlib/find.h
authorAlain Spineux <alain@baculasystems.com>
Mon, 20 Apr 2020 14:41:35 +0000 (16:41 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 29 Apr 2021 08:44:16 +0000 (10:44 +0200)
This commit is the result of the squash of the following main commits:

Author: Eric Bollengier <eric@baculasystems.com>
Date:   Thu Dec 19 11:07:42 2019 +0100

    win32: Fix #5801 about incorrect File=/ behavior with subvolumes in backup and estimate jobs

Author: Alain Spineux <alain@baculasystems.com>
Date:   Mon Nov 12 11:07:04 2018 +0100

    win32: Fix #4286 about the restore of a volume root directory with the hidden & system attributes

    - Detect root directories like C:\ or C:\mount_point
      and setup st_rdev=WIN32_ROOT_POINT to tell restore to not restore
      the hidden and system attributes
    - Be aware that there is 2 different "directories" (1) the parent
      directory like c:\mount_point and (2) the root directory of the volume
      that your are attaching to the parent. The attributes that you see is
      the attribute of (1) but for drive letters, their is no (1) then
      you see always (2) (that are hidden and system).
      When VSS snapshot is used

Author: Alain Spineux <alain@baculasystems.com>
Date:   Tue Aug 28 17:14:31 2018 +0200

    snapshot: maintain both paths instead of stripping and unstripping

    - snap_fname is the path inside the snapshot used for "system" operation
    - fname is the path from the FileSet used for display and for SD or DIR
      "computation"
    - when snapshot is not in used, both are equal

Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat May 3 16:10:37 2014 +0200

    Add deduplication directives

bacula/src/findlib/find.h

index f69f3edaf8955de3bf40ce89fd944fdfd0ce39fc..cdf141c9e2f19826bd7beb394ab58dd48d6aba4c 100644 (file)
@@ -64,6 +64,7 @@ struct s_included_file {
    struct s_included_file *next;
    uint64_t options;                  /* backup options */
    uint32_t algo;                     /* compression algorithm. 4 letters stored as an interger */
+   int Dedup_level;                   /* Dedup level */
    int Compress_level;                /* compression level */
    int len;                           /* length of fname */
    int pattern;                       /* set if wild card pattern */
@@ -97,6 +98,7 @@ struct findFOPTS {
    uint64_t flags;                    /* options in bits */
    uint32_t Compress_algo;            /* compression algorithm. 4 letters stored as an interger */
    int Compress_level;                /* compression level */
+   int Dedup_level;                   /* dedup level 0=None, 1=Global, 2=Client */
    int strip_path;                    /* strip path count */
    char VerifyOpts[MAX_FOPTS];        /* verify options */
    char AccurateOpts[MAX_FOPTS];      /* accurate mode options */
@@ -122,6 +124,7 @@ struct findINCEXE {
    dlist name_list;                   /* filename list -- holds dlistString */
    dlist plugin_list;                 /* plugin list -- holds dlistString */
    char *ignoredir;                   /* ignore directories with this file */
+   bool  list_drives;                 /* list drives on win32 (File=/) */
 };
 
 /*
@@ -148,6 +151,7 @@ struct HFSPLUS_INFO {
 struct FF_PKT {
    char *top_fname;                   /* full filename before descending */
    char *fname;                       /* full filename */
+   char *snap_fname;                  /* the path on the snapshot or fname */
    char *link;                        /* link if file linked */
    char *object_name;                 /* Object name */
    char *object;                      /* restore object */
@@ -157,12 +161,10 @@ struct FF_PKT {
    char *volume_path;                 /* volume path */
    char *snapshot_path;               /* snapshot path */
    char *top_fname_save;
-   POOLMEM *snap_fname;               /* buffer used when stripping path */
    POOLMEM *snap_top_fname;
-   bool strip_snap_path;              /* convert snapshot path or not */
    bool (*snapshot_convert_fct)(JCR *jcr, FF_PKT *ff, dlist *filelist, dlistString *node);
+   bool root_of_volume;               /* the root of a volume, like C:\ or C:\mount_point\ssd */
 
-   POOLMEM *sys_fname;                /* system filename */
    POOLMEM *fname_save;               /* save when stripping path */
    POOLMEM *link_save;                /* save when stripping path */
    POOLMEM *ignoredir_fname;          /* used to ignore directories */
@@ -201,6 +203,7 @@ struct FF_PKT {
    uint64_t flags;                    /* backup options */
    uint32_t Compress_algo;            /* compression algorithm. 4 letters stored as an interger */
    int Compress_level;                /* compression level */
+   int Dedup_level;                   /* dedup level 0=None, 1=Global, 2=Client */
    int strip_path;                    /* strip path count */
    bool cmd_plugin;                   /* set if we have a command plugin */
    bool opt_plugin;                   /* set if we have an option plugin */