Re: ssh question

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

 



Here's a line out of little script I wrote for a similar situation:

tar czfv /usr/local/temp/`date +backup.%Y%m%d.tar.gz` /path/to/dir/

Should work too...

HTH,

Christopher Hollow



Ed Wilts wrote:

On Sun, Dec 14, 2003 at 01:42:03PM -0600, Michael Sullivan wrote:


I think this will work. I'd like to make daily and weekly backups. What i need to know now is how to change the file name of each new
archive so that it doesn't write over the previous day's. Any ideas?



Have a look at the multiple of options to the date command. Something like this should work for you (thinking out loud without any testing): DM=`date +%d%b` tar zcf $DM.tar.gz <source>




-- Christopher Hollow - Technical Consultant Infrastructure & Technology Support Toronto, ON





--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux