Skip to content

Instantly share code, notes, and snippets.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
@asmartin
asmartin / gist:5ec56b3624c3956f1bdc
Created February 21, 2016 19:03
DataGuard Backup
===DataGuard Backup===
==== The Problem ====
Most filesystems do not perform data checksumming to ensure that data on disk has not been corrupted (e.g by bad memory, gamma rays, etc). Using ECC RAM helps to reduce the amount of errors, but nevertheless the threat if silent corruption still exists [1]. ZFS is a better filesystem in that it performs internal data checksumming and handle disk-based corruption, but does not do well if memory is the source of corruption [2]. Therefore, to ensure data integrity, a secondary, external checksum must be performed.
It is best to use DataGuard Backup with with separate filesystems, at least one of which is ZFS. It also helps if one filesystem is "at rest" (unmounted) except when performing backups so that it is not suseptible to bit-flipping in memory except during the backup.
Note that to ensure this level of data integrity a speed compromise is required (due to all of the checksumming). If you want fast backups, use `rsync`. DataGuard Backup sacrifices speed in o