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
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
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:
> ---
> #!/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
=?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
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
>
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