[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] tar and date
- Subject: [ale] tar and date
- From: esoteric at 3times25.net (Geoffrey)
- Date: Wed Mar 23 16:53:09 2005
- In-reply-to: <ED82B8B59EA2D44C9E64E228028E4B34029CBA@poly_ethylene.corp.polyengineering.com>
- References: <ED82B8B59EA2D44C9E64E228028E4B34029CBA@poly_ethylene.corp.polyengineering.com>
Preston Boyington wrote:
> I want to have a shell script (that will run via a cron job) to tar.gz three directories and append the date to the single file (today.tar.gz). Then I will rsync with another drive.
>
> I think I need to do something like:
>
> ------------------------
> #!/bin/bash
>
> /bin/tar -zcpf /usr/local/share/data/`date +%Y-%m-%d`.tar.gz /usr/local/share/data/
>
> rsync -CPaur /usr/local/share/data/ /backup/data/
> -------------------------
>
> Does this look remotely correct to anyone? Anything I am forgetting?
Looks fine to me.
--
Until later, Geoffrey