[ale] tar and date

Preston Boyington PBoyington at polyengineering.com
Wed Mar 23 15:23:41 EST 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



More information about the Ale mailing list