Click to See Complete Forum and Search --> : Tar hangs on ?completion?


Enchantment
02-07-2001, 03:02 PM
I'm trying to make a backup of our system before we recompile and upgrade the kernel. To do this, I'm running the following command:

tar cpf /tmp/archive/full-backup-`date '+%d-%B-%Y'`.tar --directory / --exclude-from /etc/tar-exclude.conf / .

The file size quickly shot to 201000960 and then stop. Checking top showed me that the status of the tar process was DW (swapped out, uninterruptable sleep).

Why is tar hanging like this? Any thoughts/suggestions?

Update: After doing a tar tf, it appears the tar stopped mid processing. I didn't see any of the files in the /etc dir.
Thanks

[ 07 February 2001: Message edited by: Enchantment ]

nopun
02-08-2001, 09:42 AM
Just a thought, may be missing the point here...
In your exclude list, did you exclude "/tmp/archive/*"?

[ 08 February 2001: Message edited by: nopun ]

Enchantment
02-08-2001, 11:58 AM
I do, but probably not in the correct format. Is the format you listed /tmp/archive/* the correct format for entries in the exclude file? I've yet to see what the exclude entries should look like.

Thanks.

nopun
02-08-2001, 07:34 PM
The correct format, I think would be "/tmp/archive" - I was just trying to put an idea across more than anything.
Anyways, I think I was barking up the wrong tree as I tried it out (yeah, I'm pretty sad) and gnu tar is clever enough not to try to backup the archive file that it is actually creating.
:confused:

Enchantment
02-09-2001, 04:00 PM
I think my problem stemmed from the / . at the end of the command. Through trial and error of some simpler backups, I discovered that this was trying to backup the hard drive twice. Still not sure why the process went to sleep in the middle of work though.

I finally got a good backup that I could keep so I'm happy with that.

Thanks for the thoughts.