[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Rsync hda to hdb



I am trying to use rsync (version 2.5.1  protocol version 25) to produce a
backup of my Debian unstable system and my win98 system. Here is how my hda
is organized:

/dev/hda7 on / type ext2 (rw,errors=remount-ro,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda6 on /usr type ext2 (rw)
/dev/hda5 on /home type ext2 (rw,nosuid)
/dev/hda1 on /mnt/win98 type vfat (rw,noexec,nosuid,nodev,umask=0)

I want to create the debian backup on hdb3 and the win98 backup on hdb1. I
want to copy the whole linux system onto one partition (hdb3). Here is the
script I am using:

#!/bin/bash
#record all debian package info so it goes on the backup
dpkg -l > /root/list

mount -t vfat /dev/hdb1 /mnt/hdb1
mount /mnt/win98
rsync -avutP --delete --delete-after /mnt/win98/ /mnt/hdb1
umount /mnt/hdb1

mount -t ext2 /dev/hdb3 /mnt/hdb3
cd /
rsync -avutP --delete --delete-after --exclude-from /backup.exclude . /mnt/hdb3
umount /mnt/hdb3

Here is my excludes file (backup.exclude) 

/usr/src/linux-2.4.17/linux/
/usr/src/linux-2.2.20/linux/
/dev/
/mnt/win98/
/mnt/hdb1/
/mnt/hdb3/
/mnt/hda4/
/mnt/hda7/


Everything seems to work for the win98 backup, (There are no error messages,
I can boot it up and everything appears to be there. If I delete part of the
win98 backup, rsync replaces it the next time the script runs.)

The Debian portion of the script, however, does not seem to work. Here is
what rsysnc says:

(This is what I see when the script starts)
building file list ... readlink proc/2/exe: No such file or directory
readlink proc/3/exe: No such file or directory
readlink proc/4/exe: No such file or directory
readlink proc/5/exe: No such file or directory
readlink proc/6/exe: No such file or directory
readlink proc/7/exe: No such file or directory
readlink proc/99/exe: No such file or directory
readlink proc/313/exe: No such file or directory
readlink proc/314/exe: No such file or directory
readlink proc/315/exe: No such file or directory
readlink proc/316/exe: No such file or directory
readlink proc/317/exe: No such file or directory
readlink proc/318/exe: No such file or directory
readlink proc/319/exe: No such file or directory
readlink proc/320/exe: No such file or directory
readlink proc/321/exe: No such file or directory
readlink proc/322/exe: No such file or directory
done

(Everything seems normal from here till near the end)
...

var/state/samba/
var/state/samba/browse.dat
         167 100%    0.00kB/s    0:00:00
var/state/samba/connections.tdb
        8192 100%    0.00kB/s    0:00:00
var/state/samba/messages.tdb
         696 100%    0.00kB/s    0:00:00
var/state/samba/nmbd.pid
          20 100%    0.00kB/s    0:00:00
var/state/samba/smbd.pid
          20 100%    0.00kB/s    0:00:00
var/state/samba/wins.dat
         226 100%    0.00kB/s    0:00:00
var/tmp/

(Then I get these errors at the end)

IO error encountered - skipping file deletion
wrote 196459152 bytes  read 17380 bytes  674018.98 bytes/sec
total size is 2562444137  speedup is 13.04
rsync error: partial transfer (code 23) at main.c(537)
...

I could use cp to backup the debian system, but that seems like a waste of
time. I read many of the recent postings on rsync and I read the man page,
but I could obviously use some pointers to make this work.

Thanks for any assistance.


-- 
David Raeker-Jordan
mailto:rkrjrdn@epix.net
Harrisburg, PA, USA



Reply to: