[plug] Monitoring dd
Steege, Phil E
phil.e.steege at lmco.com
Mon Sep 9 20:00:52 WST 2002
I had a line "/dev/hdd1 /backups ext3 defaults 0 0" in my /etc/fstab
I will give it another try.
Thank you
Phil
-----Original Message-----
From: Jeff Williams [mailto:jw at globaldial.com]
Sent: Friday, September 06, 2002 9:53 PM
To: plug at plug.linux.org.au
Subject: Re: [plug] Monitoring dd
>
>
>Does rsync create the directories it is copying or do I have to do that
>initially?
>
>I am using a script I took from a Rsync website.
>
>#!/bin/sh
>
> export PATH=/usr/local/bin:/usr/bin:/bin
>
> LIST="usr var home"
>
> for d in $LIST; do
> mount /backups/$d
> rsync -ax --exclude fstab --delete /$d/ /backups/$d/
> umount /backups/$d
> done
>
>I created a 40Gb partition on my 'backup' disk and mounted it as 'mount
>-t ext3 /dev/hdd1 /backups' I ran the script above and it complained
>about directories not being mounted, however the data appears in my
>/backups directory. Do I need to create /backups/usr /backups/var and
>/backups/home mount points before running rsync ?
>
>
>
It's not rsync but the mount command there that needs the directory,
since its trying to mount /backups/var, /backups/usr.... It would also
need entries for /backup/* in /etc/fstab. ('man mount' if you're unsure
about what i just said). What you probably want is:
#!/bin/sh
export PATH=/usr/local/bin:/usr/bin:/bin
LIST="usr var home"
# this is if /backups is in /etc/fstab, otherwise use full mount line: #
mount -t ext3 /dev/hdd1 /backups mount /backups/
for d in $LIST; do
rsync -ax --exclude fstab --delete /$d/ /backups/$d/
done
umount /backups/
Jeff
--
There are 10 kinds of people in the world, those that can do binary
arithmetic and those that can't.
More information about the plug
mailing list