0

"Append only" attribute set with this command chattr -R +a /mnt/A causes bacula to keep incrementally backing up files, even if they did not change. I was able to determine this by comparing the files+folder count of attributes +a with the count of backed up files.

this is the file set

# file set of archivio
FileSet {
  Name = "archivio set"
  Include {
    Options {
      signature=MD5
      # compression=GZIP    # slows down a lot (from 120MB/s to 30MB/s)
      verify = pins5
      onefs = yes
    }
    File = "/mnt/A/"
  }
  Exclude {
    # exclude .cestino directory since deleted files are already backed up in previous bacula jobs
    # don't know why but /* is required, otherwise the files in this directory are not excluded
    File = "/mnt/A/.cestino/*"
  }
}

this is the job

# Backup archivio
Job {
  Name = "archivio backup"
  Schedule = "schedule archivio"
  # set to 31 days so that if the monthly full archivio backup is missed because of offline server
  # it will be rerun as soon as possible
  Max Full Interval = 31 days
  # set to 8 days so that if the weekly diff archivio backup is missed because of offline server
  # it will be rerun as soon as possible
  Max Diff Interval = 8 days
  Enabled = yes
  Priority = 10
  Type = Backup
  Level = Full
  Client = servbros-client
  Storage = servbros-storage
  FileSet = "archivio set"
  Pool = archivio-pool-diff
  Full Backup Pool = archivio-pool-full     # specifies a Pool to be used for Full backups
  Incremental Backup Pool = archivio-pool-incr  # specifies a Pool to be used for Differential backups
  Differential Backup Pool = archivio-pool-diff # specifies a Pool to be used for Incremental backups
  Accurate = yes
  Reschedule Interval = 1h
  Reschedule On Error = yes
  Reschedule Incomplete Jobs = yes
  Reschedule Times = 3
  # notify start of job
  RunBeforeJob = "python3.8 /mnt/A/commands/notify.py -l '<b>Bacula</b>' 'starting: %n' 'job id: %i' 'job type: %t - %l'"
  # create ASCII copy of catalog and store it
  RunAfterJob = "/etc/bacula/scripts/make_catalog_backup.pl servbros-catalog"
  RunAfterJob = "mv /var/lib/bacula/bacula.sql /mnt/B/bacula-database/%c-%j-job%i.sql"
  RunAfterJob = "chmod 644 /mnt/B/bacula-database/%c-%j-job%i.sql"
  # don't use variable strings as data is appended to file when !Full backup
  Write Bootstrap = "/mnt/B/bacula-bootstrap/%c-%n.bsr"
  Messages = telegram
}
  1. Why such behaviour?
  2. What can I do to keep this attribute and still having a functional bacula backup?
  3. Is it possible to know via baculum/bconsole why a file was chosen to be backed up? (cause i lost a good hour and half trying to find why those files were being backed up)
gekigek99
  • 103
  • 4

1 Answers1

0

problem was caused by crontab changing c_time of the folder that casue it to be backed up.

Issue fixed by adding accurate = pinsm so that c_time is not considered as a factor to backup a file. (the job mus be run in accurate mode)

# file set of archivio
FileSet {
  Name = "archivio set"
  Include {
    Options {
      signature=MD5
      # compression=GZIP    # slows down a lot (from 120MB/s to 30MB/s)
      verify = pins5
      accurate = pinsm
      onefs = yes
    }
    File = "/mnt/A/"
  }
  Exclude {
    # exclude .cestino directory since deleted files are already backed up in previous bacula jobs
    # don't know why but /* is required, otherwise the files in this directory are not excluded
    File = "/mnt/A/.cestino/*"
  }
}
gekigek99
  • 103
  • 4