[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] tar and date
- Subject: [ale] tar and date
- From: PBoyington at polyengineering.com (Preston Boyington)
- Date: Wed Mar 23 15:23:41 2005
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?
Preston