fix example _search_archive.pl configuration
[BackupPC.git] / README.ASA
1 This document tries to describe ASA extensions for BackupPC 3.2.0
2
3 Written by Dobrica Pavlinusic <dpavlin@rot13.org> 2011-01-27
4
5 Search and archive maintain data in PostgreSQL and full-text search. Since full-text search
6 is single-writer, we need to serialize somehow requests for it's update.
7
8 This is implemented using archive host feature using _search_archive.pl configuration
9 file in /etc/BackupPC/pc/_search_archive.pl
10
11
12 You can manually trigger all pending backups using:
13
14         BackupPC_ASA_ArchiveStart _search_archive backuppc
15
16 This will start archive host _search_archive which will run it's configuration:
17
18
19 #
20 # /etc/BackupPC/pc/_search_archive.pl
21 #
22
23 # Set this client's XferMethod to archive to make it an archive host:
24 $Conf{XferMethod} = 'archive';
25
26 # The path on the local file system where archives will be written:
27 $Conf{ArchiveDest} = '/data/BackupPC/_search_archive';
28
29 # the type and level of compression used on the archive:
30 $Conf{ArchiveComp} = 'gzip';
31 $Conf{CompressLevel} = 9;
32
33 # dump only incremental changes in tars not whole content - ASA extension
34 # XXX this option must be global in /etc/BackupPC/config.pl
35 $Conf{TarCreateIncremental} = 1;
36
37 # archive media size (in bytes) 4.2Gb for DVD
38 #$Conf{ArchiveMediaSize} = 4200 * 1024 * 1024; # DVD
39 $Conf{ArchiveMediaSize} =  630 * 1024 * 1024; # CD
40 #$Conf{ArchiveMediaSize} =        1440 * 1024; # floppy
41 #$Conf{ArchiveMediaSize} =   42 * 1024 * 1024; # FIXME
42
43
44 # A size in megabytes to split the archive in to parts at.
45 # This is useful where the file size of the archive might exceed the
46 # capacity of the removable media. For example specify 700 if you are using CDs.
47 #$Conf{ArchiveSplit} = 650;
48 $Conf{ArchiveSplit} = 42; # FIXME small testing chunks
49
50
51 # The amount of parity data to create for the archive using the par2 utility.
52 # In some cases, corrupted archives can be recovered from parity data.
53 $Conf{ArchivePar} = 0;
54 $Conf{ParPath} = undef;
55
56
57 # use parallel gzip (speedup on multi-code machines)
58 $Conf{GzipPath} = '/usr/bin/pigz';
59
60
61 # The full command to run to create archives:
62 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
63 . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
64 . ' $compression $compext $splitsize $archiveloc $parfile *';
65
66 # host provides serialization, so we can safely update fulltext index
67 $Conf{ArchivePreUserCmd} = '/srv/BackupPC/bin/BackupPC_ASA_SearchUpdate -h$HostList';
68
69 $Conf{Md5sumPath} = '/usr/bin/md5sum';
70
71 # after archives are created, pull data back in database - ASA extension
72 $Conf{ArchivePostUserCmd} = '/srv/BackupPC/bin/BackupPC_ASA_PostArchive_Update -h$HostList -n$BackupList';
73
74 # Logging verbosity:
75 $Conf{XferLogLevel} = 1;
76
77
78