I've developed two enhancements to BackupPC 3.1.0 and use it since 2010.
In June 2013 I've done the upgrade to BackupPC V3.2.1 (debian wheezy) and I 
implemented my patch in this release.
In Februar 2019 I've done it again to BackupPC V3.3.2-2 (debian 
buster/testing)

As requested by Jeffrey Kosowsky in March 2011 I have separated my patch
into two patches:

$Conf{FullCntYearly} will allow to make the first backup of a year as a 
full backup and save this full backups as many years as configured in the 
GUI.

The BackupPC-V3.3.2-FullCntYearly.patch will modify the following files:

    backuppc/bin/BackupPC_dump
    backuppc/lib/BackupPC/CGI/EditConfig.pm
    backuppc/lib/BackupPC/Config/Meta.pm
    doc/backuppc/BackupPC.html

$Conf{useEveryPartial} will allow to store each interrupted backup (both, 
full as well as incremental) as a partial backup. This partial backups will 
be used by rsync like incremental backups. The removal of partial backups 
will happen as for incrementals but as soon as an incremental or a full 
backup was successfull finished.

The modification to $Conf{PartialAgeMax} will remove partial backups after 
$Conf{PartialAgeMax}.

The BackupPC-V3.3.2-UseEveryPartial.patch will modify the following files:

    backuppc/bin/BackupPC_dump
    backuppc/bin/BackupPC_link
    backuppc/lib/BackupPC/CGI/EditConfig.pm
    backuppc/lib/BackupPC/Config/Meta.pm
    backuppc/lib/BackupPC/Xfer/Rsync.pm
    backuppc/lib/BackupPC/Xfer/RsyncFileIO.pm
    doc/backuppc/BackupPC.html


As Holger Parplies recommended in March 2011 I've created the patches with:

% diff -ruN --exclude=*~ backuppc backuppc.FullCntYearly > BackupPC-V3.3.2-
FullCntYearly.patch
% diff -ruN --exclude=*~ doc doc.FullCntYearly > BackupPC-V3.3.2-
FullCntYearly.doc.patch
% diff -ruN --exclude=*~ backuppc backuppc.UseEveryPartial > BackupPC-
V3.3.2-UseEveryPartial.patch
% diff -ruN --exclude=*~ doc doc.UseEveryPartial > BackupPC-V3.3.2-
UseEveryPartial.doc.patch

and you can apply the patches by:

% src=(where you downloaded the patch)
% cd /usr/share
% patch -p0 --dry-run --reject-file=oops.rej < $src/BackupPC-V3.3.2-
FullCntYearly.patch
% patch -p0 --dry-run --reject-file=oops.rej < $src/BackupPC-V3.3.2-
FullCntYearly.doc.patch
% patch -p0 --dry-run --reject-file=oops.rej < $src/BackupPC-V3.3.2-
UseEveryPartial.patch
% patch -p0 --dry-run --reject-file=oops.rej < $src/BackupPC-V3.3.2-
UseEveryPartial.doc.patch

do not forget to remove --dry-run from the lines above :)
be sure your file owners are backuppc
% chown -R backuppc:backuppc backuppc
% /etc/init.d/apache2 restart


you can remove the applied patches with:
% patch -p0 -R < $src/BackupPC-V3.3.2-FullCntYearly.patch
% patch -p0 -R < $src/BackupPC-V3.3.2-FullCntYearly.doc.patch
% patch -p0 -R < $src/BackupPC-V3.3.2-UseEveryPartial.patch
% patch -p0 -R < $src/BackupPC-V3.3.2-UseEveryPartial.doc.patch

Be carefull! I've developed, applied and tested the patches against the 
debian version of BackupPC.
If there is a chance to include this patches into the standard BackupPC 
version I could redevelop and test it against the BackupPC V3.3 from 
sourceforge too.

The patches are available on ftp://www.backup4u.at. You get access with:
 user=ftpuser
 password=Backup4U4FTP

br
Matthias


_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to