awit-dbackup-0.0.22/0000755000000000000000000000000012404357737012660 5ustar rootrootawit-dbackup-0.0.22/docs/0000755000000000000000000000000012404357737013610 5ustar rootrootawit-dbackup-0.0.22/docs/dbackup.sgml0000644000000000000000000002433512404357737016114 0ustar rootroot manpage.1'. You may view the manual page with: `docbook-to-man manpage.sgml | nroff -man | less'. A typical entry in a Makefile or Makefile.am is: manpage.1: manpage.sgml docbook-to-man $< > $@ The docbook-to-man binary is found in the docbook-to-man package. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include docbook-to-man in your Build-Depends control field. --> Nigel"> Kukard"> 2014-09-11 08:17"> 8"> nkukard@lbsd.net"> AWIT-DBACKUP"> Debian"> GNU"> GPL"> ]>
&dhemail;
&dhfirstname; &dhsurname; 2010 &dhusername; &dhdate;
&dhucpackage; &dhsection; &dhpackage; AWIT-DBackup is a powerful per-directory backup utility. &dhpackage; GENERAL_OPTIONS --backup BACKUP_OPTIONS --restore RESTORE_OPTIONS SRC DST DESCRIPTION This is a backup software package which creates one archive per directory it backs up. This makes searching through the backup much easier as you can look for which files you're after in the directory hierarchy. It will only backup directories which have changed, which makes it rsync friendly. GENERAL OPTIONS Configuration file to use. 5 = debug, 4 = info, 3 = notice, 2 = warning, 1 = error Perform a backup operation. Perform a restore operation. Path to tar binary. This should almost never need to be specified, it is used to specify a different tar binary to use other than the default system binary. Some versions of tar used to have bugs preventing correct operation, this allowed specification of an alternative binary to use. Manifest format to use, currently the two supported formats is "null" for \\0 (null) termination of entries or "newline" for \\n (newline) termination of entries. This should not need to be overridden. Display commandline help. BACKUP OPTIONS Upgrade backup to new dbackup version. This will cause all archives to be refreshed if they were generated with an older version of AWIT DBackup. <gzip|bzip2|xz|lz|none> Compression method to use. Defaults to using xz, or bzip2 if xz is unavailable. Parallel versions of these Compression programs will be used if they exist. Here is the order compression programs are looked for: gzip = pigz > gzip, bzip2 = pbzip2 > lbzip2 > bzip2, xz = pxz > pixz > xz, lz = plzip > pdlzip > clzip. Exclude the most common data directories which contain temporary or state information or which is not useful, a list of these is displayed by running dbackup --help. Exclude the most common system directories including /dev, /proc/, /sys, /run, for the complete list see dbackup --help. Exclude a path based on a Perl regular expression, this should include separators and can be specified multiple times. eg. --exclude-path=',/old$,' Exclude files based on a regular expression, this should include separators and can be specified multiple times. eg. --exclude-file='/\.bak$/' Exclude filesystem types from being transversed for backup. This can be specified multiple times. eg. --exclude-fs=shm Add an additional system directory to exclude. The system defaults already include /dev, /run, /tmp... etc. This can be specified multiple times. Add an additional data directory to exclude. The data directory defaults already include /var/lib/mysql, /var/lib/pgsql, /var/amavis/tmp/, /var/spool/squid, /var/cache/yum, /var/cache/apt/archives ... etc. This can be specified multiple times. System base to apply the exclusions to. This can be specified multiple times. This is passed to tar only. It will not cause errors if files that cannot be read. RESTORE OPTIONS Pass --keep-newer to tar. Don't replace existing files that are newer than their archive copies. Pass --keep-old-files to tar. Don't replace existing files when extracting, rather throw an error. SEE ALSO tar(1). AUTHOR This manual page was written by &author; <&dhemail;>. Permission is granted to copy, distribute and/or modify this document under the terms of the &gnu; General Public License, Version 3 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-3.
awit-dbackup-0.0.22/dbackup.conf0000644000000000000000000000107612404357737015144 0ustar rootroot# The parameters in this file correspond to the commandline arguments # that can be given for the --backup option [backup] # Uncomment this to exclude system-dir's from backup #exclude-system=1 # System bases are kernel isolated virtual machines, like chroots. # The system-dir's are appended to these in the tests for exclusion. #exclude-system-base=/ #exclude-system-base=/vservers/my-linux-vserver #exclude-system-base=/chroots/my-chroot # System dirs not to backup #exclude-system-dir=/sys #exclude-system-dir=/proc #exclude-system-dir=/dev #exclude-system-dir=/tmp awit-dbackup-0.0.22/dbackup0000755000000000000000000013314612404357737014227 0ustar rootroot#!/usr/bin/perl -w # Copyright (c) 2010-2014, AllWorldIT # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # # Author: Nigel Kukard # TODO: # - USE incremental backups!!!! fucking awesome # # - Read in defaultSystemExcl extras from /proc/mounts # - proc, nfs, nfs4, fusectl fuse.glusterfs, sysfs, tmpfs, devtmpfs, devpts # use strict; use Compress::Zlib; use Config::IniFiles; use Cwd; use Fcntl qw (:mode); use File::Find; use File::Path qw( rmtree mkpath ); use File::Spec; use Getopt::Long; use POSIX qw (strftime lchown); use Data::Dumper; use MIME::Base64; my $VERSION = "0.0.22-1"; # System dirs we don't care about my @defaultSystemExcl = ("/dev","/run","/proc","/sys","/tmp","/var/tmp","/misc","/media","/mnt"); # These should be backed up separately my @defaultDataExcl = ( # We cannot backup the DB reliably by just copying files "/var/lib/mysql","/var/lib/pgsql", # Exclude amavis working files "/var/amavis/tmp/", "/var/lib/amavis/tmp/", "/var/spool/amavis/virusmails/", "/var/spool/mailman/retry", # Exclude postfix queues "/var/spool/postfix/active", "/var/spool/postfix/defer", "/var/spool/postfix/deferred", "/var/spool/postfix/public", "/var/spool/postfix/private", # Exclude squid cache "/var/spool/squid", # Yum cache "/var/cache/yum", # Apt cache "/var/cache/apt/archives", # cPanel "/home/virtfs" ); # Backup constants use constant { LOG_DEBUG => 5, LOG_INFO => 4, LOG_NOTICE => 3, LOG_WARNING => 2, LOG_ERROR => 1 }; use constant { ST_FILE_CHANGED => 1, ST_DIR_NEW => 2, ST_DIR_SYS => 4, ST_DIR_CHANGED => 8, ST_FILE_ATTR_CHANGED => 16, ST_FILE_NEW => 32 }; # Main config my %config = ( 'log-level' => LOG_NOTICE, 'tar' => 'tar', 'exclude-system' => 0, 'backup-upgrade' => 0, 'compress' => "bzip2" ); # Choose default compression method if (checkPATH("xz")) { $config{'compress'} = "xz"; } print(STDERR "AWIT-DBackup v$VERSION, Copyright (c) 2010-2014, AllWorldIT\n\n"); # Grab options my %optctl = (); GetOptions(\%optctl, "help", "config=s", "log-level=i", "tar=s", "manifest-format=s", "backup", "backup-upgrade", "compress:s", "exclude-system", "system-base=s@", "system-dir=s@", "tar-ignore-failed-read=s@", "exclude-data", "data-dir=s@", "exclude-file=s@", "exclude-path=s@", "exclude-fs-type=s@", "restore", "tar-keep-newer", "tar-keep-old-files", ); # Check for help if (defined($optctl{'help'})) { displayHelp(); exit 0; } # Check for invalid combination if (defined($optctl{'backup'}) && defined($optctl{'restore'})) { print(STDERR "ERROR: Cannot backup AND restore at the same time\n\n"); displayHelp(); exit 1; } # Make sure we only have 2 additional args if (@ARGV > 2 || @ARGV < 2) { print(STDERR "ERROR: Invalid number of arguments\n\n"); displayHelp(); exit 1; } # Check both dirs exist... if (! -d $ARGV[0]) { print(STDERR "ERROR: Source directory '".$ARGV[0]."' does not exist!\n\n"); exit 1; } if (! -d $ARGV[1]) { print(STDERR "ERROR: Destination directory '".$ARGV[1]."' does not exist!\n\n"); exit 1; } # If backup file is specified and it does not exist, throw an error if (defined($optctl{'config'}) && ! -f $optctl{'config'}) { print(STDERR "ERROR: Configuration file '".$optctl{'config'}."' NOT found!\n"); exit 1; } # Check config file was specified, if not set default my $configFile; if (!defined($configFile = $optctl{'config'})) { $configFile = "/etc/dbackup.conf"; } # If we have a config file, read it in if (-f $configFile) { # Use config file, ignore case tie my %inifile, 'Config::IniFiles', ( -file => $optctl{'config'}, -nocase => 1 ) or die "Failed to open config file '".$optctl{'config'}."': ".join("\n",@Config::IniFiles::errors); # Check if we actually have something... if (defined($inifile{'backup'})) { # Loop with config items foreach my $item (keys %{$inifile{'backup'}}) { $config{$item} = $inifile{'backup'}{$item}; } } } # # Process config # if (!defined($config{'system-base'})) { # Quick hack to see if we have a cmdline option if (!defined($optctl{'system-base'})) { $config{'system-base'} = ["/"]; } else { $config{'system-base'} = []; } } else { $config{'system-base'} = toArray($config{'system-base'}); } if (!defined($config{'system-dir'})) { $config{'system-dir'} = []; } else { $config{'system-dir'} = toArray($config{'system-dir'}); } if (!defined($config{'tar-ignore-failed-read'})) { $config{'tar-ignore-failed-read'} = []; } else { $config{'tar-ignore-failed-read'} = toArray($config{'tar-ignore-failed-read'}); } if (!defined($config{'data-dir'})) { $config{'data-dir'} = []; } else { $config{'data-dir'} = toArray($config{'data-dir'}); } if (!defined($config{'exclude-file'})) { $config{'exclude-file'} = []; } else { $config{'exclude-file'} = toArray($config{'exclude-file'}); } if (!defined($config{'exclude-path'})) { $config{'exclude-path'} = []; } else { $config{'exclude-path'} = toArray($config{'exclude-path'}); } if (!defined($config{'exclude-fs-type'})) { $config{'exclude-fs-type'} = []; } else { $config{'exclude-fs-type'} = toArray($config{'exclude-fs-type'}); } # # Check commandline options # if (defined($optctl{'backup-upgrade'})) { $config{'backup-upgrade'} = 1; } if (defined($optctl{'compress'})) { # Why use --compress with --restore? if (defined($optctl{'restore'})) { print(STDERR "WARNING: The use of --compress with --restore does not make sense\n"); } # Make sure its valid if ( $optctl{'compress'} ne "xz" && $optctl{'compress'} ne "bzip2" && $optctl{'compress'} ne "gzip" && $optctl{'compress'} ne "lz" && $optctl{'compress'} ne "none" ) { print(STDERR "ERROR: Compression is invalid, valid values are: xz bzip2 gzip lz none\n\n"); displayHelp(); exit 1; } $config{'compress'} = $optctl{'compress'}; } if (defined($optctl{'tar'})) { # Check if tar is executable if ( -x $optctl{'tar'}) { $config{'tar'} = $optctl{'tar'}; } else { print(STDERR "ERROR: tar '".$optctl{'tar'}."' does not exist or is not executable\n"); } } my $tarVer = getTarVer($config{'tar'}); if (defined($optctl{'log-level'})) { $config{'log-level'} = $optctl{'log-level'}; } if (defined($optctl{'manifest-format'})) { if ( $optctl{'manifest-format'} ne "null" && $optctl{'manifest-format'} ne "newline" ) { print(STDERR "ERROR: Manifest format is invalid, valid values are: null newline\n\n"); displayHelp(); exit 1; } $config{'manifest-format'} = $optctl{'manifest-format'}; } if (defined($optctl{'exclude-system'})) { $config{'exclude-system'} = 1; } if (defined($optctl{'system-base'})) { push(@{$config{'system-base'}},@{$optctl{'system-base'}}); } if (defined($optctl{'system-dir'})) { push(@{$config{'system-dir'}},@{$optctl{'system-dir'}}); } if (defined($optctl{'tar-ignore-failed-read'})) { push(@{$config{'tar-ignore-failed-read'}},@{$optctl{'tar-ignore-failed-read'}}); } if (defined($optctl{'data-dir'})) { push(@{$config{'data-dir'}},@{$optctl{'data-dir'}}); } if (defined($optctl{'exclude-file'})) { push(@{$config{'exclude-file'}},@{$optctl{'exclude-file'}}); } if (defined($optctl{'exclude-path'})) { push(@{$config{'exclude-path'}},@{$optctl{'exclude-path'}}); } if (defined($optctl{'exclude-fs-type'})) { push(@{$config{'exclude-fs-type'}},@{$optctl{'exclude-fs-type'}}); } if (@{$config{'exclude-fs-type'}} > 0) { # Pull in mounts open(my $fh,"<","/proc/mounts") or die "ERROR: Failed to open '/proc/mounts': $!"; while (my $line = <$fh>) { chomp($line); # Split off items we need my (undef,$path,$type) = split(/\s+/,$line); # Loop with types and check foreach my $item (@{$config{'exclude-fs-type'}}) { if ($item eq $type) { push(@{$config{'exclude-path'}},$path); } } } close($fh); } # Look for parallel versions of the compression program we going to use $config{'compress-gzip'} = "gzip"; if (checkPATH("pigz")) { $config{'compress-gzip'} = "pigz"; } $config{'compress-bzip2'} = "bzip2"; if (checkPATH("pbzip2")) { $config{'compress-bzip2'} = "pbzip2"; } elsif (checkPATH("lbzip2")) { $config{'compress-lbzip2'} = "lbzip2"; } $config{'compress-xz'} = "xz"; if (checkPATH("pxz")) { $config{'compress-xz'} = "pxz"; } elsif (checkPATH("pixz")) { $config{'compress-xz'} = "pixz"; } $config{'compress-lz'} = "clzip"; if (checkPATH("plzip")) { $config{'compress-lz'} = "plzip"; } elsif (checkPATH("pdlzip")) { $config{'compress-lz'} = "pdlzip"; } # Sanitize the source and dest my $sourceDir = File::Spec->rel2abs($ARGV[0]); my $destDir = File::Spec->rel2abs($ARGV[1]); # Backup function sub backup { our ($source,$dest) = @_; # State infor for current dir our %doBackup; our %srcFileList; our %srcDirList; # Original .state file read in during backup our %origFileList; our %origDirList; our %origPathAttribs; # New attributes our %newPathAttribs; # Preprocess dir sub backup_preprocess { my @list = @_; # Strip first part of the path (my $path = $File::Find::dir) =~ s#^$source/?##; # Check if this dir should be backed up or not.... if ( -f "$source/$path/.nodbackup" ) { printLog(LOG_INFO,"S: Path '[$source]/($path)' EXCLUDED from backup with .nodbackup\n"); return (); } # Exclude trash folders if ( "$source/$path" =~ /(\.Trash-[0-9]{4})$/) { printLog(LOG_INFO,"S: Path '[$source]/($path)' EXCLUDED from backup, Linux trash folder\n"); return (); } # Make sure even if we processing empty dirs that we actually record it if (!defined($srcFileList{$path})) { # Just set to empty hash ref $srcFileList{$path} = {}; } # Exclude system directories if ($config{'exclude-system'}) { # Loop through system dirs foreach my $sysdir (@{$config{'system-base'}}) { # Loop with system paths foreach my $excl (@defaultSystemExcl,@{$config{'system-dir'}}) { # Sanitize path my $testPath = File::Spec->rel2abs("$sysdir/$excl"); # Check... if ("/$path" eq $testPath) { printLog(LOG_INFO,"S: Path '[$source]/($path)' is a system directory, ignoring files\n"); $doBackup{$path} |= ST_DIR_SYS; return (); } } # Check if we excluding data dirs if (defined($config{'exclude-data'})) { # Loop with data dirs foreach my $excl (@defaultDataExcl,@{$config{'data-dir'}}) { # Sanitize path my $testPath = File::Spec->rel2abs("$sysdir/$excl"); # Check... if ("/$path" eq $testPath) { printLog(LOG_INFO,"S: Path '[$source]/($path)' is a data directory, ignoring files\n"); $doBackup{$path} |= ST_DIR_SYS; return (); } } } } } # Exclude paths foreach my $item (@{$config{'exclude-path'}}) { # Check... if ("/$path" =~ $item) { printLog(LOG_INFO,"S: Path '[$source]/($path)' is an excluded path, ignoring files\n"); $doBackup{$path} |= ST_DIR_SYS; return (); } } # Check if this dir exists on the backup, if not we need to back it up obviously... if ( ! -d "$dest/$path") { $doBackup{$path} |= ST_DIR_NEW; # This can probably only be because a backup was continued } elsif ( ! -f "$dest/$path/.dbackup-state" ) { # First backup will never have the main dir .dbackup-state file existing if ($path ne "") { printLog(LOG_WARNING,"State file '[$dest]/($path)/.dbackup-state' does not exist\n"); } $doBackup{$path} |= ST_DIR_NEW; } # Cannot read in for new dirs can we... if (($doBackup{$path} & ST_DIR_NEW) != ST_DIR_NEW) { # Load state file loadStateFile("$dest/$path/.dbackup-state",$path,\%origFileList,\%origDirList,\%origPathAttribs); # Check we have at least the version attribute if (!defined($origPathAttribs{$path}) || !defined($origPathAttribs{$path}->{'dbackup.version'})) { printLog(LOG_ERROR,"No dbackup version information found in '[$dest]/($path)/.dbackup-state', IGNORING\n"); delete($origDirList{$path}); delete($origFileList{$path}); # NK: # Sanity check, some versions created empty'ish .dbackup-state files with no sequence < 2012-01-21 # If we have a manifest, we should have a backup, therefore a format and sequence } elsif ( -f "$dest/$path/dbackup0.manifest" && ( !defined($origPathAttribs{$path}->{'format'}) || !defined($origPathAttribs{$path}->{'sequence'}) ) ) { printLog(LOG_ERROR,"No dbackup format/sequence information found in ". "'[$dest]/($path)/.dbackup-state', IGNORING\n"); delete($origDirList{$path}); delete($origFileList{$path}); # Check if we going to upgrade... } else { # Are we doing backup upgrades? if ($config{'backup-upgrade'}) { # Pull in versions my $a = getNumericVer($origPathAttribs{$path}->{'dbackup.version'}); my $b = getNumericVer($VERSION); # Compare if ( $a < 16 # Things before 0.0.16 may have .dbackup-state issues and missing # required info. ) { # Check if end in .x if ($VERSION =~ /\.x$/) { printLog(LOG_WARNING,"S: Path '[$source]/($path)' ". "cannot be upgraded, dbackup is TRUNK version\n"); } else { printLog(LOG_INFO,"S: Path '[$source]/($path)' will be backed up, upgrading\n"); delete($origDirList{$path}); delete($origFileList{$path}); # Force state file update if dir is empty $doBackup{$path} |= ST_DIR_CHANGED; } } } } } # Apply filter... if ((@{$config{'exclude-file'}}) > 0) { my @newList; foreach my $item (@list) { my $match = 0; # Apply only to files if ( -f "$source/$path/$item") { # Loop with exclude filters foreach my $filter (@{$config{'exclude-file'}}) { # Check for match if ($item =~ $filter) { printLog(LOG_INFO,"S: Path '[$source]/($path)/$item' matches file exclude filter, ignoring\n"); # XXX: NK - If this ws backed up before and now not, dir has changed? $match = 1; last; } } } # If not matched, add to new list if (!$match) { push(@newList,$item); } } # Replace the list now @list = @newList; } return @list; } # Process files sub backup_process { my $name = $File::Find::name; # Strip first part of the path (my $path = $File::Find::dir) =~ s#^$source/?##; # Store current filename my $item = $_; # We use lstat so we don't follow symlinks that don't exist my @stat = lstat($name); # Split it up my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, $ctime,$blksize,$blocks) = @stat; # Process directory if (S_ISDIR($mode)) { # Skip over main dir if ($item eq ".") { return; } # Make sure sub dirs have a santized name my $ppath = ($path ne "") ? "$path/$item" : $item; # Set default flags to nothing... $doBackup{$ppath} = 0; # Ok, lets see whats going on with the dir if (!defined($origDirList{$path}->{$item})) { printLog(LOG_DEBUG,"S: Directory '[$source]/($path)/$item' is new\n"); $doBackup{$path} |= ST_DIR_CHANGED; # Check if mtime matches } elsif ( !defined($origDirList{$path}->{$item}->{'mtime'}) || $origDirList{$path}->{$item}->{'mtime'} ne $mtime ) { printLog(LOG_DEBUG,"S: Directory '[$source]/($path)/$item' was modified\n"); $doBackup{$path} |= ST_DIR_CHANGED; # Check if uid matches } elsif ( !defined($origDirList{$path}->{$item}->{'uid'}) || $origDirList{$path}->{$item}->{'uid'} ne $uid ) { printLog(LOG_DEBUG,"S: Directory '[$source]/($path)/$item' UID was changed\n"); $doBackup{$path} |= ST_DIR_CHANGED; # Check if gid matches } elsif ( !defined($origDirList{$path}->{$item}->{'gid'}) || $origDirList{$path}->{$item}->{'gid'} ne $gid ) { printLog(LOG_DEBUG,"S: Directory '[$source]/($path)/$item' GID was changed\n"); $doBackup{$path} |= ST_DIR_CHANGED; # Check if mode matches } elsif ( !defined($origDirList{$path}->{$item}->{'mode'}) || $origDirList{$path}->{$item}->{'mode'} ne $mode ) { printLog(LOG_DEBUG,"S: Directory '[$source]/($path)/$item' MODE was changed\n"); $doBackup{$path} |= ST_DIR_CHANGED; } # Record details... $srcDirList{$path}->{$item}->{'size'} = $size; $srcDirList{$path}->{$item}->{'ctime'} = $ctime; $srcDirList{$path}->{$item}->{'atime'} = $atime; $srcDirList{$path}->{$item}->{'mtime'} = $mtime; $srcDirList{$path}->{$item}->{'uid'} = $uid; $srcDirList{$path}->{$item}->{'gid'} = $gid; $srcDirList{$path}->{$item}->{'mode'} = $mode; return; # Check if we're a socket } elsif (S_ISSOCK($mode)) { # Blatently ignore... return; } # Initialize file state my $state = 0; # Check if file does not exists on backup if (!defined($origFileList{$path}->{$item})) { if (($doBackup{$path} & ST_DIR_NEW) != ST_DIR_NEW) { printLog(LOG_DEBUG,"S: File '[$source]/($path)/$item' is new\n"); } $state |= ST_FILE_NEW; # Check if size matches } elsif ( !defined($origFileList{$path}->{$item}->{'size'}) || $origFileList{$path}->{$item}->{'size'} ne $size ) { printLog(LOG_DEBUG,"S: File '[$source]/($path)/$item' has different size\n"); $state |= ST_FILE_CHANGED; # # NK: Does not like chmod changes to files??? # # Check if ctime matches # } elsif ( # !defined($origFileList{$path}->{$item}->{'ctime'}) || # $origFileList{$path}->{$item}->{'ctime'} ne $ctime # ) { # printLog(LOG_DEBUG,"S: File '[$source]/($path)/$item' was recreated\n"); # $state |= ST_FILE_CHANGED; # Check if mtime matches } elsif ( !defined($origFileList{$path}->{$item}->{'mtime'}) || $origFileList{$path}->{$item}->{'mtime'} ne $mtime ) { printLog(LOG_DEBUG,"S: File '[$source]/($path)/$item' was modified\n"); $state |= ST_FILE_CHANGED; # Check if uid matches } elsif ( !defined($origFileList{$path}->{$item}->{'uid'}) || $origFileList{$path}->{$item}->{'uid'} ne $uid ) { printLog(LOG_DEBUG,"S: File '[$source]/($path)/$item' UID was changed\n"); $state |= ST_FILE_ATTR_CHANGED # Check if gid matches } elsif ( !defined($origFileList{$path}->{$item}->{'gid'}) || $origFileList{$path}->{$item}->{'gid'} ne $gid ) { printLog(LOG_DEBUG,"S: File '[$source]/($path)/$item' GID was changed\n"); $state |= ST_FILE_ATTR_CHANGED; # Check if mode matches } elsif ( !defined($origFileList{$path}->{$item}->{'mode'}) || $origFileList{$path}->{$item}->{'mode'} ne $mode ) { printLog(LOG_DEBUG,"S: File '[$source]/($path)/$item' MODE was changed\n"); $state |= ST_FILE_ATTR_CHANGED; } # Update state of path, this is used below, the $state is used to track WHAT changed if ($state) { $doBackup{$path} |= ST_FILE_CHANGED; } # Record details... $srcFileList{$path}->{$item}->{'size'} = $size; $srcFileList{$path}->{$item}->{'ctime'} = $ctime; $srcFileList{$path}->{$item}->{'atime'} = $atime; $srcFileList{$path}->{$item}->{'mtime'} = $mtime; $srcFileList{$path}->{$item}->{'uid'} = $uid; $srcFileList{$path}->{$item}->{'gid'} = $gid; $srcFileList{$path}->{$item}->{'mode'} = $mode; $srcFileList{$path}->{$item}->{'_state'} = $state; } # Time to do stuff sub backup_postprocess { # Strip first part of the path (my $path = $File::Find::dir) =~ s#^$source/?##; # Get current lists my $curDirList = $srcDirList{$path}; my $curFileList = $srcFileList{$path}; # Compare the two file lists, we know what was added, lets see if anything was removed foreach my $fname (keys %{$origFileList{$path}}) { if (!defined($srcFileList{$path}->{$fname})) { printLog(LOG_DEBUG,"File '[$source]/($path)/$fname' removed\n"); $doBackup{$path} |= ST_FILE_CHANGED; } } # Create backup dir if (($doBackup{$path} & ST_DIR_NEW) == ST_DIR_NEW && ! -d "$dest/$path") { mkpath("$dest/$path"); } # NK: # Before we do anything, we copy our previous attributes. # If we do not write an archive below, we still have our stuff. # If there is something special, we still have it. Best idea? right? foreach my $item (keys %{$origPathAttribs{$path}}) { $newPathAttribs{$path}->{$item} = $origPathAttribs{$path}->{$item}; } # Check if we need to backup this dir if (($doBackup{$path} & ST_FILE_CHANGED) == ST_FILE_CHANGED) { printLog(LOG_INFO,"B: Path '[$source]/$path' backing up\n"); # If we not backing up a system dir, we create a manifest and backup the files if (($doBackup{$path} & ST_DIR_SYS) != ST_DIR_SYS) { # Did file contents change? my $changedFiles = 0; my $changedAttrs = 0; my @newFiles = (); my @manifestList; # Take a look quick... foreach my $item (sort keys %{$curFileList}) { # Lets see whats happened... if (($curFileList->{$item}->{'_state'} & ST_FILE_NEW) == ST_FILE_NEW) { push(@newFiles,$item); } if (($curFileList->{$item}->{'_state'} & ST_FILE_CHANGED) == ST_FILE_CHANGED) { $changedFiles = 1; } if (($curFileList->{$item}->{'_state'} & ST_FILE_ATTR_CHANGED) == ST_FILE_ATTR_CHANGED) { $changedAttrs = 1; } } # If we don't have a sequence, this is a new backup? if (!defined($newPathAttribs{$path}->{'sequence'} = $origPathAttribs{$path}->{'sequence'})) { $newPathAttribs{$path}->{'sequence'} = 0; @manifestList = keys %{$curFileList}; } else { # If this is new files, then just inc the counter if (@newFiles > 0 && !$changedFiles && !$changedAttrs) { $newPathAttribs{$path}->{'sequence'}++; @manifestList = @newFiles; # If files changed we blow everything away } else { $newPathAttribs{$path}->{'sequence'} = 0; # Remove old files removeBackups( "$dest/$path", $origPathAttribs{$path}->{'format'}, $origPathAttribs{$path}->{'compression'}, $origPathAttribs{$path}->{'sequence'} ); @manifestList = keys %{$curFileList}; } } # Get current sequence my $seq = $newPathAttribs{$path}->{'sequence'}; # Setup tar args my @tarArgs = (); my $tarExt; if ($config{'compress'} eq "xz") { push(@tarArgs,"--use-compress-program",$config{'compress-xz'}); $tarExt = ".xz"; } elsif ($config{'compress'} eq "bzip2") { push(@tarArgs,"--use-compress-program",$config{'compress-bzip2'}); $tarExt = ".bz2"; } elsif ($config{'compress'} eq "gzip") { push(@tarArgs,"--use-compress-program",$config{'compress-gzip'}); $tarExt = ".gz"; } elsif ($config{'compress'} eq "lz") { push(@tarArgs,"--use-compress-program",$config{'compress-lz'}); $tarExt = ".lz"; } elsif ($config{'compress'} eq "none") { $tarExt = ""; } # Save format and compression $newPathAttribs{$path}->{'format'} = "tar"; $newPathAttribs{$path}->{'compression'} = $config{'compress'}; # Sort out manifest format my $manifestDelim; # Are we overriding the manifest format? if (defined($config{'manifest-format'})) { $newPathAttribs{$path}->{'manifest.format'} = $config{'manifest-format'}; } else { # If not choose best if (defined($origPathAttribs{$path}->{'manifest.format'})) { $newPathAttribs{$path}->{'manifest.format'} = $origPathAttribs{$path}->{'manifest.format'}; } else { # Tar pre-1.22 is buggered with \0 manifest files if ($tarVer > 122) { $newPathAttribs{$path}->{'manifest.format'} = "null"; } else { $newPathAttribs{$path}->{'manifest.format'} = "newline"; } } } # Setup manifest delim & tar options if ($newPathAttribs{$path}->{'manifest.format'} eq "null") { push(@tarArgs,"--null"); push(@tarArgs,"--files-from", "$dest/$path/dbackup$seq.manifest"); push(@tarArgs,"--no-unquote"); $manifestDelim = "\0"; } elsif ($newPathAttribs{$path}->{'manifest.format'} eq "newline") { push(@tarArgs,"--files-from", "$dest/$path/dbackup$seq.manifest"); $manifestDelim = "\n"; } else { printLog(LOG_ERROR,"Invalid manifest.format '".$newPathAttribs{$path}->{'manifest.format'}."'\n"); exit 1; } # File list to backup open(my $fh,">","$dest/$path/dbackup$seq.manifest") or die "Failed to open '[$dest]/($path)/dbackup$seq.manifest': $!"; foreach my $item (@manifestList) { # Sanity check to see if this filename is going to work if ($manifestDelim eq "\n" && $item =~ /[\n"'\\]/) { printLog(LOG_ERROR,"ERROR: Your version of tar cannot backup => path:'$path', file '$item'\n"); next; } # If this is not the top dir, use / if ($path ne "") { print($fh "$path/$item$manifestDelim"); # If it is, don't use / } else { print($fh "$item$manifestDelim"); } } close($fh); # tar specifics... if ($newPathAttribs{$path}->{'format'} eq "tar") { # Exclude paths for tar-ignore-failed-read foreach my $item (@{$config{'tar-ignore-failed-read'}}) { # Check... if ("/$path" eq $item) { printLog(LOG_NOTICE,"B: Path '[$source]/$path' ignore-failed-read passed to tar\n"); push(@tarArgs,"--ignore-failed-read",$path); } } } # Change dir and start backup system( "tar", "--create", "--verbose", # Output file "--file", "$dest/$path/dbackup$seq.tar$tarExt", # cd into here first... "--directory", "$source", # Do not recurse "--no-recursion", # Output to this file "--index-file", "$dest/$path/dbackup$seq.index", # Incremental options # "--listed-incremental", "$dest/$path/dbackup.snar", # "--no-check-device", @tarArgs ); if ($? == -1) { printLog(LOG_ERROR,"Failed to execute: $!\n"); exit 1; } elsif ($? & 127) { printLog(LOG_ERROR,"Child died with signal ".($? & 127)."\n"); exit 1; } else { my $retcode = $? >> 8; # If tar died, lets die too if ($retcode >= 2) { printLog(LOG_ERROR,"tar died with error code $retcode\n"); # exit 1; } } } else { # if (($doBackup{$path} & ST_DIR_SYS) != ST_DIR_SYS) { # Remove old files removeBackups( "$dest/$path", $origPathAttribs{$path}->{'format'}, $origPathAttribs{$path}->{'compression'}, $origPathAttribs{$path}->{'sequence'} ); } } # if (($doBackup{$path} & ST_FILE_CHANGED) == ST_FILE_CHANGED) { # Check if we need to record directory changes... if ( ($doBackup{$path} & ST_FILE_CHANGED) == ST_FILE_CHANGED || ($doBackup{$path} & ST_DIR_CHANGED) == ST_DIR_CHANGED || ($doBackup{$path} & ST_DIR_NEW) == ST_DIR_NEW ) { # If we have a revision, bump it if (defined($newPathAttribs{$path}->{'revision'} = $origPathAttribs{$path}->{'revision'})) { $newPathAttribs{$path}->{'revision'} = $origPathAttribs{$path}->{'revision'} + 1; } else { $newPathAttribs{$path}->{'revision'} = 0; } # Set this as the dbackup that created this file $newPathAttribs{$path}->{'dbackup.version'} = $VERSION; printLog(LOG_DEBUG,"B: Writing state '[$source]/($path)' - revision ".$newPathAttribs{$path}->{'revision'}."\n"); # Write out state, we do this AFTER we have backed up, so if we stopped, we can just continue my $gz = gzopen("$dest/$path/.dbackup-state","wb") or die "Failed to open '[$dest]/($path)/.dbackup-state': $!"; # Loop with attributes foreach my $item (keys %{$newPathAttribs{$path}}) { $gz->gzwrite(join("\0", "a", $item, $newPathAttribs{$path}->{$item} )."\n" ); } # Loop with directory list foreach my $item (sort keys %{$curDirList}) { my $ename = encode_base64($item); $ename =~ s/\n//g; # Save state of source files $gz->gzwrite(join("\0", "d", $ename, $curDirList->{$item}->{'ctime'}, $curDirList->{$item}->{'atime'}, $curDirList->{$item}->{'mtime'}, $curDirList->{$item}->{'uid'}, $curDirList->{$item}->{'gid'}, $curDirList->{$item}->{'mode'} )."\n" ); } # Loop with file list foreach my $item (sort keys %{$curFileList}) { my $ename = encode_base64($item); $ename =~ s/\n//g; # Save state of source files $gz->gzwrite(join("\0", "f", $ename, $curFileList->{$item}->{'size'}, $curFileList->{$item}->{'ctime'}, $curFileList->{$item}->{'atime'}, $curFileList->{$item}->{'mtime'}, $curFileList->{$item}->{'uid'}, $curFileList->{$item}->{'gid'}, $curFileList->{$item}->{'mode'} )."\n" ); } # Finally close $gz->gzclose(); } # State clear delete($origFileList{$path}); } printLog(LOG_NOTICE,"BACKUP START: $source => $dest\n"); printLog(LOG_INFO,"Compression: ".$config{'compress'}." [".$config{'compress-'.$config{'compress'}}."]\n"); # Check if we excluding system files if ($config{'exclude-system'}) { printLog(LOG_NOTICE,"Exclude System Base: ".join(", ",@{$config{'system-base'}})."\n"); printLog(LOG_NOTICE,"Exclude System Dirs: ".join(", ",@defaultSystemExcl,@{$config{'system-dir'}})."\n"); # If we excluding data too... if ($config{'exclude-data'}) { printLog(LOG_NOTICE,"Exclude Data Dirs: ".join(", ",@defaultDataExcl,@{$config{'data-dir'}})."\n"); } } printLog(LOG_NOTICE,"Exclude Paths: ".join(", ",@{$config{'exclude-path'}})."\n"); printLog(LOG_NOTICE,"Exclude Files: ".join(", ",@{$config{'exclude-file'}})."\n"); # We need an entry for our main dir before we start $doBackup{""} = 0; # This basically does our backup for us... find ( { preprocess => \&backup_preprocess, wanted => \&backup_process, postprocess => \&backup_postprocess }, $source ); printLog(LOG_INFO,"Processing stale directories...\n"); my @rmlist; # Total item by item find ( { wanted => sub { }, # We just need post processing ... postprocess => sub { # Strip first part of the path (my $path = $File::Find::dir) =~ s#^$dest/?##; # Does this dir exist on the backup, but not on the fileserver? if (!defined($srcFileList{$path})) { push(@rmlist,$path); } }, }, $dest ); foreach my $rmitem ( @rmlist ) { printLog(LOG_DEBUG,"Remove path '[$dest]/($rmitem)'\n"); rmtree("$dest/$rmitem"); } printLog(LOG_NOTICE,"BACKUP END\n"); } # If we backing up or restoring, we need to check the compression program if (defined($optctl{'backup'}) || defined($optctl{'restore'})) { # One last check for to make sure the compression program exists if (checkPATH(my $compressProgram = "compress-".$config{'compress'})) { print(STDERR "ERROR: Compression program '$compressProgram' cannot be found in path!"); exit 1; } } # Check if we backing up if (defined($optctl{'backup'})) { backup($sourceDir,$destDir); # Or restoring... } elsif (defined($optctl{'restore'})) { restore($sourceDir,$destDir); } else { print(STDERR "ERROR: No command given\n\n"); displayHelp(); exit 1; } # Restore function sub restore { our ($source,$dest) = @_; # State infor for current dir our %origFileList; our %origDirList; our %origPathAttribs; # Preprocess dir sub restore_preprocess { my @list = @_; # Strip first part of the path (my $path = $File::Find::dir) =~ s#^$source/?##; # Check if we have all our source files if ( ! -f "$source/$path/.dbackup-state" ) { printLog(LOG_WARNING,"S: Path '[$source]/($path)' is MISSING .dbackup-state\n"); return @list; } # Load state file loadStateFile("$source/$path/.dbackup-state",$path,\%origFileList,\%origDirList,\%origPathAttribs); # Check we have at least the version attribute if (!defined($origPathAttribs{$path}) || !defined($origPathAttribs{$path}->{'dbackup.version'})) { printLog(LOG_ERROR, "No dbackup version information found in '[$source]/($path)/.dbackup-state', IGNORING\n"); delete($origDirList{$path}); delete($origFileList{$path}); return @list; } # During our check, we need to create the dir, we may not have a backup file # so we do it here. if ( ! -d "$dest/$path") { printLog(LOG_INFO,"R: Path '[$dest]/($path)' creating directory\n"); mkpath("$dest/$path"); } # The lack of a sequence number probably means we didn't output any tar files during backup if (!defined($origPathAttribs{$path}->{'sequence'})) { return @list; } # Loop through backup sequences for (my $seq = 0; $seq <= $origPathAttribs{$path}->{'sequence'}; $seq++) { printLog(LOG_DEBUG,"R: Path '[$dest]/($path)' restoring data ".($seq+1)." of ". ($origPathAttribs{$path}->{'sequence'}+1)."\n"); # Args for tar my @tarArgs = (); my $tarExt; if ($origPathAttribs{$path}->{'compression'} eq "xz") { push(@tarArgs,"--use-compress-program",$config{'compress-xz'}); $tarExt = ".xz"; } elsif ($origPathAttribs{$path}->{'compression'} eq "bzip2") { push(@tarArgs,"--use-compress-program",$config{'compress-bzip2'}); $tarExt = ".bz2"; } elsif ($origPathAttribs{$path}->{'compression'} eq "gzip") { push(@tarArgs,"--use-compress-program",$config{'compress-gzip'}); $tarExt = ".gz"; } elsif ($origPathAttribs{$path}->{'compression'} eq "lz") { push(@tarArgs,"--use-compress-program",$config{'compress-lz'}); $tarExt = ".lz"; } elsif ($origPathAttribs{$path}->{'compression'} eq "none") { $tarExt = ""; } # Check what type of backup we did if ( ! -f "$source/$path/dbackup$seq.tar$tarExt" ) { # If we have any other part of the backup, show a message if ( ( -f "$source/$path/dbackup$seq.index" || -f "$source/$path/dbackup$seq.manifest" || -f "$source/$path/dbackup$seq.snar" ) && $seq > 0 ) { printLog(LOG_WARNING,"Backup file '[$source]/($path)/dbackup$seq.tar$tarExt' not found, IGNORING\n"); } return @list; } # Check we have files we need/created if ( ! -f "$source/$path/dbackup$seq.index" ) { printLog(LOG_WARNING,"Manifest file '[$source]/($path)/dbackup$seq.index' not found\n"); return @list; } if ( ! -f "$source/$path/dbackup$seq.manifest" ) { printLog(LOG_WARNING,"Manifest file '[$source]/($path)/dbackup$seq.manifest' not found\n"); return @list; } # Check if manifest.format is undefined, if it is, use the default if (!defined($origPathAttribs{$path}->{'manifest.format'})) { # Check if we have a commandline override if (defined($optctl{'manifest-format'})) { $origPathAttribs{$path}->{'manifest.format'} = $optctl{'manifest-format'}; } else { # NK: # Default to null # This saves us from having to regenerate manifest.format attrs and backups for older # versions of dbackup. $origPathAttribs{$path}->{'manifest.format'} = "null"; } } # Setup manifest delim & tar options if ($origPathAttribs{$path}->{'manifest.format'} eq "null") { push(@tarArgs,"--null"); push(@tarArgs,"--files-from", "$source/$path/dbackup$seq.manifest"); push(@tarArgs,"--no-unquote"); } elsif ($origPathAttribs{$path}->{'manifest.format'} eq "newline") { push(@tarArgs,"--files-from", "$source/$path/dbackup$seq.manifest"); } else { printLog(LOG_ERROR,"Invalid manifest.format '".$origPathAttribs{$path}->{'manifest.format'}. "' for '[$source]/($path)', try setting the default with --manifest-format=\n"); exit 1; } # Sanity check if ($tarVer < 122 && $origPathAttribs{$path}->{'manifest.format'} eq "null") { printLog(LOG_ERROR,"Your version of tar does NOT support manifest.format of 'null'\n"); exit 1; } # Other tar options if (defined($optctl{'tar-keep-newer'})) { push(@tarArgs,"--keep-newer-files"); } if (defined($optctl{'tar-keep-old-files'})) { push(@tarArgs,"--keep-old-files"); } # Change dir and start backup system( "tar", "--extract", # Output file "--file", "$source/$path/dbackup$seq.tar$tarExt", # cd into here first... "--directory", "$dest", # Do not recurse "--no-recursion", # Incremental options # "--incremental", @tarArgs ); if ($? == -1) { printLog(LOG_ERROR,"Failed to execute: $!\n"); exit 1; } elsif ($? & 127) { printLog(LOG_ERROR,"Child died with signal ".($? & 127)."\n"); exit 1; } else { my $retcode = $? >> 8; # If tar died, lets die too if ($retcode >= 2) { printLog(LOG_ERROR,"tar died with error code $retcode\n"); # exit 1; } } } return @list; } # Process files sub restore_process { my $name = $File::Find::name; # Strip first part of the path (my $path = $File::Find::dir) =~ s#^$source/?##; # Store current filename my $item = $_; # print(STDERR "PROCESS: Path = $path, Name = $name, Item = $item)\n"); } # Time to do stuff sub restore_postprocess { # Strip first part of the path (my $path = $File::Find::dir) =~ s#^$source/?##; printLog(LOG_DEBUG,"R: Path '[$dest]/($path)' restoring meta-data\n"); # Loop with directories in this path foreach my $dname (keys %{$origDirList{$path}}) { # Set dir my $dir = $origDirList{$path}->{$dname}; # Full dirname my $fdirname = "$dest/$path/$dname"; # Could be a dir with no contents of one which was ignored, in which case we must create it if (! -d $fdirname) { printLog(LOG_INFO,"R: Path '[$dest]/($path)/$dname' creating missing directory\n"); mkpath($fdirname); } # Restore attribs if (!chown($dir->{'uid'},$dir->{'gid'},$fdirname)) { printLog(LOG_ERROR,"Failed to chown(".$dir->{'uid'}.",".$dir->{'gid'}.") '$fdirname': $!\n"); } if (!chmod($dir->{'mode'},$fdirname)) { printLog(LOG_ERROR,"Failed to chmod(".$dir->{'mode'}.") '$fdirname': $!\n"); } if (!utime($dir->{'atime'},$dir->{'mtime'},$fdirname)) { printLog(LOG_ERROR,"Failed to utime(".$dir->{'atime'}.",".$dir->{'mtime'}.") '$fdirname': $!\n"); } } # Loop with files in this path foreach my $fname (keys %{$origFileList{$path}}) { # Set dir my $file = $origFileList{$path}->{$fname}; # Full dirname my $ffilename = "$dest/$path/$fname"; # Restore for links and files if (!lchown($file->{'uid'},$file->{'gid'},$ffilename)) { printLog(LOG_ERROR,"Failed to lchown(".$file->{'uid'}.",".$file->{'gid'}.") '$ffilename': $!\n"); } # Ignore links for the rest... next if (S_ISLNK($file->{'mode'})); # Restore mode & utime only for files if (!chmod($file->{'mode'},$ffilename)) { printLog(LOG_ERROR,"Failed to chmod(".$file->{'mode'}.") '$ffilename': $!\n"); } if (!utime($file->{'atime'},$file->{'mtime'},$ffilename)) { printLog(LOG_ERROR,"Failed to utime(".$file->{'atime'}.",".$file->{'mtime'}.") '$ffilename': $!\n"); } } } printLog(LOG_NOTICE,"RESTORE START: $source => $dest\n"); # This basically does our backup for us... find ( { preprocess => \&restore_preprocess, wanted => \&restore_process, postprocess => \&restore_postprocess }, $source ); printLog(LOG_NOTICE,"RESTORE END\n"); } # Display log line sub printLog { my ($level,$msg,@args) = @_; # Work out level txt all nicely my $levelTxt = "UNKNOWN"; if ($level == LOG_DEBUG) { $levelTxt = "DEBUG"; } elsif ($level == LOG_INFO) { $levelTxt = "INFO"; } elsif ($level == LOG_NOTICE) { $levelTxt = "NOTICE"; } elsif ($level == LOG_WARNING) { $levelTxt = "WARNING"; } elsif ($level == LOG_ERROR) { $levelTxt = "ERROR"; } # Check log level if ($level <= $config{'log-level'}) { printf(STDERR "%s/$levelTxt: %s", strftime('%F %T',localtime()), $msg, @args); } } # Display usage sub displayHelp { # Build some strings we need my $systemDirStr = join (", ",@defaultSystemExcl); my $dataDirStr = join (", ",@defaultDataExcl); print(STDERR< General Options: --help What you seeing now. --config=file Config file to use. --log-level 5 = debug, 4 = info, 3 = notice 2 = warning, 1 = error --tar Path to tar binary. Backing Options: --backup Backup src to dst. --backup-upgrade Upgrade backup to new dbackup ver. --compress= Compression method to use defaults to using xz, or bzip2 if xz unavail. --exclude-data Exclude all data dirs listed below. --exclude-system Exclude system dirs listed below. --exclude-path=pcre PCRE to exclude paths from backup. --exclude-file=pcre PCRE to exclude files from backup. --exclude-fs-type=fstype Filesystem type to exclude. --data-dir=dir Add an additional data directory. --system-dir=dir Add an additional system directory. --system-base=path Add a system base. This defaults to / and this option will override that. --tar-ignore-failed-read=path This is passed to tar only. It will not cause errors of files that cannot be read for the path matched. Restore Options: --restore Restore src to dst. --tar-keep-newer Do not overwrite newer files. --tar-keep-old-files Don't replace existing files. Builtins: --------- system-dirs: $systemDirStr data-dirs: $dataDirStr EOF } # # LIBRARY # sub loadStateFile { my ($statefile,$key,$fileList,$dirList,$pathAttribs) = @_; # Read in backup state file, we do it here because we may not have a backup file # to restore my $gz = gzopen($statefile,"rb") or die "FATAL ERROR: Failed to open '$statefile': $!"; # Read in file list my $line; while ($gz->gzreadline($line) > 0) { chomp($line); # Pull out array of items my @aline = split(/\0/,$line); my $type = shift(@aline); # Check if its defined if (defined($type)) { # If its a file... if ($type eq "f") { my ($ename,$size,$ctime,$atime,$mtime,$uid,$gid,$mode) = @aline; my $name = decode_base64($ename); # Setup our hash $fileList->{$key}->{$name}->{'size'} = $size; $fileList->{$key}->{$name}->{'ctime'} = $ctime; $fileList->{$key}->{$name}->{'atime'} = $atime; $fileList->{$key}->{$name}->{'mtime'} = $mtime; $fileList->{$key}->{$name}->{'uid'} = $uid; $fileList->{$key}->{$name}->{'gid'} = $gid; $fileList->{$key}->{$name}->{'mode'} = $mode; # If its a dir } elsif ($type eq "d") { my ($ename,$ctime,$atime,$mtime,$uid,$gid,$mode) = @aline; my $name = decode_base64($ename); # Setup our hash $dirList->{$key}->{$name}->{'ctime'} = $ctime; $dirList->{$key}->{$name}->{'atime'} = $atime; $dirList->{$key}->{$name}->{'mtime'} = $mtime; $dirList->{$key}->{$name}->{'uid'} = $uid; $dirList->{$key}->{$name}->{'gid'} = $gid; $dirList->{$key}->{$name}->{'mode'} = $mode; # Attribute } elsif ($type eq "a") { my ($name,$value) = @aline; $pathAttribs->{$key}->{$name} = $value; # Unknown } else { print(STDERR "ERROR: Invalid type '$type' in '$statefile'\n"); exit 1; } } } # Close gzip file $gz->gzclose(); } # Remove backup and its sequences sub removeBackups { my ($path,$format,$compression,$seqs) = @_; # Loop through backup sequences for (my $i = 0; $i <= $seqs; $i++) { my $tarExt; if ($compression eq "xz") { $tarExt = ".xz"; } elsif ($compression eq "bzip2") { $tarExt = ".bz2"; } elsif ($compression eq "gzip") { $tarExt = ".gz"; } elsif ($compression eq "lz") { $tarExt = ".lz"; } elsif ($compression eq "none") { $tarExt = ""; } # Unlink backup files if (-f "$path/dbackup$i.tar$tarExt") { unlink("$path/dbackup$i.tar$tarExt") or die "ERROR: Failed to remove file '$path/dbackup$i.tar$tarExt': $!"; } # Unlink manifest if (-f "$path/dbackup$i.manifest") { unlink("$path/dbackup$i.manifest") or die "ERROR: Failed to remove file '$path/dbackup$i.manifest': $!"; } # Unlink index if (-f "$path/dbackup$i.index") { unlink("$path/dbackup$i.index") or die "ERROR: Failed to remove file '$path/dbackup$i.index': $!"; } # Unlink snar if (-f "$path/dbackup$i.snar") { unlink("$path/dbackup$i.snar") or die "ERROR: Failed to remove file '$path/dbackup$i.snar': $!"; } } } # Convert a possible string to an array, or return the array if it is indeed an array sub toArray { my $param = shift; if (ref $param eq "ARRAY") { return $param; } else { return [ split(/\n/,$param) ]; } } # Grab tar version sub getTarVer { my $tar = shift; # Open tar and grab its version string open(my $ph, "-|", $config{'tar'} . " --version") or die "FAILED to execute '".$config{'tar'}."': $!"; if (!($tarVer = <$ph>)) { print(STDERR "ERROR: Failed to read tar version\n"); exit 1; } close($ph); # Convert version string into integer and return it ($tarVer) = ($tarVer =~ /([0-9]+\.[0-9]+)/); if (!defined($tarVer) || $tarVer eq "") { print(STDERR "ERROR: Failed to parse tar version\n"); exit 1; } $tarVer =~ s/\.//g; if ($tarVer < 100) { print(STDERR "ERROR: Failed to read tar version or your version is simply too old\n"); exit 1; } return $tarVer; } # Convert a triplet version into an integer sub getNumericVer { my $a = shift; # 000 000 000 my @a = split(/\./,$a); # Quick fix for devel versions $a[2] = 0 if ($a[2] eq "x"); $a[2] =~ s/[a-z]$//; return ( ($a[0]*1000000) + ($a[1]*1000) + $a[2] ); } # Function to check if a binary is in our PATH sub checkPATH { my $binary = shift; # Loop with PATH components for my $path (split(/:/,$ENV{PATH})) { # And check if the binary is executable if (-x "$path/$binary") { return 1; } } return 0; } # vim: ts=4 awit-dbackup-0.0.22/LICENSE0000644000000000000000000010451312404357737013671 0ustar rootroot GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . awit-dbackup-0.0.22/REQUIREMENTS0000644000000000000000000000033512404357737014527 0ustar rootroottar >= 1.22 - Previous version of tar have a --null bug, dbackup does work around this but tar cannot backup files with very odd filenames that contain " ' \ xz - For best compression Compress::Zlib Config::IniFiles awit-dbackup-0.0.22/debian/0000755000000000000000000000000012404357737014102 5ustar rootrootawit-dbackup-0.0.22/debian/watch0000644000000000000000000000034612404357737015136 0ustar rootrootversion=3 opts=pgpsigurlmangle=s/$/.asc/,\ downloadurlmangle=s/\/(v?\d+\.\d+\.\d+.*)$/\/$1\/awit-dbackup-$1.tar.gz/,\ filenamemangle=s/v?(\d+\.\d+\.\d+.*)$/awit-dbackup-$1.tar.gz/ \ http://download.dbackup.org/v?(\d+\.\d+\.\d+.*) awit-dbackup-0.0.22/debian/awit-dbackup.manpages0000644000000000000000000000002112404357737020163 0ustar rootrootdebian/dbackup.8 awit-dbackup-0.0.22/debian/copyright0000644000000000000000000000214512404357737016037 0ustar rootrootFormat: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Nigel Kukard Source: http://download.dbackup.org Files: * Copyright: 2010-2014 AllWorldIT contact Nigel Kukard License: GPL-3+ Files: debian/* Copyright: 2014 Nigel Kukard License: GPL-3+ License: GPL-3+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in '/usr/share/common-licenses/GPL-3'. awit-dbackup-0.0.22/debian/control0000644000000000000000000000167212404357737015513 0ustar rootrootSource: awit-dbackup Maintainer: Nigel Kukard Section: contrib/utils Priority: optional Standards-Version: 3.9.5 Build-Depends: debhelper (>= 9), docbook-to-man Homepage: http://www.dbackup.org Vcs-Git: https://gitlab.devlabs.linuxassist.net/awit-dbackup/awit-dbackup.git Vcs-Browser: https://gitlab.devlabs.linuxassist.net/awit-dbackup/awit-dbackup/tree/master Package: awit-dbackup Architecture: all Depends: ${perl:Depends}, ${misc:Depends}, tar (>= 1.22), perl (>= 5.14) | libio-compress-perl, libconfig-inifiles-perl Recommends: pbzip2, pigz, pixz, pdlzip Description: Flexible one archive per directory backup tool This is a backup software package which basically creates one archive per directory it backs up. This makes searching through the backup much easier as you can look for which files you're after in the directory hierarchy. It will only backup directories which have changed, which makes it rsync friendly. awit-dbackup-0.0.22/debian/upstream/0000755000000000000000000000000012404357737015742 5ustar rootrootawit-dbackup-0.0.22/debian/upstream/signing-key.asc0000644000000000000000000000413512404357737020661 0ustar rootroot-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1 mQENBFL+gX8BCAC5wuUs2HzUKfcfCveczsqeYB6nPK4iXCiVsWBQEPF0mvRSsRuo X7oDsH3fnmT5WR6YgZO4zSjarHBgH19J0uTEwEbWAdcnE04CQZm62/Nd29SqI2ni d237myxXL7wD5TtWP5Pz8iRVtlWPnKdXMYJ5u/OwJcrPsb59W8MonubdQ7XFzvjR A72x+g7BcP/rTZ8fTldzAbA3s4iRru+qqkToT/TyLzYP4aEJIb04CdiHhL2aoZ+e IE228KvWwj9HyGjXQGSNSJT8xmV6Iqrh7GhqbryvC4S4tFLCllJi61MXu4xEE1v7 zht6HJctRHRp3g8Hbi22gkPmbtDH3a06J+ENABEBAAG0R05pZ2VsIEt1a2FyZCAo QWxsV29ybGRJVCBTb2Z0d2FyZSBTaWduaW5nIEtleSkgPHN1cHBvcnRAYWxsd29y bGRpdC5jb20+iQE4BBMBAgAiBQJS/oF/AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIe AQIXgAAKCRBmQ4pbD+xVionoB/sFnA9o0UNP2rgv0dbVbWG68K55EaXb0C/4Js8B EH3vr7jHa+LqaYQMjHSP+ZmO5FgKd9Qf1P8S433Ie0AaJymeLirqUYWKIh4gN8Q6 G1kD6wCzh3EQ/0pWMeFfaI6JwX0cI6D9elnUjBpQtOzpZRrg075kZ4QUX2pob5Gh wjAh1ofDSGPcFOi7bfu9v6/xcWopudEG2vqbNZM09HZ1KCTVnmKK/Mjdax7NQMKV a41u1bzNhmIy9JI2GLVt8M89DNGBSwzC+nXM6EGVtHHXrr0Bg81dT+hfO472CfYD gztcxiK1D4G8+uU7Ou6vMNkXLksjC4hlWOr36ooFy23JYHwviQEcBBABAgAGBQJS /oMMAAoJEIR4oJUcqdAusL4IAKNYi4fCjjBB6ziHC9ZIkFY30Rwjcbl8qqx5Eo91 SU73Jv62oe4GtGoHHiyqAFl5iuLhTVa71xIIPXNsKXAbmq/AyuUzHrc5Xah56WMD sa6NDi29wdKcTh1dwgjs6A//HmyN66x/xyEcAVThFgMKdQE1e7sDbuEPeZ1LJ68p CcRxgFEK9/BLAHrKy1vivHsTyjeHnn5HRsgRBydvGUXQlx0HW7OT6O5NjkFzAePx z0sHQCxMssbP4ayw5lHhg+oAVIcfCR1vH2IruG+xAUQSY4JD6ttfm9NNqVuHmn/t URstSVBcqMXYyfLPkaHQgq4Nr/vIMY4neiI5z+ZLbkOV5Be5AQ0EUv6BfwEIANjk ZEsMzDiqTR7aVMmmalnZqrr9yQxG9n84ocu33qWVpHA4JCPGhVHV5ZqsNH7iCP+O RxSGtCBrd0gksEQtAZyw4vVkF7ZAI8HkWyT7RUloDECk+q0r2lzeLQZjcsJkkDuh pWKL+o8DAcKJ40NTcEEiXmtdwxC2icm8TrNqaGk9ylm6Kkw011CWYja4fkyW/fE/ kNSeA+Mj7dt+oVJkasOnuuXDS4zAZ95quPhLwdOM93ap/HU4SwGOzDBSfTRXwp79 +gr5lDDuzmmDfKa1O535T8M9BhGewwMYODMAyldsSxNQfSuDJ8dhblggt5GcYRpD MgK0YziU8v7pBat2a3sAEQEAAYkBHwQYAQIACQUCUv6BfwIbDAAKCRBmQ4pbD+xV io25B/9Snl0WyYl3cLMqgEJ0mXxVwjdwK9BTJFkrFd8lVCTaR2061RhlzwN5iEXG Hr2YqogaMX7wrJK7p10QioSOfZtQuQwHPceHZKT/qnPJ8ssgZ6lG184quomDf6Kw ICs+Mn0HSh6CVKfU3BLP+j5dN12SnJnGRVPhynBJ1sOaj6vSEvFeQnBKHyyax1f+ opYxDoKDkcPG0/SJ6E37WIyN26Cu5uX2tXyzLV7TCS1ilsTVVP4nGSR8Am3rz/OB Bfn4Yz6e/aD3CbeVJyxTKlbAcSclFshlt0Rv3TVnQXq4yFDFoYCaaSb/bCJ8pCVC o091XhVdO4pes0RYYsltc/NQ/GC9 =TvTK -----END PGP PUBLIC KEY BLOCK----- awit-dbackup-0.0.22/debian/clean0000644000000000000000000000002112404357737015100 0ustar rootrootdebian/dbackup.8 awit-dbackup-0.0.22/debian/changelog0000644000000000000000000000022612404357737015754 0ustar rootrootawit-dbackup (0.0.22-1-1) stable; urgency=low * Updated to upstream 0.0.22-1 -- Nigel Kukard Thu, 11 Sep 2014 19:46:07 +0200 awit-dbackup-0.0.22/debian/source/0000755000000000000000000000000012404357737015402 5ustar rootrootawit-dbackup-0.0.22/debian/source/format0000644000000000000000000000001412404357737016610 0ustar rootroot3.0 (quilt) awit-dbackup-0.0.22/debian/compat0000644000000000000000000000000212404357737015300 0ustar rootroot9 awit-dbackup-0.0.22/debian/rules0000755000000000000000000000017412404357737015164 0ustar rootroot#!/usr/bin/make -f %: dh $@ override_dh_auto_build: docbook-to-man docs/dbackup.sgml > debian/dbackup.8 dh_auto_build awit-dbackup-0.0.22/debian/awit-dbackup.install0000644000000000000000000000007212404357737020044 0ustar rootroot# Main script dbackup usr/sbin # Config dbackup.conf etc awit-dbackup-0.0.22/ChangeLog0000644000000000000000000002700212404357737014433 0ustar rootrootcommit e68ad14dafe6af0c8bf59551ddc68c0f9372d781 Author: Nigel Kukard Date: Thu Sep 11 16:28:23 2014 +0000 Fixed escaping of newline \n commit 63c71b2ea15a46b204752cc314279d4e75eda2eb Author: Nigel Kukard Date: Thu Sep 11 16:24:25 2014 +0000 Don't depend on old virtual package commit 0795dfeac60314d2df9e38a44381d24f09b1a5ad Author: Nigel Kukard Date: Thu Sep 11 14:45:42 2014 +0000 Cleand up output a bit commit 473ede56e07961330547789cd039f27e40574c45 Author: Nigel Kukard Date: Thu Sep 11 14:45:29 2014 +0000 Syntax cleanup commit 04b8da4966320cc425fcda05df44ec1c3e8abe96 Author: Nigel Kukard Date: Thu Sep 11 14:33:26 2014 +0000 Improved on manpage commit d18b82094db5866ae73f1fb53baa6db2137397bd Author: Nigel Kukard Date: Thu Sep 11 08:15:30 2014 +0000 Fix download location commit 574d60e240d8cbbfabef4b7a1dc3fbe48d9235df Author: Nigel Kukard Date: Thu Sep 11 07:54:09 2014 +0000 Commented on the install of the script commit 9e16e3c034e63f8dd2f05872744aaedeef92d32d Author: Nigel Kukard Date: Thu Sep 11 07:28:28 2014 +0000 Cleaned up manpage generation commit cbf207c05f74b1babf28e6d8f37ae566f1efe953 Author: Nigel Kukard Date: Thu Sep 11 07:25:29 2014 +0000 Refined copyright tags and added upstream-contact commit f16912c4d46c22f02d5e89f491960fd800c3844b Author: Nigel Kukard Date: Thu Sep 11 07:20:04 2014 +0000 Fixed plzip and pdlzip mixup commit 60f00375c9686801262e51fc2974fc9d0bf6aacc Author: Nigel Kukard Date: Fri Jul 11 07:15:08 2014 +0000 Don't use bareword filehandles commit ebac439a558ebe2ad6ef71cd9220936224e7bc0a Author: Nigel Kukard Date: Fri Jul 11 07:09:17 2014 +0000 Cosmetic syntax fixups commit d2298f0b392e95479e0ce7a6aa7a93710239e866 Author: Nigel Kukard Date: Fri Jul 11 07:08:55 2014 +0000 Don't use bareword file handles commit 114d194d150bf8265f22c06bbe9b1e55f8347de9 Author: Nigel Kukard Date: Fri Jul 11 07:08:15 2014 +0000 Check compression program exists commit 90b994b8dba9752836d75dd685192404a0dcb09d Author: Nigel Kukard Date: Fri Jul 11 07:07:37 2014 +0000 Make sure the config file is not mandatory commit c08178a6bd75d0380a3da3c582bb1c1cc4fb7853 Author: Nigel Kukard Date: Fri Jul 11 07:06:28 2014 +0000 Added support for lzma (.lz) backup format commit ed864216beba5966e37d00e2a10fcc0fa488bde6 Author: Nigel Kukard Date: Fri Jul 11 06:27:18 2014 +0000 Code comment & whitespace cleanup commit 07c930d4d1ff74438f15c763f94b3cff2aff353e Author: Nigel Kukard Date: Wed Jun 11 09:46:19 2014 +0000 Fixed copyright, it is GPL-3+ not GPL-2+ commit 8cfb823f2367470cf7c1a3ae264af32b949b5f63 Author: Nigel Kukard Date: Wed Jun 11 09:46:00 2014 +0000 Fixed watch file commit 5b6d18cce74981bd34df8a511308fbbd357836b6 Author: Nigel Kukard Date: Mon Jun 9 14:37:56 2014 +0000 Added VCS info to control file commit da30c89f284149d365f2f532ec244f1e5ad12441 Author: Nigel Kukard Date: Mon Jun 9 14:38:20 2014 +0000 Fixed debian dependencies commit 2b5cd0e4aad955b7d6673d36abb1e1045f54350c Author: Nigel Kukard Date: Mon Jun 9 14:03:44 2014 +0000 This is the development branch commit d80f67f5aaeb92e7e85bd580a32510618105309e Author: Nigel Kukard Date: Mon Jun 9 14:02:54 2014 +0000 Added watch and upstream key commit ce6177324d61d09999b965f982824161b8d1871a Author: Nigel Kukard Date: Mon Jun 9 13:58:49 2014 +0000 Fixed up debian packaging commit 2d3d1bf1be39c832499d6544548eb1566cca87ae Author: Nigel Kukard Date: Mon Jun 9 13:53:14 2014 +0000 Updated copyright date commit 3f9fae37da186425dcf72321e85e80f1143af9ec Author: Nigel Kukard Date: Sun Feb 9 15:35:47 2014 +0000 Fixed whitespaces commit 6ae1e22622150d406f49c06174a40602b2efe8cd Author: Nigel Kukard Date: Sat Oct 26 19:34:46 2013 +0000 Bumped version commit 09b0729ac400f2b88dda613bd4459dfbeb696d33 Author: Nigel Kukard Date: Fri Sep 28 09:51:33 2012 +0000 Added debian packaging files commit eec6b0d0391aa0b9927d92072838284d91c2c663 Author: Nigel Kukard Date: Fri Sep 28 08:05:07 2012 +0000 Use default config file /etc/dbackup.conf commit 5e51cf403919c2d4cae8536ee36c7bb6e2b1bfc2 Author: Nigel Kukard Date: Fri Sep 28 07:56:46 2012 +0000 Fixed another help typo, thanks Psi-jack commit 5577f228cf118cf5ba8f2bf082408aabc2a22e33 Author: Nigel Kukard Date: Fri Sep 28 07:46:30 2012 +0000 Removed -r, only long options are supported commit 65e83b8a55dcc3e0d32ff1d4a87e4372a3d8f87a Author: Nigel Kukard Date: Fri Sep 28 07:40:35 2012 +0000 Fixed typo, thanks to Psi-jack commit 8cf0a7294924c925f630141faff4b846f2f4036a Author: Nigel Kukard Date: Tue Sep 25 12:42:25 2012 +0000 Don't exit if tar fails If we exit when tar fails we may not get to backup whats after it. commit 7cfdb436dc6bf1ace079cdadd81252699297c5f7 Author: Nigel Kukard Date: Sat Sep 15 20:00:40 2012 +0000 Added more default exclusions & fixed tar dev vers commit 1505f1b95d79f8d816a3e655b6cc34d10dad3c01 Author: Nigel Kukard Date: Sun Jun 24 17:27:28 2012 +0000 Bumped version commit a449d2ee978bbf44d7e32904c4d963d4434186d3 Author: Nigel Kukard Date: Sun Jun 24 17:25:58 2012 +0000 -b is not actually supported Thanks to Psi-Jack for picking it up commit 93f2b2e92e96f0d8f78e41e9d14335064c9b6d41 Author: Nigel Kukard Date: Thu Feb 2 20:58:03 2012 +0000 Fixed log levels in --help commit d2e63f03f6ffd194bd7028ea739cfdbdfb014734 Author: Nigel Kukard Date: Tue Jan 24 15:19:38 2012 +0000 Bump version again commit 78461c0dd9501414a537673b9a223e9b4590205c Merge: fd79e4b 72e1d5e Author: Nigel Kukard Date: Tue Jan 24 15:19:03 2012 +0000 Merge branch 'master' into v0.0.x commit 72e1d5e04b6dd0458f7dc64e2e88109573bcb24c Author: Nigel Kukard Date: Tue Jan 24 15:18:31 2012 +0000 Some more logging fixes Document version upgrades commit fd79e4b370de8b4a772c4db56f896bc0ab3d2407 Author: Nigel Kukard Date: Tue Jan 24 15:18:31 2012 +0000 Some more logging fixes Document version upgrades commit 79cf32e2d22cbe620a753e96cce4bb1b5828ec1a Merge: c091f72 fafceef Author: Nigel Kukard Date: Mon Jan 23 15:46:21 2012 +0000 Merge branch 'master' into v0.0.x commit fafceefcd166f6f90695025ad75885386ebdc251 Author: Nigel Kukard Date: Mon Jan 23 15:45:59 2012 +0000 Improve compatibility for diff versions of Config::IniFiles commit c091f72dabe3394c57081cfbffecf333885a487e Merge: 27f19e6 72ae973 Author: Nigel Kukard Date: Sun Jan 22 21:19:59 2012 +0000 Merge branch 'master' into v0.0.x commit 72ae9739e6f41283634b72c8b0651ee6f3bf7cc2 Author: Nigel Kukard Date: Sun Jan 22 21:19:31 2012 +0000 Force update on dir if its empty and we doing an upgrade commit 27f19e6f473db3be7a91844fa70db4ad010215ec Merge: 0665ee0 984e773 Author: Nigel Kukard Date: Sun Jan 22 16:02:22 2012 +0000 Merge branch 'master' into v0.0.x commit 984e773b23122ba4af87680ee26a82cba012a536 Author: Nigel Kukard Date: Sun Jan 22 16:01:27 2012 +0000 Fixed up logging a bit Added --backup-upgrade option to upgrade data commit db2eb6bc87358cbc4df2b1122649d9d8918a8096 Author: Nigel Kukard Date: Wed Jan 18 21:06:16 2012 +0000 Fixed another occurance of using %d instead of %s Fixed up messages displayed a bit commit a1585f8763e1f7bef643090346f4ced50d97e6c3 Author: Nigel Kukard Date: Wed Jan 18 20:36:27 2012 +0000 Added squid spool to exclude list Fixed bug reporting tar exit status Use lchown not chown when chowing on restore Don't chmod & utime for symlinks Fixed UNKNOWN displaying in the logs insted of ERROR commit 0665ee0857b06311537d5f46d564873ada026fe4 Merge: bd47913 422ad8a Author: Nigel Kukard Date: Fri Jan 13 10:07:00 2012 +0000 Merge branch 'master' into v0.0.x Conflicts: dbackup commit bd479137cd2d47fee502eb64156544db0bb51eed Author: Nigel Kukard Date: Fri Jan 13 10:05:58 2012 +0000 Bumped to 0.0.15 commit 422ad8a478ccb59eeca494236c0167d7290f6309 Author: Nigel Kukard Date: Thu Jan 12 22:29:33 2012 +0000 Added --tar-ignore-failed-read option Improved exclusion of directories commit 60cfdb321a6d138d765190dd89a870abad1e02e9 Author: Nigel Kukard Date: Tue Jan 10 16:00:02 2012 +0000 Adjusted version to designate we're v0.0.x commit 5d4ebc1bed31bc338d2c4e73cb9b8a0c75d95576 Author: Nigel Kukard Date: Tue Jan 10 15:56:33 2012 +0000 Added yum cache to system excludes list Updated requirements commit 94b79db6b2753bfea914bc0bdbb7afbd847c3693 Author: Nigel Kukard Date: Mon Jan 9 12:30:33 2012 +0000 Fixed manifest-format handling commit f52cc55c6c0df5704b1aa18e301df285a4c445de Author: Nigel Kukard Date: Sat Jan 7 17:32:16 2012 +0000 Added --tar to give path to tar binary commit 724de4c0a7670316250a2410bd8ad775f03c2cc3 Author: Nigel Kukard Date: Sat Jan 7 17:31:30 2012 +0000 Better support for other versions of tar commit 3253de2cc4b60d66dd90459a98cb46d8e77e8ce8 Author: Nigel Kukard Date: Fri Jan 6 12:11:43 2012 +0000 Added postfix public socket dir exclude commit a7095dde12dc96d1a368e7a41ee3dba2ee721a0b Author: Nigel Kukard Date: Fri Jan 6 05:36:53 2012 +0000 Added --exclude-fs-type to --help commit 37af5a45dd9b6fcfdfe8c3553f1eabb4db056123 Author: Nigel Kukard Date: Thu Jan 5 20:10:57 2012 +0000 Added --exclude-fs-type= support Cleaned up commandline args & config args commit 7f74758bea9eee5904bc573f410c2fa77fc1214e Author: Nigel Kukard Date: Thu Jan 5 12:52:20 2012 +0000 Added logging commit e3fd3cd1f924f2c2eb6e585914b1f45a5749d4b2 Author: Nigel Kukard Date: Wed Jan 4 13:31:17 2012 +0000 Updated config file with some more doc commit 868e1cca4b4580a372a0d738b9953d3f6a319a51 Author: Nigel Kukard Date: Wed Jan 4 13:30:51 2012 +0000 Various commandline updates and fixes,check --help commit 986da204d1fa791bf8e1627dabbfc8a6972016fd Author: Nigel Kukard Date: Tue Jan 3 21:19:16 2012 +0000 Added --config arg to help commit 42767794dc27af398cf06d6b27ce5d2f47124394 Author: Nigel Kukard Date: Tue Jan 3 12:52:02 2012 +0000 Added --exclude-* options and configuration file commit 53530daba441a34d52f9673875884afae081f550 Author: Nigel Kukard Date: Tue Jan 3 09:05:06 2012 +0000 Fixed license, this software is GPLv3 not v2 commit a195617939fc3114061eff6c91bf427f1a038765 Author: Nigel Kukard Date: Tue Jan 3 08:55:22 2012 +0000 Initial import