Can you spot the error in my tar command?
I'm using the following command in a script run by crontab to backup my server...
Code:
#!/bin/bash The command does actually create the file server.tar.gz, and sends it to the backup server ok. But if I try to open the archive on the Ubuntu Desktop of the server making the backup, I get this error: Quote:
Code:
tar -tv ./server.tar.gz Any body can give me a clue what I'm doing wrong? Or is there just a limit to the size of archive that tar can reliably create? |
I don't think tar -tv lists files in a .gz archive. Instead use:
tar -ztvf server.tar.gz (The "z" and "f" inform tar that it is working with a gzip file? Anyway, it should work.) Your tar command looks OK to me, but I can't see the entire line in the post. (Looks like the words didn't wrap.) |
Quote:
I tried your command, and now get a consistent error message, that being the same one as when I try to view the archive via Ubuntu Desktop: Quote:
|
humour me, and try
tar -zcpf etc. or even tar -c -z -p -f etc. Reasons: the '-v' option isn't implemented for making archives, only for extracting; The tar info page (a contender for the most obscure document on the planet) suggests that clustering options is bad news, and they would like if getopt actually threw that out as an invalid format. My guess is they have problems there. The '-z' option is fussy if it's not at the beginning. |
I don't think there's an error in your tar command. I created a script like yours and it runs fine. (The "v" causes the list of files being compressed to scroll on the terminal.)
Maybe a corrupt file or directory is throwing tar into a tizzy. |
Tar -tz never works - try it people.
The -z option likes to be near the front of a string of options or it doesn't work. I don't think -cvpzf is ok, use -cz -pvf or the like |
Quote:
Code:
% tar --version Evo2. |
Quote:
Cheers, Evo2. |
Quote:
Does this work? Code:
tar -tzvf ./server.tar.gz |
Quote:
If this works, then maybe the archive is ok? |
installing xfce on ubuntu 9.10
|
Quote:
Evo2. |
I don't think you can tar the special files like /dev, /proc/, /sys. To do so, try with command "cpio".
|
All times are GMT -5. The time now is 07:03 PM. |