Вы находитесь на странице: 1из 11

Dirvish Backup

What is Dirvish?
Dirvish is a fast, disk based, rotating network
backup system.
With dirvish you can maintain a set of complete
images of your filesystems with unattended
creation and expiration. A dirvish backup vault is
like a time machine for your data.
Dirvish was originally created by jw schultz .

What is Dirvish?
- An image: is the result of a dirvish backup
operation
- vault: is where a collection of images are stored
- bank: Specify paths to directories containing
vaults. A bank is a directory containing vaults.
- xdev: If you want to have a vault for each
filesystem being backed up, you will want to
enabled the boolean option (1 is enabled).

What is Dirvish?
- image-default: Set the default image_name.
- expire-default: Specify a default expiration
time.This value will only be used if expire-rule
doesn't have a match.
- expire-rule: are the list of rules used to
determine an expiration time for an image.

What is Dirvish?
- exclude: Specify a filename or directory to
exclude.
-Runall: Specify vaults to be scheduled for
automated backups
Q- With so many images, won't it use too much
disk?
A- Because dirvish shares unchanged files
between images

Prepare HD for Backup


1. install dirvish by using sudo apt-get install
dirvish
2 . Connect backup hard disk to computer
3. sudo fdisk /dev/sdb (sdb = new hard disk)
4. sudo mkfs.ext3 /dev/sdb1 (sdb1 = new partition)
5. sudo mkdir /media/backup

Prepare HD for Backup


6. sudo vim /etc/fstab
Add following line at the end
/dev/<device name> <mount point> <filesystem
type> defaults 0 0
eg. /dev/sdb1 /media/backup ext4 defaults
0 0
7. sudo mount /media/backup

Where to backup?
8. sudo mkdir -p /media/backup/files/dirvish
9. Add following lines to the default.conf file by:
sudo vim /media/backup/files/dirvish/default.conf
client: <hostname>
tree: <whereTObackup>
eg.
client: server1
tree: /home

Configure Dirvish Backup


10. Add following lines to the master.conf file by:
sudo vim /etc/dirvish/master.conf
bank:
/media/backup
xdev: 1
image-default: %Y%m%d_%H%M
exclude:
lost+found/
Runall:
files

Configure Dirvish Backup


expire-default: +7 days
expire-rule:
#MIN HR DOM MON DOW STRFTIME_FMT
* * 1-7 * 1 +1 year (first monday of the month within 1
year)
* * 1-7 1 1 never (first monday of the year)
11. Change dirvish to run at a specific time by:
sudo bash /etc/dirvish/dirvish-cronjob
sudo vim /etc/cron.d/dirvish
And add a line below:
00 20 * * * root /etc/dirvish/dirvish-cronjob

Create the First Backup


12. Initialize Dirvish
sudo dirvish --init --vault files
13. Restoring the backup

Вам также может понравиться