Disk to Catalog Verification
We will now add the next step towards “end-to-end” integrity checking of
your backups – the DiskToCatalog verification. We first complete our
verification job of the /etc
directory on the client, and then add
the needed job to verify the source files against the catalog by adding
the following job resources to our configuration:
Job {
Name = Verify-RH1-etc-Job-Volume
Type = Verify
Verify Job = RH1-config
Level = VolumeToCatalog
Client = s-rh1-fd
JobDefs = DefaultJob
}
Job {
Name = Verify-RH1-etc-Job-Disk
Type = Verify
Verify Job = RH1-config
Level = DiskToCatalog
Client = s-rh1-fd
JobDefs = DefaultJob
}
The configuration should be rather self-explanatory by now –
Verify-RH1-etc-Job-Volume
ensures we can run the verification of the
latest backup on media any time, and Verify-RH1-etc-Job-Disk
allows
us to run the corresponding verification against the source files.
If we run the CatalogToDisk verification, we get a result as shown in the figure below.
main-dir JobId 28: Verifying against JobId=26 Job=RHi-config.2010-10-17_01.25.44 _49
main-dir JobId 28: Start Verify JobId=28 Level=DiskToCatalog Job=Verify-RHi—etc-Job-Disk.2010-10-17 _02.21.23_57
main-dir JobId 28: Bacula Enterprise main-dir 4.0.4 (04Sep10):
Build: x86_64-unknown-linux-gnu suse 11.1
JobId: 28
Job: Verify-RH1-etc-Job-Disk.2010-10-17 02.21.23 _57
FileSet: etc-fs
Verify Level: DiskToCatalog
Client: s-rhi-fd
Verify JobId: 26
Verify Job: RH1-config
Start time: 17-0ct-2010 02:2
End time: 17-0ct-2010 02:2
Files Examined: 2,216
Non-fatal FD errors: 0
FD termination status: OK
Termination: Verify OK
main-dir JobId 24481: Begin pruning Jobs older than 3 hours.
main-dir JobId 24481: No Jobs found to prune.
main-dir JobId 24481: Begin pruning Jobs.
main-dir JobId 24481: Pruned Files from 2 Jobs for client s-rhi-fd from catalog.
main-dir JobId 24481: End auto prune.
We will now change the verified metadata of one of the files verified, add a new file, and remove a file that existed at the time of the latest backup:
[root@lsb-254 etc]# pwd
/etc
[root@lsb-254 etc]# touch resolv.conf
[root@lsb-254 etc]# touch NEWFILE
[root@lsb-254 etc]# mv dnsmasq.conf /tmp/
The job report from a subsequent Verify-RH1-etc-Job-Disk
job clearly
indicates the differences we
created (actually, it does more – it implies that /etc/resolv.conf
and /etc/sysconfig/networking/profiles/default/resolv.conf
are hard
links to the same data).
main-dir JobId 25: Verifying against JobId=24 Job=RH1-config.2010-10-17_01.25.44_49
main-dir JobId 25: Start Verify JobId=25 Level=DiskToCatalog
Job=Verify-RH1-etc-Job-Disk.2010-10-17_02.31.25_58
main-dir JobId 25: File: /etc/sysconfig/networking/profiles/default/resolv.conf
main-dir JobId 25: st_ctime differs
main-dir JobId 25: st_mtime differs
main-dir JobId 25: File: /etc/resolv.conf
main-dir JobId 25: st_ctime differs
main-dir JobId 25: st_mtime differs
main-dir JobId 25: New file: /etc/NEWFILE
main-dir JobId 25: File: /etc/
main-dir JobId 25: st_ctime differs
main-dir JobId 25: st_mtime differs
main-dir JobId 25: Warning: The following files are in the Catalog but not on disk:
main-dir JobId 25: /etc/dnsmasq. conf
main-dir JobId 25: Bacula Enterprise main-dir 4.0.4 (04Sep10):
Build: x86_64-unknown-linux-gnu suse 11.1
JobId: 25
Job: Verify-RH1-etc-Job-Disk.2010-10-17 02.31.25_58
FileSet: etc-fs
Verify Level: DiskToCatalog
Client: s-rhi-fd
Verify JobId: 24
Verify Job: RH1-config
Start time: 17-0ct-2010 02:31:27
End time: 17-0ct-2010 02:31:40
Files Examined: 2,216
Non-fatal FD errors: 0
FD termination status: OK
Termination: Verify Differences
This verification just checked “real” metadata and does not prove that file contents changes will be noticed. However, a job report containing lines like
File: /etc/hosts
st_size differ. Cat: 187 File: 222
st_ctime differs
st_mtime differs
SHA1 digest differs. File=CRPld0oeAo4ugQ2/HCV0/JJe/EY Cat=rZUB6O05vQ3P28HUvi9B/O7917Y
indicates just those sort of changes. (With the File Set
used in the
example, the size and file time changes are also noted, of course.)
We have seen how easy it is to set up CatalogToDisk verification; it gets even easier once the configuration is generated automatically, as only very minimal information in the job resource needs to be adjusted. We have also seen that changes to the files on disk are noticed and reported, including the actual information that has changed.
Read more:
See also
Go back to:
Go to:
Go back to the main Advanced Features Usage page.