Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it safe to continue an incomplete tar job?

Background: I was doing

tar -czvf backup_20091013.tar.gz directory1 directory2 ... > tar_log_20091013.txt

and to be safe, I put the shell window on the second desktop. A couple of hours later, I logged out (thinking that there was nothing running!), which seems to have stopped the tarring and gzipping. It got most of the way through, so I'm half-tempted to continue that job. Is there a risk of corruption (either to the whole archive, or the archived copy of the file being tarred and gzipped at the time I logged out)?

share|improve this question
up vote 2 down vote accepted

Your original files are safe. Whether the tarball you made is readable is a whole different question -- whether you can a) gunzip it and b) untar it are two different potential points of failure. I don't think they are recoverable, but I'm really not sure.

I wouldn't risk the chance of a corrupted backup file -- delete it and start the job again.

Tip: run screen first, so if your terminal gets disconnected for some reason, the tar will continue.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .