Re: Need help with backup shell script

2008-01-16 Thread Jim Bow
Andreas Widerøe Andersen wrote: #!/bin/sh MOUNT=/external DATE=`date +%Y%m%d%H%M` mount /dev/da0 $MOUNT #Change device name find $MOUNT -mtime +30 -delete mkdir $MOUNT/$DATE rsync -rlpgoD /backup/ $MOUNT/$DATE umount /external When I try to run my script I get this prompt back: mount: /dev/da

Re: Need help with backup shell script

2008-01-16 Thread Andreas Widerøe Andersen
On Nov 21, 2007 2:55 PM, Valerio Daelli <[EMAIL PROTECTED]> wrote: > On Nov 21, 2007 2:39 PM, Andreas Widerøe Andersen <[EMAIL PROTECTED]> > wrote: > > Hi, > > > > I'm working on a shell script that will let me attach (mount) an > > external USB 2.0 harddrive and to my FreeBSD 6.2 server and perfo

Re: Need help with backup shell script

2007-11-21 Thread Lowell Gilbert
Robert Huff <[EMAIL PROTECTED]> writes: > And the key to "<= 30 days" would involve "find". I like to put the date in the names of the backup files. That way the date is a little less fragile... ___ freebsd-questions@freebsd.org mailing list http:

Re: Need help with backup shell script

2007-11-21 Thread Valerio Daelli
> --- > #!/bin/sh > > MOUNT=/external > DATE=`date +%Y%m%d%H%M` > > mount /dev/da2 $MOUNT #Change device name > find $MOUNT -mtime +30 -delete > mkdir $MOUNT/$DATE > cp -rp /backup/* $MOUNT/$DATE > umount /external > --- > Please substitute the line starting with 'cp' with this one: rsync -rlpgoD

Need help with backup shell script

2007-11-21 Thread Robert Huff
=?ISO-8859-1?Q?Andreas_Wider=F8e_Andersen?= writes: > Does anyone use a script like this today that they can share? I'm > not a shell scripter myself so any help is highly appreciated. My current scripts are appended; constructive criticism is welcome. And the key to "<= 30 day

Re: Need help with backup shell script

2007-11-21 Thread Valerio Daelli
On Nov 21, 2007 2:39 PM, Andreas Widerøe Andersen <[EMAIL PROTECTED]> wrote: > Hi, > > I'm working on a shell script that will let me attach (mount) an > external USB 2.0 harddrive and to my FreeBSD 6.2 server and perform a > full backup of /backup on my server (all files and subfolders) once or >

Need help with backup shell script

2007-11-21 Thread Andreas Widerøe Andersen
Hi, I'm working on a shell script that will let me attach (mount) an external USB 2.0 harddrive and to my FreeBSD 6.2 server and perform a full backup of /backup on my server (all files and subfolders) once or twice a week (whenever I run the cronjob). The script must be able to run through a cron