BackupPC-users

Re: [BackupPC-users] Got fatal error during xfer after 20 MiB (tar on localhost)

2014-03-12 16:09:39
Subject: Re: [BackupPC-users] Got fatal error during xfer after 20 MiB (tar on localhost)
From: Holger Parplies <wbppc AT parplies DOT de>
To: Jost Schenck <jost.schenck AT gmx DOT de>
Date: Wed, 12 Mar 2014 20:59:36 +0100
Hi,

Jost Schenck wrote on 2014-03-11 19:39:21 +0100 [Re: [BackupPC-users] Got fatal 
error during xfer after 20 MiB (tar on localhost)]:
> I probably should add:

right, but you prepend instead.

Earlier on, Jost Schenck had written:
> > Hi,
> >
> > I set up backuppc in my small home network. It works fine now backing up my 
> > work linux PC over ssh/rsync. However, trying to backup /etc on localhost 
> > over tar, I get an error after most of /etc (but not all) has been backed 
> > up:
> > [...]
> > Got fatal error during xfer (Gesamtzahl geschriebener Bytes: 20613120 
> > (20MiB, 2,1MiB/s))

yes, you translated it for us, but who is supposed to translate it to
BackupPC? As far as BackupPC is concerned, some unexpected message is an
error.

Are you sure that not all of /etc has, in fact, been backed up? You get a
"partial" backup due to the "error", but I would expect the backup to
contain all files.

> > Tar over sudo is configured using visudo as explained in the documentation. 
> > I have no idea why this fails. Can you help me?

I generally think that setting up a *nix system with a default language !=
English is a bad idea. Language is a user preference, not a system preference
(yes, you might want your DM to greet your users in a different language, and
*all* of your users might prefer a single different language, but still the
*system* should remain comprehensible). Just a few minutes ago, I read a
system error message "Speicherzugriffsfehler" on a different mailing list.
Now, was that originally a "bus error" or a "segmentation fault"? I'm sure I
can find out, but the point is: I need to translate it back to the original to
understand it, and I wouldn't be in the least surprised if the same is true
for almost anyone else who actually understands the difference.

Since your system language seems to disagree with BackupPC's requirements,
you'll have to fix things for BackupPC - add an 'env LANG=C' command in an
appropriate place in your backup command. Strictly speaking, you don't need
root privileges to change the environment for a child process, so it would be
something like

        env LANG=C sudo ... tar ...

but then, sudo does have a habit of filtering the environment, so you might
need to explicitly whitelist the LANG variable (see sudoers(5)).

On the other hand, if you use

        sudo ... env LANG=C tar ...

you'll need to allow the 'env' command in sudoers. Unless you narrow that down
by including the starting parameters at least upto the 'tar', you'll be
allowing arbitrary commands, which you don't want to do.

Actually, the sudo(8) man page suggests that you can also use

        sudo ... LANG=C tar ...

(my experimentation agrees). The same notes as for the "env sudo tar" case
apply.

Hope that helps.

Regards,
Holger

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/