Following on from my post about excluding the base OS with a Bacula FileSet, I decided to exclude some more.
The starting point
Here are the baselines:
*estimate level=full job="knew jail snapshots" Using Catalog "MyCatalog" Connecting to Client knew-fd at knew.int.unixathome.org:9102 2000 OK estimate files=496,579 bytes=70,810,186,782 *estimate level=full job="tallboy jail snapshots" Using Catalog "MyCatalog" Connecting to Client tallboy-fd at tallboy.vpn.unixathome.org:9102 2000 OK estimate files=163,040 bytes=3,628,862,728 *estimate level=full job="zuul jail snapshots" Using Catalog "MyCatalog" Connecting to Client zuul-fd at zuul.unixathome.org:9102 2000 OK estimate files=574,237 bytes=117,950,136,800
What else will I exclude?
I decided to exclude the following as well:
/tmp /usr/local/man /usr/local/share/licenses /usr/local/share/locale /var/cache/pkg /var/db/ports /var/db/portsnap /var/tmp/nginx
Adding iocage support
Along the way, I extended the Exclude to work on server using the iocage jail management tool. I also split the Exclude out into its own file.
Here is the iocage Exclude:
Options { Exclude = yes WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/basejail" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/bin" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/boot" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/lib" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/libexec" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/rescue" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/sbin" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/sys" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/bin" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/include" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/lib" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/libdata" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/libexec" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/ports" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/sbin" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/share" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/src" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/var/ports" # mounts WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/dev" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/proc" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/basejail" # other WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/tmp" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/local/man" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/local/share/licenses" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/usr/local/share/locale" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/var/cache/pkg" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/var/db/ports" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/var/db/portsnap" WildDir = "/iocage/jails/*/root/.zfs/snapshot/snap4back/var/tmp/nginx" }
The ezjail version
And the ezjail version:
Options { Exclude = yes WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/basejail" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/bin" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/boot" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/lib" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/libexec" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/rescue" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/sbin" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/sys" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/bin" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/include" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/lib" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/libdata" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/libexec" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/ports" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/sbin" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/share" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/src" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/var/ports" # mounts WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/dev" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/proc" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/basejail" # other WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/tmp" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/local/man" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/local/share/licenses" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/usr/local/share/locale" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/var/cache/pkg" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/var/db/ports" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/var/db/portsnap" WildDir = "/usr/jails/*/.zfs/snapshot/snapshot-for-backup/var/tmp/nginx" }
The results
The files are using like this:
FileSet { Name = "zuul jail snapshots" Include { Options { signature = MD5 } Exclude Dir Containing = .NOBACKUP File = "\\|/usr/home/dan/bin/jail-snapshots-for-backup.sh list" @/usr/local/etc/bacula/fileset-excludes-for-jail-snapshots-ezjail.conf } }
After making these changes, here are the results:
*estimate level=full job="tallboy jail snapshots" Using Catalog "MyCatalog" Connecting to Client tallboy-fd at tallboy.vpn.unixathome.org:9102 2000 OK estimate files=72,844 bytes=1,950,880,305 * *estimate level=full job="knew jail snapshots" Using Catalog "MyCatalog" Connecting to Client knew-fd at knew.int.unixathome.org:9102 2000 OK estimate files=416,890 bytes=63,792,808,999 * estimate level=full job="zuul jail snapshots" Using Catalog "MyCatalog" Connecting to Client zuul-fd at zuul.unixathome.org:9102 2000 OK estimate files=468,439 bytes=113,252,932,377
A final tweak
I thought I could do some more, so I went into knew and added some more .NOBACKUP files, getting it down to:
*estimate level=full job="knew jail snapshots" Using Catalog "MyCatalog" Connecting to Client knew-fd at knew.int.unixathome.org:9102 2000 OK estimate files=388,137 bytes=62,326,817,901
It was zi who suggested I use WildDir. I don’t recall what solution I was thinking of before, but it wasn’t as good as this.