-
Notifications
You must be signed in to change notification settings - Fork 1
/
INSTALL
119 lines (90 loc) · 3.39 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
INSTALLATION and GETTING STARTED
# $Id: INSTALL,v 12.0 2004/02/25 02:42:13 jw Exp $ $Name: Dirvish-1_2 $
PREREQUISITES
rsync version 2.5.6 or higher.
rsync version 2.6.0 or higher may be needed if backing up windows.
perl5 and these perl modules (if you aren't familiar with
perl see CPAN(3pm)).
POSIX
Getopt::Long
Time::ParseDate
Time::Period by Patric Ryan
Lots of empty disk space. I recommend using volume management
(see lvm(8)).
Ssh configured so root on the backup server can use ssh
non-interactively to the backup clients. This does not
necessarily mean it has to be able to be root on those clients.
INSTALL
Execute the install script "sh install.sh" from inside the
unpack/download directory. The script will ask where to
install the various pieces. Be sure you have write
permissions for the installation directories.
CONFIGURATION
Dirvish will store the backup images in "vault"s. Plan on one
vault per backup set.
Create one or more directories as "bank"s in which to place
the vaults. You can create a large filesystem for each bank
but it is usually better to create a filesystem for each
vault.
Inside the banks create one mount-point directory (vault) for
each backup set (ex: home). Start by making each filesystem
about 1.5 times the size of the filesystem or directory tree
it will be used to back up. Mount 'em up. The FAQ has
additional details about how these filesystems should be
built.
create the file /etc/dirvish/master.conf on your backup server.
It might look something like this:
bank:
/e/backup1
/e/backup2
exclude:
lost+found/
core
*~
.nfs*
Runall:
app 22:00
data 22:00
home 22:00
site 22:00
expire-default: +15 days
expire-rule:
# MIN HR DOM MON DOW STRFTIME_FMT
* * * * 1 +3 months
* * 1-7 * 1 +1 year
* * 1-7 1,4,7,10 1
* 10-20 * * * +4 days
In each vault create a dirvish subdirectory. In the dirvish
subdirectory of each vault create config files. To keep it
simple here we will assume will only have one branch per vault
and use the default configfile name; so create
$BANK/$VAULT/dirvish/default.conf files.
Here is an example from my home vault:
client: leto
tree: /e/home /home
branch-default: daily
exclude:
/**/.*/**/*cache/
/**/.*/*cache/
/**/.*/**/*Cache/
.kde/share/thumbnails/
Now that you are configured create an initial image by running
dirvish on the backup server like so:
root# dirvish --vault home --init
If you add the --no-run option you will see what it will try
to do.
To do a regular backup you now only would need to execute
"dirvish --vault home"
After you create your image you can look at the log and summary
files to see what was done.
I strongly recommend reading the dirvish and dirvish.conf manpages.
Work on your exclude lists and have fun.
dirvish.runall will run dirvish on all of the vault[:branch]s
listed in the Runall list in /etc/dirvish.conf
Because dirvish handles calculating expiration dates
automatically you need only add two entries to crontab to
completely automate your dirvish backups.
10 03 * * * root /site/sbin/dirvish-expire --quiet
18 03 * * * root /site/sbin/dirvish-runall --quiet
Note that both dirvish-runall and dirvish-expire are scheduled
after 22:00 as specified in the Runall: parameter.