View Full Version : Now why does this now work? [tar zipping problem, easy]
interactive
07-21-03, 08:36 PM
Why doesn't this work?
tar -cmzvf "/home/httpd/vhosts/site.com/site_backups/site_backup-`date`.tar.gz" /home/httpd/vhosts/site.com/httpdocs
Error:
Removing leading `/' from member name
Then a couple lines down (after some files are listed):
tar (child): Cannot execute remote shell: No such file or directory
home/httpd/vhosts/site.com/httpdocs/beta/images/archives.gif
tar (child): /home/httpd/vhosts/site.com/site_backups/site_backup-Mon Jul 21 23\:04\:48 PDT 2003.tar.gz: Cannot open: Input/output error
tar (child): Error is not recoverable: exiting now
Any ideas?
xerocity.com
07-22-03, 08:18 AM
Did you check the partition size and make sure that there is enough room? Also how is your memory?
The only thing that worrys me about the output is the input/output error.
interactive
07-22-03, 06:00 PM
Checked it. There's more then enough room.
xerocity.com
07-22-03, 06:10 PM
Originally posted by interactive:
Checked it. There's more then enough room.
What version of tar are you using?
interactive
07-25-03, 05:10 PM
1.13.25-4.7.1
Knowing plesk it would probably kill it if I updated the version.
wateringcan
07-26-03, 11:39 AM
Can't say I know what the problem is. One suggestion though:
DATE=`date '+%Y%m%d'`; tar -czvf /home/httpd/vhosts/site.com/site_backups/site_backup-$DATE.tar.gz /home/httpd/vhosts/site.com/httpdocs
Using `date` isn't advised, as it'll create filenames with spacing in them. It's best to format the output of the date command. Secondly, what is the -m in your tar command for? Isn't that for extraction?
It's because of the colons in the file name.
Chicken
07-27-03, 05:33 AM
This is an ugly file name, eh? site_backup-Mon Jul 21 23\:04\:48 PDT 2003.tar.gz
I usually just:
tar cvf nameoftarfileyouwant.tar *
gzip nameoftarfileyouwant.tar
-z g(un)zips it for you. Interactive ou might want to try bzip2 (-I, formerly -j). It takes longer to compress than gzip but provides better compression. .bz2 is the standard bzip2 extention, so you'd name the archive blah.tar.bz2. For naming files using date either just use unixtime (date +%s) or a convention like yearmonthday (date +%Y%m%d or maybe date +%Y-%m-%d) if you don't need the time too. Play around with date and find something you like :)
xerocity.com
07-27-03, 09:52 PM
If you can, try to update tar. There was a problem with the 1.13 version of tar that can cause this (I am not sure of the exact release).
I did a search on google and one person mentioned that going back to 1.12 fixed the error. I do not know if this is really advisable, but they said it worked.
Good luck.
vBulletin v3.5.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.