Back to the main page

Dirvish

What is this?

Dirvish is disk base (use disks to maintain multiple copies of source file trees), rotating network backup system. 

Ideally, place dervish server in other location/building, especially if you work in Silicon Valley (where you can be hit by earthquake any moment). 

You can still backup on tapes, like from dervish server during working hours, so you don't have any downtime or other inconvenience. 

Dirvish uses rsync so network traffic load should not be an issue. 

Some tips about capacity

These depends widely of how long you keep backup, but say that for rotation backup s/w like this one, you need 2-3 times the size of file system you backup. 

Dirvish structure: 

1. Banks are places (like directory) where you store ONLY vaults. 
2. Vault is repository (backup place) for FS. It contains images. It also has configuration info in directory $VAULT/dirvish   
3. Image is complete duplicate (in specific time) of a FS (most likely you will have one image per day) 

Note: 
only unchanged regular files are shared between images, while device nodes, symlinks, directories will be recreated for each image. 
So vault will have much more inodes that source FS. 

And compression?

There is no compression here, otherwise Dirvish cannot transparently restore files. 
Files are already shared between images plus many applications already store data in compressed formats.  

Restoration

An image is complete copy of FS, so restoration is just "copy what you need back". 

Make sure to preserve ownership, permissions and modification time of restored files (you may want to use rsync or scp). 

Another idea is sharing and read-only export (NFS/Samba) of backup location. 

Requirements for Dirvish

Dirvish is some kind of Perl wrapper for rsync. So you need this stuff.  

How to install it?

The easiest way to install dervish is using pkg-get and grab it from blastwave.org. The version they offer is 1.2.1
/var/sadm/pkg/CSWdirvish> cat pkginfo
CLASSES=none
BASEDIR=/
LC_CTYPE=en_US.ISO8859-1
LC_NUMERIC=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1
LC_COLLATE=en_US.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_US.ISO8859-1
TZ=US/Pacific
PATH=/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin
OAMBASE=/usr/sadm/sysadm
ARCH=all
PKG=CSWdirvish
NAME=dirvish - a fast, disk based, rotating network backup system
VERSION=1.2.1
CATEGORY=applications
VENDOR=http://www.dirvish.org/ packaged for CSW by Joshua Buysse
HOTLINE=http://www.blastwave.org/bugtrack/
EMAIL=buysse@blastwave.org
PSTAMP=apollo20050525140111
PKGINST=CSWdirvish
PKGSAV=/var/sadm/pkg/CSWdirvish/save
INSTDATE=Jul 02 2009 19:44
Files of interest /opt/csw/sbin> ls -rwxr-xr-x 1 root bin 28477 May 25 2005 dirvish -rwxr-xr-x 1 root bin 10748 May 25 2005 dirvish-expire -rwxr-xr-x 1 root bin 10505 May 25 2005 dirvish-locate -rwxr-xr-x 1 root bin 8176 May 25 2005 dirvish-runall

About Dirvish configuration script

Master conf file for Dirvish is /opt/csw/etc/dirvish/master.conf (if you install Dirvish using pkg-get, this is most likely location). 

Each vault (FS) has its own conf file, $VAULT/dirvish/default.conf   

Pre and Post configuration script

These scripts are run before and after the Dirvish run itself. 

The scripts run for each vault (File System) in next order:
 pre-server
 pre-client
 dirvish --vault=$VAULT
 post-client
 post-server

Tips:
1. Place these scripts in master.conf file and run them for each vault
2. Place these scripts in $VAULT/dirvish/default.conf file and run them for that specific FS

Note: pre-client and post-client scripts must reside and be executed on client (not Dirvish server). 
Back to the main page