Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2002 18:47:27 -0800 (PST)
From:      ann kok <annkok2001@yahoo.com>
To:        Jan Grant <Jan.Grant@bristol.ac.uk>
Cc:        questions <questions@FreeBSD.ORG>
Subject:   Re: crontab to backup mail in date format
Message-ID:  <20020116024727.49626.qmail@web20108.mail.yahoo.com>
In-Reply-To: <Pine.GSO.4.31.0201141625490.20828-100000@mail.ilrt.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
--- Dear Jan

Thank you. It works now

But how do I know that % doesn't work in crontab?

BTW, I met another problem. There will be many backup
in the server by date format

How do I create cron to delete the date format backup
after 3 days automatically again?

Thank you again


Jan Grant <Jan.Grant@bristol.ac.uk> wrote:
> On Mon, 14 Jan 2002, ann kok wrote:
> 
> > Hi all
> >
> > I have problem about crontab to backup mail in
> date
> > format
> >
> > error from root:
> > /bin/sh: unexpected EOF while looking for ``'
> >  >/bin/sh: -c: line 2: syntax erro
> >
> >
> > My contrab is as follows:
> >
> > 5 21 * * * tar czvf /backup/`date
> > "+%Y-%m-%d"`home.tar.gz /home > /dev/null 2>&1
> > 59 23 * * * tar cvf /backup/`date
> > "+%Y-%m-%d"`backupmail.tar /mail > /dev/null 2>&1
> 
> % characters in crontab are turned into newlines
> when the whole thing is
> sent to the shell; turn the command line into a
> little script and call
> that from cron.
> 
> 
> -- 
> jan grant, ILRT, University of Bristol.
> http://www.ilrt.bris.ac.uk/
> Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822
> jan.grant@bris.ac.uk
> Strive to live every day as though it was last
> Wednesday.
> 


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020116024727.49626.qmail>