[Semibug] RAID 0 or 1 for OpenBSD

Jonathan Drews jondrews at fastmail.com
Thu Jul 8 22:20:52 EDT 2021


On Thu, Jul 08, 2021 at 08:41:33PM -0400, Josh Grosse wrote:
> On Thu, Jul 08, 2021 at 01:37:58PM -0600, Jonathan Drews wrote:
> 
> > ...I want to use RAID to speed up my backups....
> 
> Be careful.  RAID is **not** backup.  The acronym stands
> for "Redundant Array of Inexpensive (or Independent) Disks."  

Hi Josh:

 Thanks for the tips. FWIW I have used dump and restore for years. I
usually backup to Seagate 1 TiB hard drives. Backups have saved me
from grief on several occasions. I will follow your suggestions. My
interest in RAID as a backup device is because of the lengthy time to
backup large amounts of data. I'm looking for solutions to speed up
backups with dump (man -s 8 dump). My understanding is that dump does
a bit by bit read of data so soft updates don't have anny effect on
it. 
 i'll just share my simple dump script here:

#!/bin/ksh -e

#Script to backup your computer with dump (man -s 8 dump)


trap 'print "You must connect the external hard drive"' ERR

# Mount the external hardrive
mount -t ffs /dev/sd1a /mnt

umount /home

# Present choices for dump levels
# /home is on /dev/rwd0g. 

PS3="Enter dump level: "

select Level in 0 1 2 3 4 5 6 7 8 9 Quit
do
case $Level in
        [0-9]) dump -${Level}au -f /mnt/OpenBSDHome-lvl${Level}.dump
/dev/rwd0g;;
        Quit) 
        umount /mnt
        mount /home
        exit;;
esac
done

Notice that /home is unmounted so that it is not being written to.

To do a restore of a file system do:

# restore -i -f /mnt/OpenBSD-lvl0.dump

the -i is interactive so you can select individual files.

--
Kind regards,
Jonathan



More information about the Semibug mailing list