/[BackupPC]/trunk/doc/Search.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/doc/Search.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 217 - (show annotations)
Sun Oct 16 17:41:52 2005 UTC (18 years, 7 months ago) by dpavlin
File size: 6011 byte(s)
 r8615@llin:  dpavlin | 2005-10-16 19:41:44 +0200
 added sort into archive to backup medium, small updates

1 =head1 BackupPC search and archival extension
2
3 BackupPC search and archival extension is used to:
4
5 =over 4
6
7 =item *
8
9 find files in C<pool> by substring of filename
10
11 =item *
12
13 see state of one or all of your shares in some particular point in time
14 (file creation date on clients or backup date is supported as filter)
15
16 =item *
17
18 archive selected backups (per host, share and increment) to archival
19 medium (CD, DVD, tape etc.) with rich descriptions, archival locations,
20 multiple copies and so on.
21
22 =back
23
24 =head2 Requirements
25
26 This extension is based on PostgreSQL RDBMS and HyperEstraier full-text
27 search engine (and it's perl bindings).
28
29 If you are using Debian, you are in luck. All required packages are
30 allready part of C<unstable> distribution and can be installed with:
31
32 # apt-get install postgresql
33 # apt-get install hyperestraier libestraier-dev libqdbm-dev
34
35 Now you can skip to installation of L<HyperEstraier perl bindings> below.
36
37 If you don't have pre-packaged binaries for your installation, you will
38 need to install additional packages by hand.
39
40 =head3 PostgreSQL
41
42 You can use packages provided by your distribution or follow installation
43 instructions on PostgreSQL site.
44
45 =head3 QDBM
46
47 First, you need qdbm on which HyperEstraier depends. Installation is simple.
48
49 $ tar xvfz qdbm-1.8.31.tar.gz
50 $ cd qdbm-1.8.31
51 $ ./configure --enable-zlib
52 $ make
53 $ sudo make install
54
55 =head3 HyperEstraier
56
57 Also quite simple.
58
59 $ tar xvfz hyperestraier-0.5.4.tar.gz
60 $ cd hyperestraier-0.5.4
61 $ ./configure
62 $ make
63 $ sudo make install
64
65 Then you will have to install perl bindings for HyperEstraier.
66
67 =head3 HyperEstraier perl bindings
68
69 This might take a bit more work. You will need to have C<swig> and C<g++> installed
70 before you can install perl bindings.
71
72 $ tar xvfz hyper_estraier_wrappers-0.0.10.tar.gz
73 $ cd swig_hest/perl/
74 $ swig -c++ -perl5 -o HyperEstraier_wrap.cpp ../HyperEstraier.i
75 $ cp ../HyperEstraierWrapper.cpp ./
76 $ perl Makefile.PL
77
78 You might need to remove C<estconfig --mtlibs> from C<Makefile.PL> if it
79 fails to run with following message:
80
81 Unrecognized argument in LIBS ignored: 'configuration'
82 Unrecognized argument in LIBS ignored: 'helper'
83 Unrecognized argument in LIBS ignored: 'for'
84 Unrecognized argument in LIBS ignored: 'Hyper'
85 Unrecognized argument in LIBS ignored: 'Estraier'
86 Writing Makefile for HyperEstraier
87
88 Working C<Makefile.PL> for my particular installation is:
89
90 # File : Makefile.PL
91 use ExtUtils::MakeMaker;
92 WriteMakefile(
93 NAME => 'HyperEstraier',
94 INC => sprintf('%s', `pkg-config --cflags hyperestraier`),
95 LIBS => [sprintf('-lstdc++ %s %s' , `pkg-config --libs hyperestraier`)],
96 OBJECT => 'HyperEstraierWrapper.o HyperEstraier_wrap.o'
97 );
98
99 After succesfull C<perl Makefile.pl>, you can compile and install it.
100
101 $ make
102 $ sudo make install
103
104 =head3 CPAN modules
105
106 You will also need a few additional cpan modules
107
108 =over 4
109
110 =item File::Pid
111
112 =item Spreadsheet::WriteExcel
113
114 =item Term::Menus
115 =item XML::Writer
116 =item Algorithm::Diff
117 =item Archive::Tar::Stream
118
119 =back
120
121 Last module, C<Spreadsheet::WriteExcel> is needed only if you want to use
122 C<BackupPC_xls_report> to generate Excel reports from your backup data.
123
124 Easiest way to install them is using C<cpan> shell.
125
126 $ sudo cpan File::Pid Spreadsheet::WriteExcel
127
128 =head1 Creation of initial database
129
130 Once you have all components installed, you should initially create data
131 about increments in RDBMS and full-text search engine index.
132
133 First, edit C<config.pl> and setup C<SearchDSN> to valid perl DSN (for example,
134 C<dbi:Pg:dbname=backuppc> and C<SearchUser> to database user which has priviledges
135 over that database. You might need to add additional directives in PostgreSQL's
136 C<pg_hba.conf> so that selected user can be connected without password (I know, it's not
137 perfect, but I trust local users on backuppc machine).
138
139 Then, create new database for backuppc.
140
141 $ createdb backuppc
142
143 Then invoke C<BackupPC_updatedb> for the first time with argument to create database
144 schema:
145
146 $ sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -c
147
148 You can also force full-text reindex by C<-i> flag. This will add all files which are in
149 database but for some reason are missing in full-text index.
150
151 Now, you can setup cron job which will daily check your backups and update database
152 and full-text index. This is as simple as invoking
153
154 /data/backuppc/bin/BackupPC_updatedb
155
156 As C<backuppc> user and redirecting output to log file.
157
158 B<Documentation is still incomplete>.
159
160 Now that you finished installation, you can select new options from
161 menu on the left and example search and archival.
162
163 =head1 Reporting in Excel
164
165 Often, it is useful to be able to present report about your BackupPC hosts, number
166 of snapshots, total size and other useful info. While all those information can
167 be accessed using web browser, for analysis it's useful to have them in spreadsheet
168 form. With this data, you can monitor changes on your backup cycle, effects of changes
169 on your server or network to your BackupPC installation and so on.
170
171 You can create Excel spreadsheet (which works perfectly with Gnumeric also) using
172 following command:
173
174 $ sudo -u backuppc /data/backuppc/bin/BackupPC_xls_report
175
176 =head1 Additional requirements
177
178 You will also need several other command-line utilities to make
179 C<BackupPC_burnArchiveCLI> run. Those include:
180
181 =over 4
182
183 =item mkisofs
184
185 =item cdrecord
186
187 Or equivavalent utility, on Debian you might want to use C<dvdrecord>.
188
189 =item eject
190
191 Please make a symlink from C</dev/cdrom> to you CD/DVD burner.
192
193 =item split
194
195 =back
196
197
198 =head1 Related projects
199
200 BackupPC allready has archival host which might suit your needs better (and
201 it's quite easier to install).
202
203 =over 4
204
205 =item PostgreSQL
206
207 L<http://www.postgresql.org/>
208
209 =item HyperEstraier
210
211 L<http://hyperestraier.sourceforge.net/>
212
213 =back
214
215 =head1 Authors
216
217 Ivan Klaric C<< <iklaric@gmail.com> >>
218
219 Dobrica Pavlinusic C<< <dpavlin@rot13.org> >>
220
221 =head1 Licence
222
223 This extension is released under GPL licence, same as BackupPC.
224

  ViewVC Help
Powered by ViewVC 1.1.26