Fedora Linux Support Community & Resources Center
  #1  
Old 7th October 2007, 07:08 PM
AsianGuyJTran Offline
Registered User
 
Join Date: Aug 2005
Location: California
Posts: 34
tar and split not showing date

hi all.

i have a cron job set for weekly backups of my server and they are starting to get to the point where i have to split them for single layer dvds

i found that i can use split to split them at 4gb
however, the files don't have the date in the filename

here is the command i use to start backups

Code:
tar -cvf - --exclude /home/jamiesEmb --exclude /home/backup  /home /etc/httpd/conf /var/lib/mysql | split -a 2 -b 4608m - /home/backup/www_backup`date '+%Y%m%d'`.tar.gz
im getting the following files
www_backup.tar.gz.aa
www_backup.tar.gz.ab

instead of
www_backup20071007.tar.gz.aa
www_backup20071007.tar.gz.ab

any ideas?
__________________
First Server: | Pentium 2 @ 350 Mhz | 320Mb Ram | 20Gb Hd | FC4 | Apache | PHP | MySql | pureFTPd | :D

Current Server: | Pentium 4HT @ 3GHz | 1GB Ram | 2 x 160Gb Hd | FC6 | Apache | PHP | MySql | pureFTPd | and more :D
Reply With Quote
  #2  
Old 7th October 2007, 07:33 PM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,553
Is that in a script ? Any chance the PATH is changes and date isn't found ? Use /bin/date perhaps.

What does this return :
echo split -a 2 -b 4608m - /home/backup/www_backup`date '+%Y%m%d'`.tar.gz
Reply With Quote
  #3  
Old 8th October 2007, 01:30 AM
AsianGuyJTran Offline
Registered User
 
Join Date: Aug 2005
Location: California
Posts: 34
it is not in a script. i just execute it directly from cron

when i executed the line you gave me, i got
split -a 2 -b 4608m - /home/backup/www_backup20071007.tar.gz
__________________
First Server: | Pentium 2 @ 350 Mhz | 320Mb Ram | 20Gb Hd | FC4 | Apache | PHP | MySql | pureFTPd | :D

Current Server: | Pentium 4HT @ 3GHz | 1GB Ram | 2 x 160Gb Hd | FC6 | Apache | PHP | MySql | pureFTPd | and more :D
Reply With Quote
Reply

Tags
date, showing, split, tar

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to split .zip file thisObject Using Fedora 4 12th May 2007 06:06 AM
Split partition lehoanq Using Fedora 22 10th May 2007 04:10 PM
Need to split Jongi Servers & Networking 0 3rd April 2007 09:40 PM
How to Split Fedora 4 DVD to 4 CDs nagaya Installation, Upgrades and Live Media 2 8th January 2006 04:17 AM


Current GMT-time: 19:36 (Wednesday, 23-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat