Results 1 to 3 of 3

Thread: Hard Drive Backup Error?

  1. #1
    Join Date
    Sep 2009
    Beans
    67
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Hard Drive Backup Error?

    I just used tar to back up my entire root directory, and I mainly used the following community source as a reference.

    https://help.ubuntu.com/community/BackupYourSystem/TAR

    This is the command list that I entered...

    Code:
    tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media --exclude=/dev /
    It finished its work yet returned the following message at the end

    Code:
    tar: Exiting with failure status due to previous errors
    Because of this error am not sure if this backed up correctly. I checked the location of the new compressed file and it seems like a perfectly fine tar file.

    Any suggestions would be appreciated. Thanks!

  2. #2
    Join Date
    Dec 2008
    Location
    UK
    Beans
    434
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Hard Drive Backup Error?

    Hi,

    When I use tar with the -v option I redirect the output to a log file, e.g.

    Code:
    tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media --exclude=/dev / > /var/log/mybackup.log 2>&1
    The 2>&1 part redirects all errors to the log as well.

    The error 'tar: Exiting with failure status due to previous errors' is probably down to it not being able to archive a file or directory. In which case it should report it and then skip it, continuing on only to report that it had encountered an error at the end of the tar.

    The log file should allow you to see what the error was on so that you can check yourself whether or not the error is serious or not.

  3. #3
    Join Date
    Sep 2009
    Beans
    67
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Hard Drive Backup Error?

    Thank you for this, i will redirect the output. I briefly thought about it before, but was unsure if it would also redirect the tar backup as well as the log information.

    It makes sense that the archive failure was somewhere back on a small directory, but it just confused me that it showed up at the end. Wasn't sure if the entire backup failed .

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •