Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have backup2l set-up to rsync my backup. Although I have found that if the files are in use while the backup is taking place it produces an error.

This is the email I receive:

/etc/cron.daily/zz-backup2l:
backup2l v1.5 by Gundolf Kiefer

Sun Sep 25 03:20:50 BST 2011

Running pre-backup procedure...
  writing dpkg selections to /root/.dpkg-selections.log...
 dumping databases

Removing old backups...

Preparing differential level-2 backup <all.104> based on <all.103>...
  145008 / 145008 file(s), 12432 / 12432 dir(s), 10.3GB / 10.3GB (uncompressed)
  skipping: 175 file(s), 0 dir(s), 735KB (uncompressed)

Creating archive using 'DRIVER_TAR_BZ2'...
  tar: Removing leading `/' from hard link targets
  tar: /var/vmail/vmail01/example.com/b/ba/bar/barry-2010.12.11.10.28.01/Maildir/dovecot.index.log.2: Cannot stat: No such file or directory
  tar: Exiting with failure status due to previous errors
Checking TOC of archive file (< real file, > archive entry)...
  47299d47298
  < /var/vmail/vmail01/example.com/b/ba/bar/barry-2010.12.11.10.28.01/Maildir/dovecot.index.log.2
  96928c96927
Creating check file for <all.104>...

Running post-backup procedure...

Sun Sep 25 09:26:49 BST 2011


Summary
=======

Backup       Date       Time  |  Size   | Skipped  Files+D |  New  Obs. | Err.
------------------------------------------------------------------------------
all.1        2011-09-21 02:26 |    7.3G |     198   161103 |161103     0 |    5
all.101      2011-09-22 02:25 |   51.4M |     192   161788 | 2270  1585 |    0
all.102      2011-09-23 02:25 |   46.6M |     213   162460 | 1610   938 |    0
all.103      2011-09-24 02:25 |   58.6M |     188   156809 | 2450  8101 |    0
all.104      2011-09-25 03:23 |    7.4G |     175   157440 |157440 156809 |    2

Filesystem            Size  Used Avail Use% Mounted on
/dev/vda               40G   30G  8.4G  78% /

Backup2l config

##################################################
# Configuration file for backup2l                #
##################################################


# Define the backup2l version for which the configuration file is written.
# This way, future versions can automatically warn if the syntax has changed.
FOR_VERSION=1.4


##################################################
# Volume identification

# This is the prefix for all output files;
# multiple volumes can be handled by using different configuration files
VOLNAME="all"



##################################################
# Source files

# List of directories to make backups of.
# All paths MUST be absolute and start with a '/'!
# SRCLIST=(/etc /root /home /var/mail /usr/local)
SRCLIST=(/etc /root /home /var/vmail /var/www /var/svn /usr/local /var/backups/mysql /var/backups/ldap)

# The following expression specifies the files not to be archived.
# See the find(1) man page for further info. It is discouraged to
# use anything different from conditions (e. g. actions) as it may have
# unforeseeable side effects.

# This example skips all files and directories with a path name containing
# '.nobackup' and all .o files:
#SKIPCOND=(-path "*.nobackup*" -o -name "*.o")
SKIPCOND=(-path "*.nobackup*" -o -name "*.o" -name "*~" -o -name "cache.*" -o -path "*/tmp/captchas/*")

# If you want to exclude several directories use the following expression:
# SKIPCOND=(-path '/path1' -o -path '/path1/*' -o -path '/path2' -o -path '/path2/*')

# NOTE: If you do not have anything to skip, use:
# SKIPCOND=(-false)     # "SKIPCOND=()" does not work



##################################################
# Destination

# Mount point of backup device (optional)
#BACKUP_DEV="/disk2"

# Destination directory for backups;
# it must exist and must not be the top-level of BACKUP_DEV
BACKUP_DIR="/var/backups/localhost"



##################################################
# Backup parameters

# Number of levels of differential backups (1..9)
MAX_LEVEL=2

# Maximum number of differential backups per level (1..9)
MAX_PER_LEVEL=7

# Maximum number of full backups (1..8)
#MAX_FULL=2
MAX_FULL=1

# For differential backups: number of generations to keep per level;
# old backups are removed such that at least GENERATIONS * MAX_PER_LEVEL
# recent versions are still available for the respective level
GENERATIONS=1

# If the following variable is 1, a check file is automatically generated
CREATE_CHECK_FILE=1
share|improve this question

1 Answer 1

up vote 0 down vote accepted

Yes, this error message is (a) intended and (b) happens to me fairly often as well.

This error is simply due to the way backup2l operates: Make a list of files to backup, backup them, then check what files are in the backup. Since the backup process takes some time, you'll often get /some/ files that are changed in the process and are consequently backup errors. You definitely want to /know/ about these files, since backup failures are often serious business[1].

So, my advice is to backup at less busy times of the day. You'll get a mail from your backup cronjob, and you should read it carefully anyway. Sometimes you'll have these errors, but they are not fatal to the backup. Just make sure it's not the same file every day.

[1] Small anecdote here: For a time, we thought backupping by having our main data partition as a loop-back mounted file on university storage was a bright idea. Just resulted in the data partition file (~1 TB) being sent to the backup server each night, which took a few hours, then being checked for changes and, having changes, being discarded. No backup was actually performed in months. Major d'oh moment, and from that day on we made sure to talk to everyone involved to make sure that backups were /actually/ made and were recoverable.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.