1 =head1 BackupPC search and archival extension
3 BackupPC search and archival extension is used to:
9 find files in C<pool> by substring of filename
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)
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.
26 This extension is based on PostgreSQL RDBMS and HyperEstraier full-text
27 search engine (and it's perl bindings).
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:
32 # apt-get install postgresql
33 # apt-get install hyperestraier libestraier-dev libqdbm-dev
35 Now you can skip to installation of L<HyperEstraier perl bindings> below.
37 If you don't have pre-packaged binaries for your installation, you will
38 need to install additional packages by hand.
42 You can use packages provided by your distribution or follow installation
43 instructions on PostgreSQL site.
47 First, you need qdbm on which HyperEstraier depends. Installation is simple.
49 $ tar xvfz qdbm-1.8.31.tar.gz
51 $ ./configure --enable-zlib
59 $ tar xvfz hyperestraier-0.5.4.tar.gz
60 $ cd hyperestraier-0.5.4
65 Then you will have to install perl bindings for HyperEstraier.
67 =head3 HyperEstraier perl bindings
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.
72 $ tar xvfz hyper_estraier_wrappers-0.0.10.tar.gz
74 $ swig -c++ -perl5 -o HyperEstraier_wrap.cpp ../HyperEstraier.i
75 $ cp ../HyperEstraierWrapper.cpp ./
78 You might need to remove C<estconfig --mtlibs> from C<Makefile.PL> if it
79 fails to run with following message:
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
88 Working C<Makefile.PL> for my particular installation is:
91 use ExtUtils::MakeMaker;
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'
99 After succesfull C<perl Makefile.pl>, you can compile and install it.
106 You will also need a few additional cpan modules
112 =item Spreadsheet::WriteExcel
119 Last module, C<Spreadsheet::WriteExcel> is needed only if you want to use
120 C<BackupPC_xls_report> to generate Excel reports from your backup data.
122 Easiest way to install them is using C<cpan> shell.
124 $ sudo cpan File::Pid Spreadsheet::WriteExcel
126 =head1 Creation of initial database
128 Once you have all components installed, you should initially create data
129 about increments in RDBMS and full-text search engine index.
131 First, edit C<config.pl> and setup C<SearchDSN> to valid perl DSN (for example,
132 C<dbi:Pg:dbname=backuppc> and C<SearchUser> to database user which has priviledges
133 over that database. You might need to add additional directives in PostgreSQL's
134 C<pg_hba.conf> so that selected user can be connected without password (I know, it's not
135 perfect, but I trust local users on backuppc machine).
137 Then, create new database for backuppc.
141 Then invoke C<BackupPC_updatedb> for the first time with argument to create database
144 $ sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -c
146 You can also force full-text reindex by C<-i> flag. This will add all files which are in
147 database but for some reason are missing in full-text index.
149 Now, you can setup cron job which will daily check your backups and update database
150 and full-text index. This is as simple as invoking
152 /data/backuppc/bin/BackupPC_updatedb
154 As C<backuppc> user and redirecting output to log file.
156 B<Documentation is still incomplete>.
158 Now that you finished installation, you can select new options from
159 menu on the left and example search and archival.
161 =head1 Reporting in Excel
163 Often, it is useful to be able to present report about your BackupPC hosts, number
164 of snapshots, total size and other useful info. While all those information can
165 be accessed using web browser, for analysis it's useful to have them in spreadsheet
166 form. With this data, you can monitor changes on your backup cycle, effects of changes
167 on your server or network to your BackupPC installation and so on.
169 You can create Excel spreadsheet (which works perfectly with Gnumeric also) using
172 $ sudo -u backuppc /data/backuppc/bin/BackupPC_xls_report
174 =head1 Additional requirements
176 You will also need several other command-line utilities to make
177 C<BackupPC_burnArchiveCLI> run. Those include:
185 Or equivavalent utility, on Debian you might want to use C<dvdrecord>.
194 =head1 Related projects
196 BackupPC allready has archival host which might suit your needs better (and
197 it's quite easier to install).
203 L<http://www.postgresql.org/>
207 L<http://hyperestraier.sourceforge.net/>
213 Ivan Klaric C<< <iklaric@gmail.com> >>
215 Dobrica Pavlinusic C<< <dpavlin@rot13.org> >>
219 This extension is released under GPL licence, same as BackupPC.