Incremental backup has the same size and amount of files

41 views
Skip to first unread message

Руслан Пилипюк

unread,
Feb 22, 2024, 9:39:17 AM2/22/24
to bareos-users
Hey guys! I was stuck trying to solve a problem with doing Incremental backup, each time when I try to do it my backup basically looks like a full backup (same size and the same amount of files). I was trying to take backup of MongoDB, using RunScript and it works good with full amount, however with incremental it looks strange

Here is my configuration files:

Pool {
  Name = "DB_hidden-pool"
  Pool Type = Backup
  Recycle = yes      
  AutoPrune = yes
  Recycle Current Volume = yes
  Recycle Oldest Volume = yes
  Volume Retention = 1 days
  Label Format = "hidden-"
  Maximum Volume Jobs = 1
}

JobDefs {
  Name = "DB_hidden-jobdefs-incr"
  Type = Backup
  Level = Incremental
  FileSet = "DB_MongoDB-fileset"
  # Schedule = "DB_2DayWeeklyCycle"
  Priority = 10
  Write Bootstrap = "%c_%n.bsr"
  Messages = Standard
  Allow Mixed Priority = yes
  Allow Duplicate Jobs = yes
  Allow Higher Duplicates = yes
  Maximum Concurrent Jobs = 10

  Storage = hz-hidden


  RunScript {
    RunsWhen = Before
    FailJobOnError = yes
    Command = "/bin/bash -c 'mongodump --verbose --host localhost --port 27017 --username hidden  --password \"`cat /root/.mongodb/pass_mongo`\" --authenticationDatabase admin --out /mnt/hidden/backups'"
  }

  RunScript {
    RunsWhen = After
    RunsOnFailure = yes

    Command = "sh -c 'rm -rf /mnt/hidden/backups/*"
  }
  Incremental Backup Pool = DB_hidden-pool-incr
  Full Backup Pool = DB_hidden-pool
  Always Incremental = yes
  Accurate = yes
}

Job {
    Name = "DB_hidden_incr-job"
    JobDefs = DB_hidden-jobdefs-incr
    Description = "Backup of hz-hidden"
    Client = DB_hidden-client
    Maximum Bandwidth =  0
    Pool = DB_hidden-pool-incr
}

FileSet {
  Name = "DB_MongoDB-fileset"
  Description = "MongoDB Backup"
  Include {
    Options {
      Signature = MD5
      Compression = LZ4
      noatime = yes
    }
    File = "/mnt/hidden/backups"
  }
}

Also, in logs of my Backup Job, first time it output that no full backups was present and it made a full backup but after that it was trying to do Incremental backup and no errors are present there and everything looks fine.

Any tips or advices are greatly appreciated


Bruno Friedmann (bruno-at-bareos)

unread,
Feb 22, 2024, 10:49:28 AM2/22/24
to bareos-users
The culprit is Command = "sh -c 'rm -rf /mnt/hidden/backups/*"

Everyday you add new file, as so they are picked by the fd because they are new 

Seems you have to return to the design board ;-)

Руслан Пилипюк

unread,
Feb 22, 2024, 11:27:30 AM2/22/24
to bareos-users
Thank you for your reply, could you please specify on how I should redesign it? As right now It seems for me like there is no way, to get around it that files are new each time due clearing directory after job has finished

Kind Regards

четверг, 22 февраля 2024 г. в 17:49:28 UTC+2, Bruno Friedmann (bruno-at-bareos):
Reply all
Reply to author
Forward
0 new messages