Hi Pupeno,

On Fri, 2003-08-29 at 10:25, Pupeno wrote:

> Remember to have /usr/local/bin/rsync-exclude with the list of 
> files/directories to exclude.

$ ls /usr/local/bin/
cdrwtool      mkudffs   scalc  simpress  spadmin  tkfax
installwatch  pktsetup  sdraw  smath     swriter  tkscan

scalc, simpress, sdraw, smath are symbolic links.  "rsync-exclude" is
not there

$ which rsync
/usr/bin/rsync

$ locate rsync-exclude
could not find this file

B.Regards
Stephen



> El Jueves Agosto 28 2003 22:45, Stephen Liu escribió:
> > Hi Peter,
> >
> > Thanks for your advice.
> >
> > $ cat /etc/crontab
> > SHELL=/bin/bash
> > PATH=/sbin:/bin:/usr/sbin:/usr/bin
> > MAILTO=root
> > HOME=/
> >
> > # run-parts
> > 01 * * * * root run-parts /etc/cron.hourly
> > 02 4 * * * root run-parts /etc/cron.daily
> > 22 4 * * 0 root run-parts /etc/cron.weekly
> > 42 4 1 * * root run-parts /etc/cron.monthly
> >
> >
> > Shall I retain the above and add
> >
> > MAILTO=<normal user>
> > # do rsync backup nightly
> > 0 1 * * * /usr/local/bin/my-rsync
> >
> > Kindly advise.  Thanks in advance.
> >
> > B.R.
> > Stephen
> >
> > On Fri, 2003-08-29 at 09:03, Peter Ruskin wrote:
> > > On Friday 29 Aug 2003 01:53, Stephen Liu wrote:
> > > > Hi Peter,
> > > >
> > > > Could you please advise how to use your script to start backup.  Also
> > > > can backup start automatically at scheduled time?
> > > >
> > > > Thanks in advance.
> > > >
> > > > B.Regards
> > > > Stephen Liu
> > >
> > > # chmod a+x /usr/local/bin/my-rsync
> > > ...then edit root's crontab:
> > > # crontab -e
> > > and add these lines:
> > >
> > > MAILTO=<normal user>
> > > # do rsync backup nightly
> > > 0 1 * * * /usr/local/bin/my-rsync
> > >
> > > then it will run at 1 o'clock every morning
> > >
> > > > On Fri, 2003-08-29 at 06:26, Peter Ruskin wrote:
> > > > > On Thursday 28 Aug 2003 22:06, Pupeno wrote:
> > > > > > Hello... I have one HD with a various partitions (10 GB NTFS, the
> > > > > > linux swap, the /boot partition and my main partition), it is an
> > > > > > 80 GB HD... I have another 80 GB HD to make back ups... what
> > > > > > method of backing up do you recomend me ? Something that is fast
> > > > > > to recover being that I have a whole HD to do the back up ?
> > > > > > Something that is faster than doing a whole 'copy' every night ?
> > > > > > Thank you.
> > > > >
> > > > > #==================================================================
> > > > >==== #! /bin/bash
> > > > > # /usr/local/bin/my-rsync
> > > > > #######################
> > > > > # Backup Script
> > > > > #######################
> > > > >
> > > > > BACKUP_TO=/mnt/backup
> > > > > EXCLUDE=/usr/local/bin/rsync-exclude
> > > > >
> > > > > echo "   Mounting boot partition..."
> > > > > mount /boot -o ro
> > > > > echo
> > > > > echo "   Mounting backup disk..."
> > > > > mount $BACKUP_TO
> > > > > sleep 4
> > > > > echo
> > > > > echo "   Performing backup..."
> > > > > echo
> > > > > rsync --progress --delete -av --exclude-from=$EXCLUDE /
> > > > > $BACKUP_TO/rsync/
> > > > >
> > > > > echo
> > > > > echo "   Unmounting boot and backup partitions..."
> > > > >
> > > > > /bin/umount -l /boot
> > > > > /bin/umount -l $BACKUP_TO
> > > > >
> > > > > echo
> > > > > echo "   Spinning down backup disk..."
> > > > > /sbin/hdparm -y /dev/hdc              # spin down disk
> > > > > #==================================================================
> > > > >==== # /usr/local/bin/rsync-exclude:
> > > > > - /tmp/
> > > > > - /var/lib/init.d/
> > > > > - /mnt/backup/
> > > > > - /mnt/cdrom/
> > > > > - /mnt/floppy/
> > > > > - /proc/
> > > > > - /usr/portage/distfiles/
> > > > > - /root/.ccache/
> > > > > - /home/peter/.ccache/
> > > > > #==================================================================
> > > > >====
> > > > >
> > > > > Peter


To Get Your Own iCareHK.com Email Address?  Go To www.iCareHK.com.

--
[EMAIL PROTECTED] mailing list

Reply via email to