debian/0000755000000000000000000000000011746565453007206 5ustar debian/compat0000644000000000000000000000000211641666356010402 0ustar 8 debian/docs0000644000000000000000000000004711371242402010036 0ustar README first-time.conf debian/examples debian/manpages0000644000000000000000000000001311311763672010705 0ustar backup2l.8 debian/README.Debian0000644000000000000000000000222011371245674011235 0ustar backup2l for Debian ------------------- * Configuration * After installation of this package you find the default configuration file in /etc/backup2l.conf. Please configure in this file following options to custom values: - SRCLIST: all directories for backup - BACKUP_DEV: for the backup media, only if it must be mounted - BACKUP_DIR: the backup directory, that must be exist! - UNCONFIGURED: remove this line, if all is configured! Optional these options can be set in /etc/backup2l.conf: - CREATE_DRIVER Selected driver for backup (one of the builtin or custom driver) - USER_DRIVER_LIST List of custom drivers for using in CREATE_DRIVER * Cron job * The "zz-" prefix of the cron job file (zz-backup2l) causes the backup job to be the last one executed, so that other jobs are not delayed. * Unofficial code * You can find unofficial code inside /usr/share/doc/backup2l/examples: - driver_atime_preserve_code.txt to resolve problems with mutt - driver_my-tar-lz_code.txt to add support for lmza -- Joachim Wiedorn Sat, 08 May 2010 13:31:15 +0200 debian/rules0000755000000000000000000000032211560760032010243 0ustar #!/usr/bin/make -f # -*- makefile -*- # path to the basic package BASE:=$(CURDIR)/debian/backup2l %: dh $@ override_dh_install: dh_install mv $(BASE)/etc/first-time.conf \ $(BASE)/etc/backup2l.conf debian/watch0000644000000000000000000000016011371225031010207 0ustar # watch control file for uscan for the backup2l package version=3 http://sf.net/backup2l/backup2l_(.+)\.tar\.gz debian/examples/0000755000000000000000000000000011560753320011006 5ustar debian/examples/driver_my-tar-lz_code.txt0000644000000000000000000000230411560744411015750 0ustar # Submitted by: Amedee Van Gasse (2009-10-16 15:25) # # I would like to donate a .tar.lz driver that I have written for myself. # It uses lzip, which uses LZMA compression. LZMA compresses better than # bzip2, but at the expense of more memory usage. # # Please test it and let me know what can be improved. # This driver uses tar and LZMA (lzip) compression. LZMA compresses better than # bzip2, but at the expense of more memory usage. (donated by Amedee Van Gasse) DRIVER_MY_TAR_LZ () { case $1 in -test) require_tools tar lzip echo "ok" ;; -suffix) echo "tar.lz" ;; -create) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file tar -c -T $4 --no-recursion | lzip --best -c > $3 2>&1 \ | grep -v 'tar: Removing leading .* from .*' ;; -toc) # Arguments: $2 = BID, $3 = archive file name lzip -d $3 -c | tar t | sed 's#^#/#' ;; -extract) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file lzip -d $3 -c | tar -x --same-permission --same-owner -T $4 2>&1 ;; esac } debian/examples/driver_atime-preserve_code.txt0000644000000000000000000000507411560744430017054 0ustar # Submitted by: Adrian Bunk (2006-02-07 17:41) # # It was a bit annoying that mutt was no longer able to figure out # which folders contained new emails after a backup run. This patch # fixes this by adding --atime-preserve to invocations of tar. # default tar driver, but with --atime-preserve DRIVER_ATIME_TAR () { case $1 in -test) require_tools tar echo "ok" ;; -suffix) echo "tar" ;; -create) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file tar cf $3 -T $4 --numeric-owner --no-recursion --atime-preserve 2>&1 \ | grep -v 'tar: Removing leading .* from .* names' ;; -toc) # Arguments: $2 = BID, $3 = archive file name tar tf $3 | sed 's#^#/#' ;; -extract) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file tar x --same-permission --same-owner --numeric-owner -f $3 -T $4 2>&1 ;; esac } # default tar.gz driver, but with --atime-preserve DRIVER_ATIME_TAR_GZ () { case $1 in -test) require_tools tar echo "ok" ;; -suffix) echo "tar.gz" ;; -create) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file tar czf $3 -T $4 --no-recursion --atime-preserve 2>&1 \ | grep -v 'tar: Removing leading .* from .* names' ;; -toc) # Arguments: $2 = BID, $3 = archive file name tar tzf $3 | sed 's#^#/#' ;; -extract) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file tar zx --same-permission --same-owner -f $3 -T $4 2>&1 ;; esac } # default tar.bz2 driver, but with --atime-preserve DRIVER_ATIME_TAR_BZ2 () { case $1 in -test) require_tools tar bzip2 echo "ok" ;; -suffix) echo "tar.bz2" ;; -create) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file tar cjf $3 -T $4 --no-recursion --atime-preserve 2>&1 \ | grep -v 'tar: Removing leading .* from .* names' ;; -toc) # Arguments: $2 = BID, $3 = archive file name tar tjf $3 | sed 's#^#/#' ;; -extract) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file tar jx --same-permission --same-owner -f $3 -T $4 2>&1 ;; esac } debian/examples/driver_tar-gz-rsyncable.txt0000644000000000000000000000070111560744403016306 0ustar # Submitted by: Jason D. Hildebrand (2011-01-06 20:24) # # When the initial backup (all.1.tar.gz) is re-created (for me about # 20G) the transfer takes several days. If backup2l could create the # tar.gz files using gzip's --rsyncable option, then this would speed # things up substantially. # simple wrapper around the existing DRIVER_TAR_GZ using --rsyncable DRIVER_TAR_GZ_RSYNCABLE () { export GZIP="--rsyncable" DRIVER_TAR_GZ "$@" } debian/examples/driver_my-tar-xz_code.txt0000644000000000000000000000177411560753277016010 0ustar # Submitted by: Joachim Wiedorn (2011-02-20) # example driver with modern xz compression. Please note, that # the xz driver have quality 1...9, but only the first one should # be used with backup2l (1, 2 or 3) because higher qualities are # too slow for using for backup (Default quality of xz is "6"). # Use tar with the new driver XZ, here with the faster quality "3" DRIVER_MY_TAR_XZ () { case $1 in -test) require_tools tar xz-utils echo "ok" ;; -suffix) echo "tar.xz" ;; -create) # Arguments: $2 = BID, $3 = archive file, $4 = filelist file tar -c -T $4 --no-recursion | xz -z -3 > $3 2>&1 ;; -toc) # Arguments: $2 = BID, $3 = archive file tar -tJf $3 | sed 's#^#/#' ;; -extract) # Arguments: $2 = BID, $3 = archive file, $4 = filelist file tar -xJ --same-permission --same-owner -f $3 -T $4 2>&1 ;; esac } debian/patches/0000755000000000000000000000000011746565416010634 5ustar debian/patches/01_show-builtin-driver.patch0000644000000000000000000000163411560736266016073 0ustar Package: backup2l Subject: list builtin driver in config; move to example DRIVER_TAR_BZ2 Author: Joachim Wiedorn Forwarded: not needed Last-Update: 2011-05-06 List all existing built-in driver in config file. Move to 'DRIVER_TAR_BZ2' as example driver, because afio is not available for Debian anymore. --- diff -urN s00/first-time.conf s01/first-time.conf --- s00/first-time.conf 2009-12-13 20:10:28.000000000 +0100 +++ s01/first-time.conf 2011-05-06 11:13:36.743367683 +0200 @@ -122,8 +122,11 @@ # Remove this line after the setup is finished. UNCONFIGURED=1 -# Archive driver for new backups (optional, default = "DRIVER_TAR_GZ") -# CREATE_DRIVER="DRIVER_MY_AFIOZ" +# Archive driver for new backups (default = "DRIVER_TAR_GZ") +#CREATE_DRIVER="DRIVER_TAR_BZ2" + +# Usable built-in drivers for CREATE_DRIVER: +# DRIVER_TAR, DRIVER_TAR_GZ, DRIVER_TAR_BZ2, DRIVER_AFIOZ debian/patches/02_show-custom-driver.patch0000644000000000000000000000141611560737555015740 0ustar Package: backup2l Subject: show custom driver in config Author: Joachim Wiedorn Forwarded: not needed Last-Update: 2011-05-06 Give a better example for USER_DRIVER_LIST. --- diff -urN s01/first-time.conf s02/first-time.conf --- s01/first-time.conf 2011-05-06 11:13:36.743367683 +0200 +++ s02/first-time.conf 2011-05-06 11:28:25.072018232 +0200 @@ -142,7 +142,8 @@ # If you do not want to write your own archive driver, you can remove the remainder of this file. -# USER_DRIVER_LIST="DRIVER_MY_AFIOZ" # uncomment to register the driver(s) below (optional) +# registering custom drivers below for use as CREATE_DRIVER (optional) +#USER_DRIVER_LIST="DRIVER_MY_AFIOZ DRIVER_MY_AFIOBZ2 DRIVER_GZ_SPLIT DRIVER_ZIP" DRIVER_MY_AFIOZ () { debian/patches/03_optimize-manpage.patch0000644000000000000000000004624111560757350015426 0ustar Package: backup2l Subject: patch and optimize manpage Author: Joachim Wiedorn Forwarded: no Last-Update: 2011-05-06 Optimize and patch old manpage syntax. --- diff -urN s02/backup2l.8 s03/backup2l.8 --- s02/backup2l.8 2009-12-13 18:39:09.000000000 +0100 +++ s03/backup2l.8 2011-05-06 13:42:13.382968617 +0200 @@ -1,14 +1,14 @@ -.TH BACKUP2L 8 "Dec 2009" "backup2l v1.5" +.TH "BACKUP2L" "8" "December 13, 2009" "backup2l v1.5" .SH NAME -backup2l \- low-maintenance backup/restore tool +backup2l \- low\-maintenance backup/restore tool .SH SYNOPSIS .B backup2l [ -.BI "-c " conffile +.BI "\-c " conffile ] [ -.BI "-t " "backup-ID" +.BI "\-t " "backup\-ID" ] .I command @@ -18,120 +18,120 @@ It features differential backups at multiple hierarchical levels and provides rollback functionality. All control files are stored together with the archives on the backup device, and their contents are -mostly self-explaining. Hence, in the case of an emergency, a user does not only have to rely on the -restore functionality of \fBbackup2l\fP, but can - if necessary - browse the files and extract +mostly self\-explaining. Hence, in the case of an emergency, a user does not only have to rely on the +restore functionality of \fBbackup2l\fP, but can \- if necessary \- browse the files and extract archives manually. -An open driver architecture allows to use virtually any archiving program as a backend. -Built-in drivers support \fB.tar.gz\fP, \fB.tar.bz2\fP, or \fB.afioz\fP files. Further drivers can be +An open driver architecture allows one to use virtually any archiving program as a backend. +Built\-in drivers support \fB.tar.gz\fP, \fB.tar.bz2\fP, or \fB.afioz\fP files. Further drivers can be added by the user. When restoring data, an appropriate driver is selected automatically for each archive depending on the suffix of the archive file. The method of hierarchical differential backups is a generalization to the concept of the "daily", "weekly" and "monthly" backups. -Each backup has a level and a serial number. Maximum-level backups are comparable with -daily differential backups, level-0 backups are full backups. For example, let \fBMAX_LEVEL\fP be 4 -and \fBMAX_PER_LEVEL\fP be 5. After 5 level-4 backups (e. g. after 5 days), a new level-3 backup is made. -After 5 level-3 backups (and 5*5 at level-4), a new level-2 backup is made, and so on. +Each backup has a level and a serial number. Maximum\-level backups are comparable with +daily differential backups, level\-0 backups are full backups. For example, let \fBMAX_LEVEL\fP be 4 +and \fBMAX_PER_LEVEL\fP be 5. After 5 level\-4 backups (e. g. after 5 days), a new level\-3 backup is made. +After 5 level\-3 backups (and 5*5 at level\-4), a new level\-2 backup is made, and so on. Each differential backup contains the changes towards the previous backup of the same or a lower level. -This scheme allows to efficiently generate small incremental backups at short intervals. +This scheme allows one to efficiently generate small incremental backups at short intervals. At the same time, the total number of archives that have to be stored (or processed in the case of a restore) -only increases logarithmically with the number of backups since the last full backup. Time-consuming +only increases logarithmically with the number of backups since the last full backup. Time\-consuming full backups are only sparsely needed. In the example above, a new full backup is only necessary after 780 (=5^4+5^3+5*5+5) days, while only at most 20 (=4*5) archives have to be processed. For \fBbackup2l\fP, each backup archive is identified by its \fBbackup ID (BID)\fP. The number of digits -determines the level. Level-0 (full) backups have a 1-digit BID, level-n backups have a BID of n+1 digits. -The last digit is a serial number, the prefix identifies the lower-level backups on which a given backup +determines the level. Level\-0 (full) backups have a 1\-digit BID, level\-n backups have a BID of n+1 digits. +The last digit is a serial number, the prefix identifies the lower\-level backups on which a given backup is based on. For example, the archive 235 contains the differences towards archive 234, and to restore -the file system state of the time it was generated, the full backup 2, the level-1 backups 21, 22, 23 -and the level-2 backups 231, ..., 235 have to be processed. +the file system state of the time it was generated, the full backup 2, the level\-1 backups 21, 22, 23 +and the level\-2 backups 231, ..., 235 have to be processed. All serial numbers are between 1 and 9, a zero in the BID indicates that no archive of the respective level -is contained in the chain. For example, the level-3 backup 1201 is immediately based on the level-1 +is contained in the chain. For example, the level\-3 backup 1201 is immediately based on the level\-1 backup 12. For deciding whether a file is new or modified, \fBbackup2l\fP looks at its name, modification time, size, -ownership and permissions. Unlike other backup tools, the i-node is not considered in order to avoid problems with -non-Unix file systems like FAT32. +ownership and permissions. Unlike other backup tools, the i\-node is not considered in order to avoid problems with +non\-Unix file systems like FAT32. .SH OPTIONS .TP -.BI "\-c, --conf " conffile +.BI "\-c, \-\-conf " conffile This argument specifies the configuration file (default: \fBetc/backup2l.conf\fP). .TP -.BI "\-t, --time " "BID" -If present, this option selects a certain backup for the \fB--locate\fP and \fB--restore\fP commands. +.BI "\-t, \-\-time " "BID" +If present, this option selects a certain backup for the \fB\-\-locate\fP and \fB\-\-restore\fP commands. E. g., the latter will restore files and directories exactly as they were on the system at the time when the specified backup was made. If not present, the latest available backup is selected. .SH COMMANDS .TP -.BI "\-h, --help" +.BI "\-h, \-\-help" Display the usage info. .TP -.BI "\-e, --estimate " "\fR[\fP level \fR]\fP" +.BI "\-e, \-\-estimate " "\fR[\fP level \fR]\fP" Prints the number of files, estimated amount of data and other information on the backup that would be generated next. No backup archives are actually created or removed. If specified, the parameter \fBlevel\fP overrides the \fBMAX_LEVEL\fP setting. .TP -.BI "\-b, --backup " "\fR[\fP level \fR]\fP" +.BI "\-b, \-\-backup " "\fR[\fP level \fR]\fP" Creates a new backup and removes old archives based on the given configuration file. If specified, the parameter \fBlevel\fP overrides the \fBMAX_LEVEL\fP setting. This is useful e. g. shortly before or after major changes are performed with the file system. In this case, a lower level should be specified in order to avoid that a large number of files are backed up multiple times again. .TP -.BI "\-s, --get-summary" +.BI "\-s, \-\-get\-summary" Shows a table describing each backup (date, size, files, ...) and the file system usage of the backup device. .TP -.BI "\-a, --get-available " "\fR[\fP pattern list \fR]\fP" +.BI "\-a, \-\-get\-available " "\fR[\fP pattern list \fR]\fP" Shows all files removed and added for all backups. A '+' in the output indicates that the file is new and -thus contained in the archive file. A '-' indicates that the file has been removed (or replaced). +thus contained in the archive file. A '\-' indicates that the file has been removed (or replaced). If one or several patterns are supplied, \fBgrep(1)\fP is used to filter the list. All status messages go to \fBstderr\fP, so that the generated file list can easily be redirected. \fBNote:\fP The search pattern is not just applied to the file names, but to the whole entry in the \fB.list.gz\fP file. This allows you to not only search for file names but also for other attributes like -ownership, modification time etc. . In order to apply a search pattern to file names only, preceed it by +ownership, modification time etc. . In order to apply a search pattern to file names only, precede it by "/.*". .TP -.BI "\-l, --locate " "\fR[\fP pattern list \fR]\fP" +.BI "\-l, \-\-locate " "\fR[\fP pattern list \fR]\fP" Shows most recent backup location for active files. If one or several patterns are supplied, \fBgrep(1)\fP -is used to filter the list in the same way as for \fB--get-available\fP (see above) . All status messages +is used to filter the list in the same way as for \fB\-\-get\-available\fP (see above) . All status messages go to \fBstderr\fP, so that the generated file list can easily be redirected. Active files are files that have been on the system at the time of the selected backup, which is either -the latest backup or the one specified by \fB--time\fP (see above). Files that were removed at that time +the latest backup or the one specified by \fB\-\-time\fP (see above). Files that were removed at that time but are still stored in some later archive will not be shown. Altogether, this command tells you, which files have to be extracted from which archive in order to restore the state of the system at the time of the selected backup. .TP -.BI "\-r, --restore " "\fR[\fP pattern list \fR]\fP" -Performs the same steps like \fB--locate\fP and then restores the respective files. All files are restored +.BI "\-r, \-\-restore " "\fR[\fP pattern list \fR]\fP" +Performs the same steps like \fB\-\-locate\fP and then restores the respective files. All files are restored relative to the current directory. They can be restored to their original location by cd'ing into / before, but this is not recommended. .TP -.BI "\-p, --purge " "BID list" +.BI "\-p, \-\-purge " "BID list" Removes the specified backup archive(s) and all depending backups. .TP -.BI "\-m, --make-check " "\fR[\fP BID list \fR]\fP" +.BI "\-m, \-\-make\-check " "\fR[\fP BID list \fR]\fP" Creates (a) check file(s) for the specified archive(s) using \fBmd5sum(1)\fP. If no BID is specified, check files are created wherever missing. .TP -.BI "\-v, --verify " "\fR[\fP BID list \fR]\fP" +.BI "\-v, \-\-verify " "\fR[\fP BID list \fR]\fP" Verifies the specified backup archive(s). If no BID is specified, all existing archives are checked. If a check file exists, this allows a comprehensive test including e. g. media failures. If the check file is missing, only the existence of all files and the immediate base archive are verified. .TP -.BI "\-x, --extract " "capacity max-free BID-list" +.BI "\-x, \-\-extract " "capacity max\-free BID\-list" Split and collect files to be stored on removable media (e. g. CDs). \fBcapacity\fP is the medium -capacity in MB. \fBmax-free\fP is the maximum amount of empty space on each medium (except for the last -one, of course). \fBBID-list\fP specifies the archives and may contain wildcards, e. g.: 1 '2*'. +capacity in MB. \fBmax\-free\fP is the maximum amount of empty space on each medium (except for the last +one, of course). \fBBID\-list\fP specifies the archives and may contain wildcards, e. g.: 1 '2*'. The operation generates enumbered subdirectories representing the media contents. Some more files are generated that may be useful, e. g. to print labels. -While guaranteeing a minimum waste of \fBmax-free\fP MB per medium, the collection procedure preserves +While guaranteeing a minimum waste of \fBmax\-free\fP MB per medium, the collection procedure preserves the ordering of files and keeps all control files of an archive always together on the same medium. Large archive files are split into multiple files with serial numbers appended to their names. @@ -147,9 +147,9 @@ future versions can automatically print a warning if the syntax has changed. .TP .BI "SRCLIST=(" " source list " ")" -This is a blank-separated list of all top-level directories to make backups of. +This is a blank\-separated list of all top\-level directories to make backups of. Directory names with spaces have to be quoted, e. g.: SRCLIST=("/my dir" /another/dir). -The last elements of the list may be options for \fBfind(1)\fP, for example \fB-xdev\fP in +The last elements of the list may be options for \fBfind(1)\fP, for example \fB\-xdev\fP in order to skip subdirs on other file systems like /dev or /proc. .TP .BI "SKIPCOND=(" " find condition " ")" @@ -157,7 +157,7 @@ See \fBfind(1)\fP for information on how to formulate possible conditions. Special characters ("(", ")", "!", ...) must be quoted by a leading backslash ("\\(", "\\)", " \\!", ...). An empty condition (i. e. if you do not want -any files to be skipped) must be specified as "( -false )". +any files to be skipped) must be specified as "( \-false )". .TP .BI "[ BACKUP_DEV=""" "mount_point" """ ]" If defined, \fBbackup2l\fP mounts the backup device before any operation. @@ -181,11 +181,11 @@ Number of full backups kept. Possible values are 1..8. .TP .BI "GENERATIONS=" "generations" -Number of backup generations to keep for each non-zero level. Old backups are automatically removed +Number of backup generations to keep for each non\-zero level. Old backups are automatically removed as long as at least \fBGENERATIONS * MAX_PER_LEVEL\fP backups for the respective level remain. For example, with \fBMAX_LEVEL=3, MAX_PER_LEVEL=5, GENERATIONS=2\fP it is always possible to access -the last 10 level-3 (e. g. daily) backups, the last 10 level-2 backups (e. g. 5, 10, 15, ..., 50 days old), +the last 10 level\-3 (e. g. daily) backups, the last 10 level\-2 backups (e. g. 5, 10, 15, ..., 50 days old), and so on. .TP .BI "PRE_BACKUP () { " "do something" " }" @@ -197,26 +197,25 @@ e. g. database or mail services which may frequently alter some files that have to be backed up. .TP .BI "[ AUTORUN=1 ]" -If set to 1, \fBbackup2l\fP performs the \fB--backup\fP operation when invoked without arguments. +If set to 1, \fBbackup2l\fP performs the \fB\-\-backup\fP operation when invoked without arguments. Otherwise, the usage information is shown. .TP .BI "[ SIZE_UNITS= " "B | K | M | G" " ]" Sets the units for archive sizes in summary listings to bytes, KB, MB, or GB. -If unset, a user-readable format is chosen automatically. If set, the units are the same for the whole table, -which may be even more user-friendly. +If unset, a user\-readable format is chosen automatically. If set, the units are the same for the whole table, +which may be even more user\-friendly. .TP .BI "[ CREATE_DRIVER=""" "archive driver" """ ]" Selects an archive driver for creating backups. An archive driver is responsible for managing backup -files. If unset, the default driver "DRIVER_TAR_GZ" is used. The \fB--help\fP operation lists all +files. If unset, the default driver "DRIVER_TAR_GZ" is used. The \fB\-\-help\fP operation lists all available drivers. More drivers can be defined in the configuration file (see below). .TP -.BI "[ USER_DRIVER_LIST=""" "user-defined drivers" """ ]" -Declares additional, user-defined archive drivers which are implemented in the configuration file. +.BI "[ USER_DRIVER_LIST=""" "user\-defined drivers" """ ]" +Declares additional, user\-defined archive drivers which are implemented in the configuration file. The sample configuration file contains a commented example. Read it in order to learn how to implement your own driver. .SH FILES - .TP .B /etc/backup2l.conf Configuration file. @@ -225,7 +224,7 @@ Archive files. .TP .IB "VOLNAME" "." "BID" ".list.gz" -List of all active files when the backup was made. Each file is preceeded with its size, +List of all active files when the backup was made. Each file is preceded with its size, modification time, and other information. .TP .IB "VOLNAME" "." "BID" ".new.gz" @@ -240,21 +239,21 @@ .TP .IB "VOLNAME" "." "BID" ".error.gz" This file is generated by comparing the \fB.new.gz\fP file with the actual archive -contents using \fBdiff(1)\fP. If the error file is non-empty, something may have gone wrong. +contents using \fBdiff(1)\fP. If the error file is non\-empty, something may have gone wrong. .TP .IB "VOLNAME" "." "BID" ".check" MD5 check sums of all files of the present archive and the \fB.list.gz\fP file of the base archive. -This file is optional and may be used by the \fB--verify\fP operation. +This file is optional and may be used by the \fB\-\-verify\fP operation. .SH INVOCATION BY CRON \fBbackup2l\fP is designed to be run autonomously as a cron job. If the variable \fBAUTORUN\fP is set, it generates a backup if invoked without any parameters, and you can simply create a symlink, e. g. by: .ce -ln -s `which backup2l` /etc/cron.daily/zz-backup2l +ln \-s `which backup2l` /etc/cron.daily/zz\-backup2l -The "zz-" prefix causes the backup job to be the last one executed, so that other jobs are not delayed -if the backup takes somewhat longer. The status output is e-mailed to root by the cron daemon. +The "zz\-" prefix causes the backup job to be the last one executed, so that other jobs are not delayed +if the backup takes somewhat longer. The status output is e\-mailed to root by the cron daemon. .SH MANIPULATING FILES AND CONFIGURATIONS \fBbackup2l\fP has been designed to be robust with respect to errors and configuration changes. @@ -266,20 +265,25 @@ In order to save disk space, e. g. after some archives have been copied to external media, archive files (.tar.gz or .afioz, for example) can safely be removed from the backup directory. As long as all control files are kept, \fBbackup2l\fP retains full functionality as far as possible. -The \fB--restore\fP command prompts for eventually missing archive files for the respective request -(and only those). The \fB--extract\fP command completely ignores all backups with missing archive files. +The \fB\-\-restore\fP command prompts for eventually missing archive files for the respective request +(and only those). The \fB\-\-extract\fP command completely ignores all backups with missing archive files. The configuration, especially the settings for \fBMAX_LEVEL\fP, \fBMAX_PER_LEVEL\fP, \fBMAX_FULL\fP and the specification of source files, can be arbitrarily changed without having to expect data corruption. \fBbackup2l\fP will gracefully adapt the new settings during the next run. -.SH COPYRIGHT -Copyright (c) 2001-2004 by Gundolf Kiefer. +.SH BUGS +After a restore operation, the modification time of directories is equal +to the restoration time while for files it is equal to the original modification +time. + +.SH AUTHOR +\fBbackup2l\fP was written by Gundolf Kiefer . 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 2 of the License, +by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -287,18 +291,5 @@ 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, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, -MA 02111-1307 USA. - -.SH BUGS -After a restore operation, the modification time of directories is equal -to the restoration time while for files it is equal to the original modification -time. - .SH SEE ALSO .BR "tar(1), afio(1), find(1), grep(1), md5sum(1)" - -.SH AUTHOR -Gundolf Kiefer debian/patches/04_no-verbose-for-md5sum.patch0000644000000000000000000000145211560740475016227 0ustar Package: backup2l Subject: no verbose available for newer md5sum Author: Joachim Wiedorn Forwarded: yes Last-Update: 2011-05-06 The verbose mode (-v) is no more available for md5sum, which is part of coreutils. --- diff -urN s03/backup2l s04/backup2l --- s03/backup2l 2009-12-13 20:13:35.000000000 +0100 +++ s04/backup2l 2011-05-06 11:33:53.292298557 +0200 @@ -1151,7 +1151,7 @@ echo "echo \"This script has been auto-generated by backup2l v$VER.\"" >> $DST_FILE echo "echo \"Verifying file(s) using md5sum(1)...\"" >> $DST_FILE echo >> $DST_FILE - echo "md5sum -v -c << EOF" >> $DST_FILE + echo "md5sum -c << EOF" >> $DST_FILE md5sum $FILES >> $DST_FILE echo "EOF" >> $DST_FILE debian/patches/05_add-upstream-changelog.patch0000644000000000000000000001146111560741137016465 0ustar Package: backup2l Subject: add upstream changelog Author: Joachim Wiedorn Forwarded: no Last-Update: 2011-05-06 Add original changelog file founded in the upstream debian directory. --- diff -urN s04/ChangeLog s05/ChangeLog --- s04/ChangeLog 1970-01-01 01:00:00.000000000 +0100 +++ s05/ChangeLog 2009-12-15 20:47:06.000000000 +0100 @@ -0,0 +1,107 @@ +backup2l (1.5) unstable; urgency=low + * Add self-test script to each external volume + * changed FORMAT to truncate fractional parts from time stamps in .list.gz files + (needed for Debian 5.0/Lenny) + * backup2l.conf: added some comments on how to use SKIPCOND for certain features + * fixed false errors with special characters, closes #291423, #305792 + * changed chown invocation ("g:u" instead of "g.u") + + -- Gundolf Kiefer Tue, 13 Dec 2009 20:13:05 +0100 + +backup2l (1.4) unstable; urgency=low + * Misc. adaptions to allow directory structures as archives + * first-time.conf: added section with donated sample drivers + * DRIVER_AFIOZ: accesses archives only via stdin/stdout to allow files > 2GB + * Improved POSIX compliance, closes #261950 + * Improved support for complex SKIPCOND settings including "(", ")", "!" + * Fixed restore of files with glob(7) control characters, closes #235249 + * misc. typos in doc, closes #250672, #250671 + * adopted documentation to correctly state that MAX_FULL must be <= 8, closes #233962 + * some adaptions to Mac OS X with the help of Joe Auricchio + * turned SED_* macros into FILTER_* to allow alternative filter program instead of sed + * install-sh: autodetects cron/daily directory (compatibility with Mac OS X) + * install-sh: fixed error in usage () + + -- Gundolf Kiefer Tue, 4 Jan 2005 16:10:05 +0100 + +backup2l (1.3) unstable; urgency=low + * Removed "--same-order" option in tar-based drivers (fixes problems during restore) + * Improved checking of required drivers before starting a restore operation + * Fixed some typos in comments and documentation + * Set Debian standards version to 3.6.1 + + -- Gundolf Kiefer Wed, 8 Oct 2003 19:22:00 +0200 + +backup2l (1.2) unstable; urgency=low + * Fixed false alarms with special characters in file names (closes #763710, #587658) + * Added DRIVER_TAR (Philippe "BooK" Bruhat) + * Moved Debian adaptions by Chris Davis upstream + * Set Debian standards version to 3.6.0 + + -- Gundolf Kiefer Mon, 2 Sep 2003 20:47:17 +0200 + +backup2l (1.1-gk.1.1) unstable; urgency=low + * Initial upload into Debian (closes: 142857) + * Remove unnecessary postinst + + -- Chris G. Davis Fri, 25 Jul 2003 15:10:34 -0400 + +backup2l (1.1-gk.1) unstable; urgency=low + * New: open driver architecture for different archive formats + * fixed bugs with regexps for --restore, --locate, --get-available + + -- Gundolf Kiefer Sun, 18 May 2003 12:16:07 +0200 + +backup2l (1.01-gk.1) unstable; urgency=low + * fixed incorrect backup list sorting (bug #637066) + * removed "bc" usage + * stricter filter macros for SED_NAME, SED_CHOWN, SED_CHMOD (should fix various bugs + including patch 702979 from Gene Skonicki) + * human readable sizes (based on patch by Jarno Elonen) + * allow wildcards in argument of ANY operation + * support for filesystems not allowing symlinks (patch by Jason Creighton) + + -- Gundolf Kiefer Sun, 9 Apr 2003 12:59:00 +0200 + +backup2l (1.00-gk.1) unstable; urgency=low + * Fixed problem with special characters in file names (bug #587658) + * .tar.gz files can savely be removed + * Various fixes/patches + + -- Gundolf Kiefer Sun, 8 Sep 2002 17:30:00 +0200 + +backup2l (0.93-gk.1) unstable; urgency=low + + * Changed: diff is invoked without '-d' (performance issue with large numbers of files) + * New: POST_BACKUP + * Fixed: compatibility with pre-0.9 .list files + * Various fixes/patches + + -- Gundolf Kiefer Thu, 9 Mar 2002 15:26:00 +0100 + +backup2l (0.92-gk.1) unstable; urgency=low + + * Fixed: incorrectly determined base archive resulting in full backup instead of incremental + + -- Gundolf Kiefer Thu, 17 Jan 2002 11:11:01 +0100 + +backup2l (0.91-gk.1) unstable; urgency=low + + * New: command to generate CD-ready data directories + * Time in summary display + * Workaround for bug in find 4.1.7 (no leading 0's in printf if requested) + * Use of shell arrays for SRCLIST + * Fixed problems with spaces in file names + * Minor bugfixes + + -- Gundolf Kiefer Tue, 6 Nov 2001 09:32:13 +0100 + +backup2l (0.9-gk.1) unstable; urgency=low + + * Initial release + + -- Gundolf Kiefer Mon, 29 Oct 2001 14:58:47 +0100 + +Local variables: +mode: debian-changelog +End: debian/patches/06_fix-in-renamed-backups.patch0000644000000000000000000000207011746564641016411 0ustar Package: backup2l Subject: fix verify failure in renamed backups Author: Joachim Wiedorn Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/backup2l/+bug/934203 Forwarded: no Last-Update: 2012-04-27 The md5sum check fails because the filenames in the older .check files are not updated properly when the full backup versions are renamed. The filenames in the .check file are prepended by ./ while the sed command in backup2l looks for a leading space. --- diff -urN s05/backup2l s06/backup2l --- s05/backup2l 2012-04-27 16:15:33.880477880 +0200 +++ s06/backup2l 2012-04-27 20:45:23.736469131 +0200 @@ -404,7 +404,8 @@ fi done for CHK in $VOLNAME.$DST*.check ; do - sed "s/ $VOLNAME.$SRC/ $VOLNAME.$DST/" < $CHK > $TMP.check + cat $CHK | sed "s/ \.\/$VOLNAME.$SRC/ \.\/$VOLNAME.$DST/" |\ + sed "s/ $VOLNAME.$SRC/ $VOLNAME.$DST/" > $TMP.check mv $TMP.check $CHK done fi debian/patches/07_fix-driver-tar-gpg.patch0000644000000000000000000000335411746564766015615 0ustar Package: backup2l Subject: fix parameter in DRIVER_TAR_GPG Author: Holger Segnitz Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665429 Forwarded: no Last-Update: 2012-04-27 Restore with DRIVER_TAR_GPG gives some troubles: - a full restore (backup2l -r) creates all files as empty directories inside the restore directory - trying to restore files with a search pattern (backup2l -r ) tells the user, the files cannot be found in any archive. I could identify the parameter "-f $3" in the tar command to be causing the problem. Removing it fixes the problem. --- diff -urN s06/first-time.conf s07/first-time.conf --- s06/first-time.conf 2012-04-27 16:15:30.740473162 +0200 +++ s07/first-time.conf 2012-04-27 16:28:14.532479192 +0200 @@ -320,7 +320,7 @@ } -# This driver uses tar and pipes the output trough gnupg. You can specifiy +# This driver uses tar and pipes the output through gnupg. You can specifiy # the passphrase in a file (/etc/backup2l.pass in the example). You have to # invoke gpg at least one time before backup because gnupg has to initiate # first thing in the home directory. @@ -341,7 +341,7 @@ /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3/dev/null | tar t | sed 's#^#/#' ;; -extract) # Arguments: $2 = BID, $3 = archive file name, $4 = file list file - /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3/dev/null | tar -x --same-permission --same-owner -f $3 -T $4 2>&1 + /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3/dev/null | tar -x --same-permission --same-owner -T $4 2>&1 ;; esac } debian/patches/08_fix-mask-list.patch0000644000000000000000000000242311746565176014660 0ustar Package: backup2l Subject: fix problem with MASK_LIST in 'for' loops Author: Joachim Wiedorn Origin: upstream, http://sourceforge.net/projects/backup2l/forums/forum/121200/topic/4708938 Forwarded: no Last-Update: 2012-04-27 In some cases this invocation does not work as expected: backup2l -l /var/log/mail.log /var/log/auth.log /var/log/user.log The lists of for loops should not be inside quotation mark. --- diff -urN s07/backup2l s08/backup2l --- s07/backup2l 2012-04-27 20:45:23.736469131 +0200 +++ s08/backup2l 2012-04-27 20:47:44.556468562 +0200 @@ -823,7 +823,7 @@ while [[ ${#FBID} -lt 5 ]]; do FBID=$FBID" " done - for X in "$MASK"; do + for X in $MASK; do gunzip -c $VOLNAME.$BID.obsolete.gz | grep "$X" | sed "s/^/$VOLNAME.$FBID - /" gunzip -c $VOLNAME.$BID.new.gz | grep "$X" | sed "s/^/$VOLNAME.$FBID + /" done @@ -862,7 +862,7 @@ fi # determine active files... - for MASK in "$MASK_LIST"; do + for MASK in $MASK_LIST; do gunzip -c $VOLNAME.$BID.list.gz | grep "$MASK" | tee $TMP.found | grep '/$' >> $TMP.dirs # dirs go to $TMP.dirs WITH attributes grep -v '/$' $TMP.found | eval "$FILTER_NAME" >> $TMP.left debian/patches/series0000644000000000000000000000034511746565254012053 0ustar 01_show-builtin-driver.patch 02_show-custom-driver.patch 03_optimize-manpage.patch 04_no-verbose-for-md5sum.patch 05_add-upstream-changelog.patch 06_fix-in-renamed-backups.patch 07_fix-driver-tar-gpg.patch 08_fix-mask-list.patch debian/source/0000755000000000000000000000000011311763672010475 5ustar debian/source/format0000644000000000000000000000001411316665414011703 0ustar 3.0 (quilt) debian/install0000644000000000000000000000013211560760310010552 0ustar backup2l usr/bin/ first-time.conf etc/ zz-backup2l etc/cron.daily/ debian/links0000644000000000000000000000004411560760310010226 0ustar usr/bin/backup2l usr/sbin/backup2l debian/changelog0000644000000000000000000001416511746565570011067 0ustar backup2l (1.5-6) unstable; urgency=low * Fix verify failure in renamed backups. (LP: #934203) * Fix DRIVER_TAR_GPG (thanks to H. Segnitz). (Closes: #665429) * Fix problem with MASK_LIST (thanks to G. Kiefer). * debian/control: Bump in to Standards Version 3.9.3 (no changes). * Update of debian/copyright file. -- Joachim Wiedorn Fri, 27 Apr 2012 19:56:00 +0200 backup2l (1.5-5) unstable; urgency=low * debian/control: - Remove suggestion to cdlabelgen (seldom needed). - Remove suggestion to afio (no more exiting in Debian). - Update Vcs Git and Browser URLs. - Move build dependency to debhelper (>= 8). * Move compat level to 8. -- Joachim Wiedorn Sat, 01 Oct 2011 21:39:01 +0200 backup2l (1.5-4) unstable; urgency=low * Update patches for file first-time.conf. * Add upstream changelog as patch. Remove code in debian/rules. * Fix: use md5sum without -v in 'check_these_files.sh'. (Closes: #623472) * Add example driver using gzip with --rsyncable. (Closes: #609175) * Add example driver using new xz tools. * Install backup2l main script to /usr/bin (usable for all users). * Small update of debian/copyright to newer standard. * debian/control: - Bump to Standards Version 3.9.2 (no changes). - Set afio only as suggested package (because of critial license). - Add Vcs Git and Browser URLs to git repository. -- Joachim Wiedorn Fri, 06 May 2011 13:10:10 +0200 backup2l (1.5-3) unstable; urgency=low [ Joachim Wiedorn ] * debian/watch: - Use correct file name. * debian/control: - Bump Standards-Version to 3.8.4 without changes. - Update build depends to debhelper 7.0.50 for new rules syntax. - Remove build dependency to cdbs - no more needed. * Add some example codes for unofficial drivers. (see #569600, #351812) * Update all patch headers to current standard. [ Charles Plessy ] * Set DM-Upload-Allowed to ‘yes’ in debian/control. -- Joachim Wiedorn Mon, 10 May 2010 19:53:00 +0200 backup2l (1.5-2) unstable; urgency=low * Add more infos about built-in and custom drivers in config file. * Patches for man page. * Add descriptions in patch files. * Set Debian package GPL version to the same as upstream GPL version. -- Joachim Wiedorn Fri, 01 Jan 2010 22:26:28 +0100 backup2l (1.5-1) unstable; urgency=low * New upstream release. (Closes: #519610, #537593, #337485, #290567, #493319) (Closes: #291423, #305792, #497711, #351812, #303462, #303620, #307759) * debian/control: - Update to debhelper (>= 7). - Change to Standards-Version: 3.8.3. * Change to Debian source format 3.0 (quilt). * Complete rewrite of file debian/rules. -- Joachim Wiedorn Tue, 15 Dec 2009 19:15:15 +0100 backup2l (1.4) unstable; urgency=low * New upstream release. * DRIVER_AFIOZ: allow archive files > 2GB. * Improved POSIX compliance. (Closes: #261950) * Fixed restore of files with glob(7) control characters. (Closes: #235249) * Misc. typos in doc. (Closes: #250672, #250671) * Adopted documentation with MAX_FULL <= 8. (Closes: #233962) -- Gundolf Kiefer Tue, 4 Jan 2005 16:10:05 +0100 backup2l (1.3) unstable; urgency=low * Removed "--same-order" option in tar-based drivers (fixes problems during restore) * Improved checking of required drivers before restore start * Fixed some typos in comments and documentation * Set Debian standards version to 3.6.1 -- Gundolf Kiefer Wed, 8 Oct 2003 19:22:00 +0200 backup2l (1.2) unstable; urgency=low * Fixed false alarms with special characters in file names (Closes: #763710, #587658) * Added DRIVER_TAR (Philippe "BooK" Bruhat) * Moved Debian adaptions by Chris Davis upstream * Set Debian standards version to 3.6.0 -- Gundolf Kiefer Mon, 2 Sep 2003 20:47:17 +0200 backup2l (1.1-gk.1.1) unstable; urgency=low * Initial upload into Debian (closes: 142857) * Remove unnecessary postinst -- Chris G. Davis Fri, 25 Jul 2003 15:10:34 -0400 backup2l (1.1-gk.1) unstable; urgency=low * New: open driver architecture for different archive formats * fixed bugs with regexps for --restore, --locate, --get-available -- Gundolf Kiefer Sun, 18 May 2003 12:16:07 +0200 backup2l (1.01-gk.1) unstable; urgency=low * fixed incorrect backup list sorting (bug #637066) * removed "bc" usage * stricter filter macros for SED_NAME, SED_CHOWN, SED_CHMOD (should fix various bugs including patch 702979 from Gene Skonicki) * human readable sizes (based on patch by Jarno Elonen) * allow wildcards in argument of ANY operation * support for filesystems not allowing symlinks (patch by Jason Creighton) -- Gundolf Kiefer Sun, 9 Apr 2003 12:59:00 +0200 backup2l (1.00-gk.1) unstable; urgency=low * Fixed problem with special characters in file names (bug #587658) * .tar.gz files can savely be removed * Various fixes/patches -- Gundolf Kiefer Sun, 8 Sep 2002 17:30:00 +0200 backup2l (0.93-gk.1) unstable; urgency=low * Changed: diff is invoked without '-d' (performance issue with large numbers of files) * New: POST_BACKUP * Fixed: compatibility with pre-0.9 .list files * Various fixes/patches -- Gundolf Kiefer Thu, 9 Mar 2002 15:26:00 +0100 backup2l (0.92-gk.1) unstable; urgency=low * Fixed: incorrectly determined base archive resulting in full backup instead of incremental -- Gundolf Kiefer Thu, 17 Jan 2002 11:11:01 +0100 backup2l (0.91-gk.1) unstable; urgency=low * New: command to generate CD-ready data directories * Time in summary display * Workaround for bug in find 4.1.7 (no leading 0's in printf if requested) * Use of shell arrays for SRCLIST * Fixed problems with spaces in file names * Minor bugfixes -- Gundolf Kiefer Tue, 6 Nov 2001 09:32:13 +0100 backup2l (0.9-gk.1) unstable; urgency=low * Initial release -- Gundolf Kiefer Mon, 29 Oct 2001 14:58:47 +0100 debian/control0000644000000000000000000000316111746565453010612 0ustar Source: backup2l Section: admin Priority: optional Maintainer: Joachim Wiedorn Build-Depends: debhelper (>= 8) Standards-Version: 3.9.3 DM-Upload-Allowed: yes Vcs-Git: git://anonscm.debian.org/collab-maint/backup2l.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/backup2l.git Homepage: http://backup2l.sourceforge.net Package: backup2l Architecture: all Depends: ${misc:Depends} Recommends: bzip2 Description: low-maintenance backup/restore tool backup2l [backup-too-l] is a tool for autonomously generating, maintaining and restoring backups on a mountable file system (e. g. hard disk). In a default installation, backups are created regularly by a cron script. . The main design goals are low maintenance effort, efficiency, transparency and robustness. All control files are stored together with the archives on the backup device, and their contents are mostly self-explaining. Hence, a user can - if necessary - browse the files and extract archives manually. . backup2l features differential backups at multiple hierarchical levels. This allows one to generate small incremental backups at short intervals while at the same time, the total number of archives only increases logarithmically with the number of backups since the last full backup. . An open driver architecture allows one to use virtually any archiving program as a backend. Built-in drivers support .tar.gz, .tar.bz2 and others. Further user-defined drivers can be added. . An integrated split-and-collect function allows one to comfortably transfer all or selected archives to a set of CDs or other removable media. debian/copyright0000644000000000000000000000223611746565453011144 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: backup2l Upstream-Contact: Gundolf Kiefer Source: http://sourceforge.net/projects/backup2l Files: * Copyright: 2001-2010, Gundolf Kiefer License: GPL-2+ Files: debian/* Copyright: 2009-2012, Joachim Wiedorn License: GPL-2+ License: GPL-2+ 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 2 of the License, or (at your option) any later version. . This package 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 2 can be found in the file `/usr/share/common-licenses/GPL-2'.