Discussion:
[bareos-users] Bareos ignores FileSet settings
s***@gmail.com
2018-08-07 13:34:54 UTC
Permalink
Hi,

Using the following fileset, /home and /var directories on hosts with these
directories on separate partitions do not get backed up ("/var is a
different filesystem. Will not descend from / into it."). Since OneFS is
set to No, I can't see the reason why this doesn't work. Does anyone have
any idea how to proceed (apart from manually adding /home and /var as
includes)?

Thanks



---------------------------------------------------------
FileSet {
Name = "LinuxAll"
Description = "Backup all regular filesystems, determined by filesystem
type."
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
One FS = No # descend into other filesystems
FS Type = btrfs
FS Type = ext2 # filesystems of given types will be backed up
FS Type = ext3 # others will be ignored
FS Type = ext4
FS Type = reiserfs
FS Type = jfs
FS Type = xfs
FS Type = zfs
}
Options {
Exclude = yes
Wild = "/var/virtualizor/backup*"
}
File = /
Exclude Dir Containing = .nobackup
}
# Things that usually have to be excluded
# You have to exclude /var/lib/bareos/storage
# on your bareos server
Exclude {
File = /backup
File = /proc
File = /tmp
File = /run
File = /sys
File = /dev
File = /var/lib/bareos
File = /var/lib/mysql
File = /var/run
File = /var/lock
File = /var/tmp
File = /.journal
File = /.fsck
}
}
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users+***@googlegroups.com.
To post to this group, send email to bareos-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diamaunt
2018-08-07 23:08:49 UTC
Permalink
Hi,
Using the following fileset, /home and /var directories on hosts with these directories on separate partitions do not get backed up ("/var is a different filesystem. Will not descend from / into it."). Since OneFS is set to No, I can't see the reason why this doesn't work. Does anyone have any idea how to proceed (apart from manually adding /home and /var as includes)?
Thanks
---------------------------------------------------------
FileSet {
  Name = "LinuxAll"
  Description = "Backup all regular filesystems, determined by filesystem type."
  Include {
    Options {
      Signature = MD5 # calculate md5 checksum per file
...
    }  
    Options {
      Exclude = yes
      Wild = "/var/virtualizor/backup*"
}
My first impression is that it's because you've got two options clauses... and somewhere, I have a faint memory about that having caused problems either for me, or others... though I could be wrong.
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users+***@googlegroups.com.
To post to this group, send email to bareos-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diamaunt
2018-08-07 23:11:38 UTC
Permalink
Hi,
Using the following fileset, /home and /var directories on hosts with these directories on separate partitions do not get backed up ("/var is a different filesystem. Will not descend from / into it."). Since OneFS is set to No, I can't see the reason why this doesn't work. Does anyone have any idea how to proceed (apart from manually adding /home and /var as includes)?
For what it's worth, here's what I've been using, that's been working:

FileSet {
Name = "LinuxAll"
Description = "Backup all regular filesystems, determined by filesystem type."
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
onefs = no # change into other filessytems
FS Type = ext2 # filesystems of given types will be backed up
FS Type = ext3 # others will be ignored
FS Type = ext4
FS Type = jfs
FS Type = xfs
FS Type = zfs
FS Type = vfat
Compression = LZ4
noatime = yes
wilddir = /*.cache
wilddir = /*.thumbnails
wilddir = /*.local/private/gvfs-metadata
wilddir = /*.local/share/Trash
wilddir = /*.mozilla/firefox/*/Cache
wilddir = /*.gvfs
wilddir = /*.mozilla/firefox/*/Cache
wilddir = /*.mozilla/firefox/*/minidumps # in case Fx crashes dumps here
wilddir = /*.mozilla/firefox/*/.parentlock # session-specific
wilddir = /*.mozilla/firefox/*/urlclassifier3.sqlite # phishing database, recreated
wilddir = /*.mozilla/firefox/*/blocklist.xml # blacklisted extensions
wilddir = /*.mozilla/firefox/*/extensions.sqlite # ext db, recreated on startup
wilddir = /*.mozilla/firefox/*/extensions.sqlite-journal
wilddir = /*.mozilla/firefox/*/extensions.rdf
wilddir = /*.mozilla/firefox/*/extensions.ini
wilddir = /*.mozilla/firefox/*/extensions.cache
wilddir = /*.mozilla/firefox/*/XUL.mfasl # cached UI data, recreated
wilddir = /*.mozilla/firefox/*/XPC.mfasl
wilddir = /*.mozilla/firefox/*/xpti.dat
wilddir = /*.mozilla/firefox/*/compreg.dat
wilddir = /*.opera/temporary_downloads
wilddir = /*.opera/cache
wilddir = /*.opera/thumbnails
wilddir = /*.opera/opcache
wilddir = /*.opera/icons
wilddir = /*.opera/application_cache
wilddir = /*.opera/widgets/*/cache
wilddir = /*.opera/lock
Exclude = yes
}
File = /
}
# Things that usually have to be excluded
# You have to exclude /tmp
# on your bareos server
Exclude {
File = /tmp
File = /proc
File = /tmp
File = /sys
File = /var/tmp
File = /.journal
File = /.fsck
}
}
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users+***@googlegroups.com.
To post to this group, send email to bareos-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
s***@gmail.com
2018-08-08 09:23:50 UTC
Permalink
Thanks, rewriting the FileSet to contain only one Options block solved the
problem. My concept was that the Exclude directive applies to the whole
Options block, however the manual says
When enabled, any files matched within the Options will be excluded from
the backup
thus only applying to wild/regex//file/dir directives.

The second Options block with its implicit default OneFS=yes prevented the
backup of directories located on different filesystems.
Post by s***@gmail.com
Hi,
Using the following fileset, /home and /var directories on hosts with
these directories on separate partitions do not get backed up ("/var is a
different filesystem. Will not descend from / into it."). Since OneFS is
set to No, I can't see the reason why this doesn't work. Does anyone have
any idea how to proceed (apart from manually adding /home and /var as
includes)?
FileSet {
Name = "LinuxAll"
Description = "Backup all regular filesystems, determined by filesystem type."
Include {
Options {
Signature = MD5 # calculate md5 checksum per file
onefs = no # change into other filessytems
FS Type = ext2 # filesystems of given types will be backed up
FS Type = ext3 # others will be ignored
FS Type = ext4
FS Type = jfs
FS Type = xfs
FS Type = zfs
FS Type = vfat
Compression = LZ4
noatime = yes
wilddir = /*.cache
wilddir = /*.thumbnails
wilddir = /*.local/private/gvfs-metadata
wilddir = /*.local/share/Trash
wilddir = /*.mozilla/firefox/*/Cache
wilddir = /*.gvfs
wilddir = /*.mozilla/firefox/*/Cache
wilddir = /*.mozilla/firefox/*/minidumps # in case Fx crashes dumps here
wilddir = /*.mozilla/firefox/*/.parentlock # session-specific
wilddir = /*.mozilla/firefox/*/urlclassifier3.sqlite # phishing database, recreated
wilddir = /*.mozilla/firefox/*/blocklist.xml # blacklisted extensions
wilddir = /*.mozilla/firefox/*/extensions.sqlite # ext db, recreated on startup
wilddir = /*.mozilla/firefox/*/extensions.sqlite-journal
wilddir = /*.mozilla/firefox/*/extensions.rdf
wilddir = /*.mozilla/firefox/*/extensions.ini
wilddir = /*.mozilla/firefox/*/extensions.cache
wilddir = /*.mozilla/firefox/*/XUL.mfasl # cached UI data, recreated
wilddir = /*.mozilla/firefox/*/XPC.mfasl
wilddir = /*.mozilla/firefox/*/xpti.dat
wilddir = /*.mozilla/firefox/*/compreg.dat
wilddir = /*.opera/temporary_downloads
wilddir = /*.opera/cache
wilddir = /*.opera/thumbnails
wilddir = /*.opera/opcache
wilddir = /*.opera/icons
wilddir = /*.opera/application_cache
wilddir = /*.opera/widgets/*/cache
wilddir = /*.opera/lock
Exclude = yes
}
File = /
}
# Things that usually have to be excluded
# You have to exclude /tmp
# on your bareos server
Exclude {
File = /tmp
File = /proc
File = /tmp
File = /sys
File = /var/tmp
File = /.journal
File = /.fsck
}
}
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users+***@googlegroups.com.
To post to this group, send email to bareos-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...