Re: Incremental and permission changes
Eric Bollengier via Bacula-users <[email protected]> Thu, 12 Feb 2026 15:00:16 +0100
| Newsgroups | gmane.comp.bacula.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Josip, Chris, An other idea will be to use the accurate option to update only attributes. https://www.docs.baculasystems.com/BETechnicalReference/Director/DirectorResourceTypes/FilesetResource/index.html#technicalreferencedirfilesetresource ---8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<---- o Check signature if other options would cause a backup, and if the signature is unchanged, back up only file metadata. The ’o’ option should be used in conjunction with one of the signature checking options (1, 2, 3, or 5). When the option is specified, the signature is computed only for files that have one of the other accurate options specified triggering a backup of the file (for example an inode change, a permission change, etc…). In cases where only the file’s metadata has changed (ie: the signature is identical), only the file’s attributes will be backed up. If the file’s data has been changed (hence a different signature), the file will be backed up in the usual way. This can save considerable space when backing up files which have only metadata part changed (e.g. changed permissions). The ’pinug2o’ options could be used, which will then cause the File Daemon to compare permission bits, inotes, number of links, owner user and group and if any of it changes it will also compute the file’s signature to verify if only metadata need to be backed up or is it needed to back up the file’s contents. ---8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------8<---- This feature will be available in the next 17.0 that is still cooking in our lab. Best Regards, Eric On 2/5/26 10:24, Josip Deanovic via Bacula-users wrote: > On 2026-02-05 09:33, Chris Wilkinson wrote: >> I was rather hoping that someone would suggest how to overcome this as I >> keep running into the same issue. >> >> -Chris >> >> On Thu, 5 Feb 2026, 08:18 Andrea Venturoli, <[email protected]> wrote: >> >>> On 2/2/26 10:13, Andrea Venturoli wrote: >>> > Hello. >>> > >>> > In an installation I manage, there's a NAS with lot of data that is >>> > backed up with the usual Full/Diff/Inc schedule. >>> > On this NAS it's quite frequent to have sweeping permission changes; >>> > alas these almost translate an Incremental backup into a Full one. >>> > >>> > I don't care about permissions: I can set them up automatically after a >>> > restore, so I'd like to avoid this. >>> > >>> > What's the proper way to tell Bacula NOT to backup a file if only its >>> > permission changed? >>> > Or, again, don't backup permissions at all, if the above is not feasible? >>> > >>> > I also thought about using "accurate: mco1", which should backup the >>> > permissions, but not the files themself. This could do... >>> > Before putting it into production, though, are there any caveat? >>> > >>> > Any other idea? >>> >>> No one? >>> >>> bye & Thanks >>> av. >>> > > Hello > > If I understood the problem correctly, the solution is rather simple. > You can modify your file set and specify the option "mtimeonly = yes" > like this: > > FileSet { > Name = "your_fileset" > Include { > Options { > mtimeonly = yes > # ... other options like compression, fstype, etc. > } > File = /some_path > # ... > } > } > > Here is the excerpt from Bacula documentation: > > https://www.docs.baculasystems.com/BETechnicalReference/Director/ > DirectorResourceTypes/FilesetResource/ > index.html#technicalreferencedirfilesetresource > > -----BEGIN----- > Mtime Only > > Description: If enabled, tells the Client that the selection of files > during Incremental and Differential backups should based only on the > st_mtime value in the stat() packet. > > Value(s): <No|Yes> > > Data Type: > > Comment: The default is no which means that the selection of files to > be backed up will be based on both the st_mtime and the st_ctime values. > In general, it is not recommended to use this option. > > Important > > When the Job resource is configured using accurate mode, it will take > precedence over the mtimeonly option used in the Fileset resource. It means > that the mtimeonly option will not be considered, but the accurate options > defined in the Fileset resource. > -----END----- > > > So, if you use Accurate = yes, you will need to configure Accurate flags: > m compare the modification time (st_mtime) > c compare the change time (st_ctime) > s compare the size > > By default, Bacula would use "accurate = mcs" > > > Note that file's ctime gets updated when at least one of the following changes > occur: permissions, ownership, group ownership, name, size, mtime, ACLs, > extended file system attributes related to a file. > I am not sure if I left something out. > > So, in this particular case, ignoring ctime should be safe. > If the content of files change, the files would be selected for backup. > > I like flexible software like Bacula. :-) > > > Regards > _______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users