Quick tar question


#1

I’m trying to make a backup of my home directory with tar. I’m running the following:

tar -cz /home/username/.snapshot/nightly.0/ > archives/username.tar.gz

This command keeps crashing. First it throws a bunch of permission denied errors coming from the log directory then it just halts and never finishes the tarball.

tar -cz ./.snapshot/nightly.0/ > archives/username.tar.gz
tar: ./.snapshot/nightly.0/logs/mydomain.com/http.2540193/analog/mydomain.com.2006-07.cache: Cannot open: Permission denied
tar: ./.snapshot/nightly.0/logs/mydomain.com/http.2540193/analog/mydomain.com.longterm.cache: Cannot open: Permission denied
tar: ./.snapshot/nightly.0/logs/mydomain.com/http.2540193/analog/mydomain.com.2006-08.cache: Cannot open: Permission denied
tar: ./.snapshot/nightly.0/logs/mydomain.com/http.2540193/analog/mydomain.com.longterm.cache.yesterday: Cannot open: Permission denied
tar: ./.snapshot/nightly.0/logs/mydomain.com/http.2540193/analog/mydomain.com.2006-09.cache: Cannot open: Permission denied
tar: ./.snapshot/nightly.0/logs/mydomain.com/http.2540193/analog/mydomain.com.2006-08.cache.yesterday: Cannot open: Permission denied
tar: ./.snapshot/nightly.0/logs/mydomain.com/http.2540193/analog/mydomain.com.2006-09.cache.yesterday: Cannot open: Permission denied
tar: ./.snapshot/nightly.0/logs/mydomain.com/http.2540193/html/.htpasswd: Cannot open: Permission denied
tar: ./.snapshot/nightly.0/logs/trac.mydomain.com/http.2875297/html/.htpasswd: Cannot open: Permission denied
tar: Error exit delayed from previous errors

What am I doing wrong?


#2

Getting some permission errors like that is not unusual.

You might be running into the dreaded persistent process killer.

You could break it into steps or try variations like:

nice -19 tar -cf path/to/tarfile.tar path/to/backup/directory
nice -19 gzip path/to/tarfile.tar

And have a look at http://wiki.dreamhost.com/index.php/Automatic_Backup if haven’t already.

You are welcome to a refund.-Michael;Comparing ‘DH of today’ with ‘DH of old’ does not serve much purpose.-Dallas


#3

That looks normal to me. I get the same thing, but my tarfile is complete upon exit. It only says the exit was delayed, not premature.

However, I don’t grab my data from the snapshot, but from my regular directory. Why aren’t you doing the same?

-Scott