SnapRAID
SnapRAID is a folder-based backup tool that behaves like a software or hardware RAID5/6 disk raid, but is not a disk raid itself. There is no realtime recovery, free space between disks cannot be combined and manual excution of backup is needed.
Because of the nature of folder-based backup, SnapRAID is more flexible and simpler than software raids. Although disk raids have advantages such as realtime backup, increased complexity or reduced performance are the drawback. Not to mention a two-disk failure or a SATA URE (Unrecoverable Read Error) happening to RAID5 could damage all data, which is not the case with SnapRAID. Thus the use of SnapRAID is logical when backup is the main goal rather than preventing a system from going offline due to disk failure.
SnapRAID works by storing parity of all folders to another disk. The destination disk which the parity file is stored on should be the largest. Other disks do not have this restriction and can be of any size. Summing up, SnapRAID is suitable for media centers where files are usually large and rarely changed. SnapRAID is highly flexible and can be configured to add/remove disk at any time. Also, more than one redundant disks are supported.
Installation
Install the snapraidAUR package.
Usage
See also Manual for SnapRAID.
We have four disks with data on them, and want to save a redundant just in case. These four disks are mounted at:
/mnt/sda
/mnt/sdb
/mnt/sdc
/mnt/sdd
And an empty redundant disk mounted at:
/mnt/sde
Let us create a configuration file! Lines begining with "content" designate the path to a content file that stores SnapRAID metadata.
/etc/snapraid.conf
data d1 /mnt/sda data d2 /mnt/sdb data d3 /mnt/sdc data d4 /mnt/sdd/I_only_want_to_backup_this_folder parity /mnt/sde/SnapRAID.parity content /mnt/sda/SnapRAID.content content /mnt/sdb/SnapRAID.content content /mnt/sdc/SnapRAID.content content /var/snapraid/SnapRAID.content exclude /lost+found/
Backup
To begin backup process, run:
# snapraid sync
Undeletion
To revert a file or folder to an earlier version (undelete):
# snapraid fix -f FILENAME
( using compelete PATH of file or dir is better. file path is relative to all root dir )
Disk recovery
If the disk is mounted at /mnt/sda
is dead and being replaced, edit /etc/snapraid.conf
before doing a recovery.
Change the line
data d1 /mnt/sda
to
data d1 /mnt/sda_new
To begin recovery
# snapraid -d d1 -l recovery.log fix