1 /*
2    BAREOS® - Backup Archiving REcovery Open Sourced
3 
4    Copyright (C) 2001-2010 Free Software Foundation Europe e.V.
5    Copyright (C) 2011-2012 Planets Communications B.V.
6    Copyright (C) 2013-2016 Bareos GmbH & Co. KG
7 
8    This program is Free Software; you can redistribute it and/or
9    modify it under the terms of version three of the GNU Affero General Public
10    License as published by the Free Software Foundation and included
11    in the file LICENSE.
12 
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16    Affero General Public License for more details.
17 
18    You should have received a copy of the GNU Affero General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22 */
23 /*
24  * Kern Sibbald MMI
25  * Extracted from findlib/find.h Nov 2010
26  * Switched to enum Nov 2014, Marco van Wieringen
27  */
28 /**
29  * @file
30  * File types
31  */
32 
33 #ifndef BAREOS_INCLUDE_FILEOPTS_H_
34 #define BAREOS_INCLUDE_FILEOPTS_H_
35 
36 /**
37  * Options saved in "options" of the include/exclude lists.
38  * They are directly jammed into "flag" of ff packet
39  */
40 enum {
41    FO_PORTABLE_DATA = 0, /**< Data is portable */
42    FO_MD5 = 1,           /**< Do MD5 checksum */
43    FO_COMPRESS = 2,      /**< Do compression */
44    FO_NO_RECURSION = 3,  /**< No recursion in directories */
45    FO_MULTIFS = 4,       /**< Multiple file systems */
46    FO_SPARSE = 5,        /**< Do sparse file checking */
47    FO_IF_NEWER = 6,      /**< Replace if newer */
48    FO_NOREPLACE = 7,     /**< Never replace */
49    FO_READFIFO = 8,      /**< Read data from fifo */
50    FO_SHA1 = 9,          /**< Do SHA1 checksum */
51    FO_PORTABLE = 10,     /**< Use portable data format -- no BackupWrite */
52    FO_MTIMEONLY = 11,    /**< Use mtime rather than mtime & ctime */
53    FO_KEEPATIME = 12,    /**< Reset access time */
54    FO_EXCLUDE = 13,      /**< Exclude file */
55    FO_ACL = 14,          /**< Backup ACLs */
56    FO_NO_HARDLINK = 15,  /**< Don't handle hard links */
57    FO_IGNORECASE = 16,   /**< Ignore file name case */
58    FO_HFSPLUS = 17,      /**< Resource forks and Finder Info */
59    FO_WIN32DECOMP = 18,  /**< Use BackupRead decomposition */
60    FO_SHA256 = 19,       /**< Do SHA256 checksum */
61    FO_SHA512 = 20,       /**< Do SHA512 checksum */
62    FO_ENCRYPT = 21,      /**< Encrypt data stream */
63    FO_NOATIME = 22,      /**< Use O_NOATIME to prevent atime change */
64    FO_ENHANCEDWILD = 23, /**< Enhanced wild card processing */
65    FO_CHKCHANGES = 24,   /**< Check if file have been modified during backup */
66    FO_STRIPPATH = 25,    /**< Check for stripping path */
67    FO_HONOR_NODUMP = 26, /**< Honor NODUMP flag */
68    FO_XATTR = 27,        /**< Backup Extended Attributes */
69    FO_DELTA = 28,        /**< Delta data -- i.e. all copies returned on restore */
70    FO_PLUGIN = 29,       /**< Plugin data stream -- return to plugin on restore */
71    FO_OFFSETS = 30,      /**< Keep I/O file offsets */
72    FO_NO_AUTOEXCL = 31,  /**< Don't use autoexclude methods */
73    FO_FORCE_ENCRYPT = 32 /**< Force encryption */
74 };
75 
76 /**
77  * Keep this set to the last entry in the enum.
78  */
79 #define FO_MAX FO_FORCE_ENCRYPT
80 
81 /**
82  * Make sure you have enough bits to store all above bit fields.
83  */
84 #define FOPTS_BYTES NbytesForBits(FO_MAX + 1)
85 
86 #endif /* __BFILEOPTSS_H */
87