Tags

employment
llc
xrp
redhat
ripple
interfaces
ncurses
ruby
refs
filesystems
retro gaming
raspberry pi
sinatra
3d printing
nethack
gcc
compiler
fedora
virtfs
project
gaming
vim
grep
sed
aikido
philosophy
splix
android
lvm
storage
bitcoin
projects
sig315
miq
db
polisher
meditation
hopex
conferences
omega
simulator
bundler_ext
rubygems
book review
google code in
isitfedoraruby
svn
gsoc
design patters
jsonrpc
rjr
aeolus
ohiolinuxfest
rome
europe
travel
brno
gtk
python
puppet
conference
fudcon
html5
snap
tips
ssh
linux
hardware
libvirt
virtualization
engineering expo
cloud
redmine
plugins
rpm
yum
rake
screencasting
jruby
fosscon
pidgin
gnome-shell
distros
notacon
presentation
rails
deltacloud
apache
qmf
passenger
syrlug
hackerspace
music
massive attack
backups
crypto
vnc
xsd
rxsd
x3d
mercurial
webdev
ovirt
qpid
haikus
poetry
legaleese
jquery
selenium
testing
xpath
git
sshfs
svg
ldap
autotools
pygtk
xmlrpc
slackware

Jan 22 2010 linux backups

Backups Via Dirvish

Dirvish is an easy to use backup system based on rsync. Having recently setup an external encrypted usb drive to store backups, mounted at /mnt/backup1, I setup backups for target directories on my local system using Dirvish (of course, if it were not in early development, I would use Snap but alas its too early to trust critical system operations to it). The entire process is fairly easy, there being two files which you need to modify, as well as creating a cron job to run dirvish daily. I’ll keep it brief and simple here, use this great guide if you want more info. Before we begin, recognize a ‘bank’ is a directory where multiple vaults are stored. A ‘vault’ holds the configuration and the actual snapshots of the filesystem(s). <!–break–> Install Dirvish and Configure Use your package management system or build dirvish yourself. After which modify /etc/dirvish/master.conf (or alternatively /etc/dirvish.conf) to contain the following directives:

bank:
       /mnt/backup1/snapshot

image-default: %Y%m%d-%H%M
log: gzip
index: gzip
xdev: 0

Runall:
      myvault

expire-default: +6 months

image-perm: 700 
meta-perm: 600

Setup Vaults All vaults need a ‘dirvish/’ subdirectory w/ a ‘default.conf’ configuration file. Thus in ‘/mnt/backup1/snapshot/myvault/dirvish/default.conf’ write:

client: localhost
tree: /
xdev: 0
exclude: 
   + /etc
   + /home
   + /mnt
   + /mnt/thumb
   /mnt/*
   /*  

Initialize Vault Any new vaults need to be initialized with the first snapshot before dirvish-runall can be invoked. This can be simply done by running the ‘dirvish’ command.

/usr/bin/dirvish --init --vault myvault
After this you should have your first snapshot in ‘/mnt/backup1/snapshot/myvault/yyyymmdd-hhmm’. Run ‘/usr/bin/dirvish-runall’ any time after this to create a new incremental snapshot, or create on or more cronjobs for it. If setting up regular backups, its advisable to run the ‘/usr/bin/dirvish-expire’ command right before ‘/usr/bin/dirvish-runall’ to clean up expired snapshots and to ensure a backup job is not currently in operation.