backup problem using rsync

Joe josephj at main.nc.us
Fri Mar 25 10:15:27 EST 2005


Hi.  I have a backup routine using rsync that runs from /etc/cron.daily.
I've been using this script for about a year with no problems until 
recently.
Lately, I was having some intermittent trouble with hdb1 not being found 
in the bios, but it's mounted now.
Below is my daily backup script and the output it reports (errors).

Any ideas on what's wrong and how to fix it would be appreciated.

Joe

fstab

/dev/hda7 / ext3 defaults 1 1
/dev/hda6 /boot ext2 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hda9 /home ext3 defaults 1 2
/dev/sda1 /mnt/card vfat codepage=850,umask=0,rw,user,noauto 0 0
none /mnt/cdrom supermount 
dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hda1 /mnt/dos_hda1 vfat 
iocharset=iso8859-1,codepage=850,umask=0,defaults 0 0
/dev/hda5 /mnt/dos_hda5 vfat 
iocharset=iso8859-1,codepage=850,umask=0,defaults 0 0
none /mnt/floppy supermount 
dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hdb1 /mnt/portable ext3 rw,users,noauto,exec,suid 0 0
none /proc proc defaults 0 0
/dev/hda8 swap swap defaults 0 0


[root at localhost bin]# cat dailyback1
#!/bin/bash
# Dailyback1 - (C) 09/24/03 - JPmicrosystems
# Backup /home to big portable drive using rsync

#This script does the actual work once invoked by su in dailyback0 (to 
get access to everything)

# First, make sure the portable drive is mounted
df | grep 'hdb1' > /tmp/backuptmp
if [ -s /tmp/backuptmp ]
then
  echo /mnt/portable already mounted
else
  mount /dev/hdb1 /mnt/portable
  status=$?
  if [ $status != 0 ]
  then
    echo "Couldn't mount hdb1 = status was $status"
    exit $status
  fi
fi

echo "Backing up /home with rsync"
echo "Backup of /home  - `date`" > /mnt/portable/rsync.log
/usr/bin/rsync -n -a -H -z -P --delete --no-whole-file --stats /home 
/mnt/portable/homersync >> /mnt/portable/rsync.log
status=$?
echo "Backup Ended /home - `date`" >> /mnt/portable/rsync.log
[root at localhost bin]# cat dailyback1
#!/bin/bash
# Dailyback1 - (C) 09/24/03 - JPmicrosystems
# Backup /home to big portable drive using rsync

#This script does the actual work once invoked by su in dailyback0 (to 
get access to everything)

# First, make sure the portable drive is mounted
df | grep 'hdb1' > /tmp/backuptmp
if [ -s /tmp/backuptmp ]
then
  echo /mnt/portable already mounted
else
  mount /dev/hdb1 /mnt/portable
  status=$?
  if [ $status != 0 ]
  then
    echo "Couldn't mount hdb1 = status was $status"
    exit $status
  fi
fi

echo "Backing up /home with rsync"
echo "Backup of /home  - `date`" > /mnt/portable/rsync.log
/usr/bin/rsync -n -a -H -z -P --delete --no-whole-file --stats /home 
/mnt/portable/homersync >> /mnt/portable/rsync.log
status=$?
echo "Backup Ended /home - `date`" >> /mnt/portable/rsync.log

if [ $status -eq 0 ]
then
  echo
  echo "Backup of /home successfully completed"
  echo
else
  echo "Backup of /home FAILED with status $status"
  exit $status
fi

exit $status
[root at localhost bin]# ./dailyback1
/mnt/portable already mounted
Backing up /home with rsync
readlink home/bigbird/.gconf/apps/gnome-settings/gedit/%gconf.xml: 
Input/output error
readlink 
home/bigbird/.mozilla/bigbird/1a414ofz.slt/Mail/buncombe.main.nc.us/Health.sbd/Psych.msf: 
Input/output error
readlink home/bigbird/.fpm/fpm: Input/output error
rsync error: some files could not be transferred (code 23) at main.c(620)
Backup of /home FAILED with status 23
[root at localhost bin]# cat /mnt/portable/rsync.log
Backup of /home  - Fri Mar 25 09:54:31 EST 2005
building file list ...
31419 files to consider
home/bigbird/.kde/share/apps/kalarmd/clients
home/bigbird/.mozilla/bigbird/1a414ofz.slt/Mail/Local Folders/Junk.msf
home/bigbird/.mozilla/bigbird/1a414ofz.slt/panacea.dat
home/bigbird/.signature
rsync[6738] (server receiver) heap statistics:
  arena:        7172760   (bytes from sbrk)
  ordblks:         3377   (chunks not in use)
  smblks:             2
  hblks:              1   (chunks from mmap)
  hblkhd:       2265088   (bytes from mmap)
  usmblks:            0
  fsmblks:           40
  uordblks:     3809968   (bytes used)
  fordblks:     3362792   (bytes free)
  keepcost:      128720   (bytes in releasable chunk)
rsync[6736] (sender) heap statistics:
  arena:        3547800   (bytes from sbrk)
  ordblks:           62   (chunks not in use)
  smblks:             0
  hblks:              0   (chunks from mmap)
  hblkhd:             0   (bytes from mmap)
  usmblks:            0
  fsmblks:            0
  uordblks:     3380624   (bytes used)
  fordblks:      167176   (bytes free)
  keepcost:      127752   (bytes in releasable chunk)

Number of files: 31419
Number of files transferred: 4
Total file size: 2359134213 bytes
Total transferred file size: 69856 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 936488
Total bytes written: 936520
Total bytes read: 36

wrote 936520 bytes  read 36 bytes  30706.75 bytes/sec
total size is 2359134213  speedup is 2518.95
Backup Ended /home - Fri Mar 25 09:55:02 EST 2005
[root at localhost bin]#
if [ $status -eq 0 ]
then
  echo
  echo "Backup of /home successfully completed"
  echo
else
  echo "Backup of /home FAILED with status $status"
  exit $status
fi

exit $status
[root at localhost bin]# ./dailyback1
/mnt/portable already mounted
Backing up /home with rsync
readlink home/bigbird/.gconf/apps/gnome-settings/gedit/%gconf.xml: 
Input/output error
readlink 
home/bigbird/.mozilla/bigbird/1a414ofz.slt/Mail/buncombe.main.nc.us/Health.sbd/Psych.msf: 
Input/output error
readlink home/bigbird/.fpm/fpm: Input/output error
rsync error: some files could not be transferred (code 23) at main.c(620)
Backup of /home FAILED with status 23
[root at localhost bin]# cat /mnt/portable/rsync.log
Backup of /home  - Fri Mar 25 09:54:31 EST 2005
building file list ...
31419 files to consider
home/bigbird/.kde/share/apps/kalarmd/clients
home/bigbird/.mozilla/bigbird/1a414ofz.slt/Mail/Local Folders/Junk.msf
home/bigbird/.mozilla/bigbird/1a414ofz.slt/panacea.dat
home/bigbird/.signature
rsync[6738] (server receiver) heap statistics:
  arena:        7172760   (bytes from sbrk)
  ordblks:         3377   (chunks not in use)
  smblks:             2
  hblks:              1   (chunks from mmap)
  hblkhd:       2265088   (bytes from mmap)
  usmblks:            0
  fsmblks:           40
  uordblks:     3809968   (bytes used)
  fordblks:     3362792   (bytes free)
  keepcost:      128720   (bytes in releasable chunk)
rsync[6736] (sender) heap statistics:
  arena:        3547800   (bytes from sbrk)
  ordblks:           62   (chunks not in use)
  smblks:             0
  hblks:              0   (chunks from mmap)
  hblkhd:             0   (bytes from mmap)
  usmblks:            0
  fsmblks:            0
  uordblks:     3380624   (bytes used)
  fordblks:      167176   (bytes free)
  keepcost:      127752   (bytes in releasable chunk)

Number of files: 31419
Number of files transferred: 4
Total file size: 2359134213 bytes
Total transferred file size: 69856 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 936488
Total bytes written: 936520
Total bytes read: 36

wrote 936520 bytes  read 36 bytes  30706.75 bytes/sec
total size is 2359134213  speedup is 2518.95
Backup Ended /home - Fri Mar 25 09:55:02 EST 2005
[root at localhost bin]#

-- 
"In a time of universal deceit, telling the truth is a revolutionary act." -- George Orwell




More information about the nflug mailing list