tar Exiting with failure status due to previous errors

I am trying to backup my Ubuntu workstation by the help of this guide and are running into trouble as the tar command outputs

Exiting with failure status due to previous errors.

Here's what I ran in terminal:

sudo -i
cd /
tar -cvpzf sysbackup-20110821.tar.gz \ --exclude=/sysbackup-20110821.tar.gz \ --exclude=/proc \ --exclude=/lost+found \ --exclude=/sys \ --exclude=/mnt \ --exclude=/media \ --exclude=/dev /

So from searching a bit, the error seems to be of a non-critical nature, but as I checkout the contents of the actual .tar file, my /home-folder is missing, so obviously something went clearly wrong.

What should I do instead to backup my system without errors?

7

2 Answers

I suggest a command line as the following:

tar -cvpzf sysbackup-20110821.tar.gz --one-file-system \ --exclude=/sysbackup-20110821.tar.gz \ --exclude=./run \ --exclude=./tmp \ --exclude='./home/*/.gvfs' ./

As you see, every exclude pattern becomes a relative path, and the --one-file-system option excludes /dev, /proc, /sys, and everything mounted under /media or /mnt.

Nevertheless, if you have a separate home partition, this is not backed up.

Tested on 11.10 (Oneiric, alpha3). Probably, in previous ubuntu versions you should exclude ./var/run, instead of /run.

0

Right click,choose "Extract here". I use this way to resolve another familiar problem. But I don't know why it can work. It looks incredibly simple, isn't it? Hopefully that can help you.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like