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

Re: How do I do this in bash ??



On Sunday 19 January 2003 10:48 am, Dave Selby wrote:
> Hi all ...
>
> I am writting a weekly automated backup script, very simple .. tars a
> directory called 'myfiles' to a second hard drive.
>
> Works AOK except I want the name of the file written by tar to be the time
> and date. So I get a list of tared dated backups
>
> I know 'date' gives me exactly what I want but I cant figure out how to get
> tar to write a file with the value of date as its file name ...
>
>
> #! /bin/sh
>
> # Backup entire 'myfiles/' directory, name it with the date.
>
> cd /usr/local/
> tar -czf /mnt/archive/autoarchive/date myfiles
>
>
> I put this in /etc/cron.weekly and I get a file called date !!???
> I have tried '' and "" all to no avail
>
> Any hints ??
> Dave

Many many thanks for all your suggestions !! 
You have all been a great help, Auto updating should be on line in .... 
approx 10 mins !!!! complete with date !!

Dave



Reply to: