f762f57e49425fb1282e9aaf5f345b5e108bb090
[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
13 There are two global options which had to be set for all hosts:
14
15 #
16 # /etc/BackupPC/config.pl
17 #
18
19 # invoke archive of dump - ASA extension DumpPostCmd was too early
20 $Conf{DumpPostFinishCmd} = '/srv/BackupPC/bin/BackupPC_ASA_ArchiveStart _search_archive backuppc $host';
21
22 # dump only incremental changes in tars not whole content - ASA extension
23 $Conf{TarCreateIncremental} = 1;
24
25
26
27 You can manually trigger all pending backups using:
28
29         BackupPC_ASA_ArchiveStart _search_archive backuppc
30
31 This will start archive host _search_archive which will run it's configuration:
32
33 #
34 # /etc/BackupPC/pc/_search_archive.pl
35 #
36
37 # Set this client's XferMethod to archive to make it an archive host:
38 $Conf{XferMethod} = 'archive';
39
40 # The path on the local file system where archives will be written:
41 $Conf{ArchiveDest} = '/data/BackupPC/_search_archive';
42
43 # the type and level of compression used on the archive:
44 $Conf{ArchiveComp} = 'gzip';
45 $Conf{CompressLevel} = 9;
46
47
48 # archive media size (in bytes) 4.2Gb for DVD
49 #$Conf{ArchiveMediaSize} = 4200 * 1024 * 1024; # DVD
50 $Conf{ArchiveMediaSize} =  630 * 1024 * 1024; # CD
51 #$Conf{ArchiveMediaSize} =        1440 * 1024; # floppy
52 #$Conf{ArchiveMediaSize} =   42 * 1024 * 1024; # FIXME
53
54
55 # A size in megabytes to split the archive in to parts at.
56 # This is useful where the file size of the archive might exceed the
57 # capacity of the removable media. For example specify 700 if you are using CDs.
58 #$Conf{ArchiveSplit} = 650;
59 $Conf{ArchiveSplit} = 42; # FIXME small testing chunks
60
61
62 # The amount of parity data to create for the archive using the par2 utility.
63 # In some cases, corrupted archives can be recovered from parity data.
64 $Conf{ArchivePar} = 0;
65 $Conf{ParPath} = undef;
66
67
68 # use parallel gzip (speedup on multi-code machines)
69 $Conf{GzipPath} = '/usr/bin/pigz';
70
71
72 # The full command to run to create archives:
73 $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost'
74 . ' $tarCreatePath $splitpath $parpath $host $backupnumber'
75 . ' $compression $compext $splitsize $archiveloc $parfile *';
76
77 # host provides serialization, so we can safely update fulltext index
78 $Conf{ArchivePreUserCmd} = '/srv/BackupPC/bin/BackupPC_ASA_SearchUpdate -h$HostList';
79
80 $Conf{Md5sumPath} = '/usr/bin/md5sum';
81
82 # after archives are created, pull data back in database - ASA extension
83 $Conf{ArchivePostUserCmd} = '/srv/BackupPC/bin/BackupPC_ASA_PostArchive_Update -h$HostList -n$BackupList';
84
85 # Logging verbosity:
86 $Conf{XferLogLevel} = 1;
87
88
89