1 This document tries to describe ASA extensions for BackupPC 3.2.0
3 Written by Dobrica Pavlinusic <dpavlin@rot13.org> 2011-01-27
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.
8 This is implemented using archive host feature using _search_archive.pl configuration
9 file in /etc/BackupPC/pc/_search_archive.pl
13 There are two global options which had to be set for all hosts:
16 # /etc/BackupPC/config.pl
19 # invoke archive of dump - ASA extension DumpPostCmd was too early
20 $Conf{DumpPostFinishCmd} = '/srv/BackupPC/bin/BackupPC_ASA_ArchiveStart _search_archive backuppc $host';
22 # dump only incremental changes in tars not whole content - ASA extension
23 $Conf{TarCreateIncremental} = 1;
27 You can manually trigger all pending backups using:
29 BackupPC_ASA_ArchiveStart _search_archive backuppc
31 This will start archive host _search_archive which will run it's configuration:
34 # /etc/BackupPC/pc/_search_archive.pl
37 # Set this client's XferMethod to archive to make it an archive host:
38 $Conf{XferMethod} = 'archive';
40 # The path on the local file system where archives will be written:
41 $Conf{ArchiveDest} = '/data/BackupPC/_search_archive';
43 # the type and level of compression used on the archive:
44 $Conf{ArchiveComp} = 'gzip';
45 $Conf{CompressLevel} = 9;
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
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
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;
68 # use parallel gzip (speedup on multi-code machines)
69 $Conf{GzipPath} = '/usr/bin/pigz';
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 *';
77 # host provides serialization, so we can safely update fulltext index
78 $Conf{ArchivePreUserCmd} = '/srv/BackupPC/bin/BackupPC_ASA_SearchUpdate -h$HostList';
80 $Conf{Md5sumPath} = '/usr/bin/md5sum';
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';
86 $Conf{XferLogLevel} = 1;