Backup Strategy Not Working

Robert Heller heller at deepsoft.com
Fri Jul 31 20:08:54 UTC 2015


At Fri, 31 Jul 2015 19:37:53 +0100 "Ubuntu user technical support,  not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> Hello All,
> 
> I have been running an automatic backup of my home partition using a tar 
> command which runs as a scheduled task once a week.
> 
> The command is as follows:
> 
> tar -cvpzf /media/graham/Expansion\ Drive/graham.tar.gz /home/graham 
> --exclude "/home/graham/VirtualBox VMs"
> 
> Anyway recently I had reason to access the tar.gz file created by this 
> command and using Archive Manager, I attempted to open the tar.gz file.
> It would not open and I received the following error message:
> 
> gzip: stdin: invalid compressed data--format violated
> tar: Unexpected EOF in archive
> tar: Error is not recoverable: exiting now
> 
> I have found that If I run the command from a terminal. the file can be 
> accessed without problems.

Which command? the "tar -cvpzf ..." (eg the cron job) or some variations of
"tar -xvzf ..." (replacing Archive Manager)? Please be specific.

One (IMPORTANT!) note: you appear to be using file/directory names with spaces
in them. This *can* be problematical in many contexts. If you can avoid using
spaces in file and directory names, things might work better.

If you can run the cron job from a terminal and are able to open the file from
Archive Manager (I'm just guessing here), then there is probably some kind of
syntax issue with your cron job -- I'd guess you are running afoul of "space
in filename quoting hell".  Two possible options, put the command into a short 
command script file (make sure the command script file has no spaces in its 
name or path!) and reference that script file in the cron tab entry. Or 
avoid spaces in file and directory names.  

> 
> To sum up, it seems that I do not have the backup strategy I thought I 
> had and this is somewhat disturbing.
> 
> Does anyone out there have a clue as to what the problem might be and 
> how it can be fixed?
> 
> Failing that, can anyone suggest an alternative backup method that 
> avoids this problem?

*I* use AMANDA ('sudo apt-get install amanda-server amanda-client'; man
amanda). Works great.  (I actually have amanda installed on CentOS machines 
and amanda-client on a Raspberry Pi 2 running raspbian.)

> 
> Any advice would be appreciated.
> 
> Cheers,
> 
> Graham
> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                              




More information about the ubuntu-users mailing list