Re: [BackupPC-users] Incremental Backup fail

2014-07-18 Thread raceface
Hi Holger,

I followed your suggestion and switched to rsync. Everything is working now
and backup-size isn't that big.

Thx, Andy.



--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Incremental Backup fail

2014-07-16 Thread raceface
Hi Holger,

thankyou for your answers. I took the idea with the script from
http://backuppc.sourceforge.net/faq/localhost.html.

I will do a roleback with your suggestions but I am not sure if rsync ist he
right option for what I want. The backup files are stored on a NFS share
which is also reachable via SMB, so I have the option to restore files also
with a Windows PC. But I will give rsync a chance.

Regarding my statement, that I don't want backuppc to many sudo rights, I
wanted to say, to give backuppc to many root rights to prevent if anybody
hacks the backuppc account for compromising the system in occupying tar.

I will test your suggestions this evening and hopefully come back with the
information, that everything is working.

Thx a lot!

Andy


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Incremental Backup fail

2014-07-15 Thread Holger Parplies
Hi,

raceface wrote on 2014-07-15 10:40:34 +0200 [Re: [BackupPC-users] Incremental 
Backup fail]:
> thank you for being that kind to non professionals. I have only 3 blank
> lines in my last posting and 21 non blank, don't know, why you get more
> blank 50 times more blank lines.

ok, sorry about that. I should have noticed the multipart/alternative message
and checked the HTML part (source). Or the X-Mailer header. I'd suggest filing
a bug report with your MUA vendor, but that'd probably be quite pointless :-).

As Benjamin Redling has pointed out, such a message, when viewed as text,
creates a strong urge to simply ignore and delete it. In any case, it does not
make debugging the matter easier.

Your current message demonstrates that you - and your MUA - are capable of
sending text-only messages. That is the correct format for a mailing list.
Thank you for that.

> Using this script is a suggestion of the backuppc FAQ and not my personal
> idea.

Ok, then the FAQ needs to be changed. Which part of which FAQ are you
referring to?

> This script helps me getting backuppc running full backups. Using $tarPath
> ends in error " sudo: no tty present and no askpass program specified".

First of all, it evidently does *not* help you getting BackupPC running. So
far, you've had two different problems solely introduced by the script.

Secondly, this is most certainly a misconfiguration of sudo. There is no
reason why 'sudo /tar/tarCreate' should behave differently than
'sudo /bin/tar' when configured correctly. I've used that myself, and it
*does* work without a script. Right now, you've probably got a line similar to

backuppcALL=NOPASSWD:   /tar/tarCreate

in /etc/sudoers. Add a line

backuppcALL=NOPASSWD:   /bin/tar -c -v -f - *

and change your $Conf{TarClientCmd} back to 'sudo $tarPath -c -v -f - ...'.
Please note the following:

1. The path of the tar executable (in sudoers) needs to match your system.
   If you use $tarPath (in $Conf{TarClientCmd}), you should check
   $Conf{TarClientPath}. If things don't work, try using literal '/bin/tar'
   (assuming that is what you need) instead of $tarPath for the moment.
   In /etc/sudoers, you can't use $tarPath in any case.
2. The above line restricts passwordless sudo for the backuppc user to tar
   command lines starting with the options '-c -v -f -'. Any of the following
   example invocations should trigger a password prompt:

% sudo tar cvf - /home
% sudo tar -c -v -f /etc/passwd /home
% sudo tar -x -v -f - -C /home .
% sudo tar -v -c -f - /home

   This is partly intentional (to disallow someone who manages to gain
   backuppc privileges to damage the system, e.g. by overwriting important
   system files via a tar extract or a tar create to a file), partly because
   sudo has no way of knowing that a certain way of writing options is
   equivalent to another, as far as the tar command is concerned. It simply
   means that you have to track changes you might make to your TarClientCmd.
   My example only includes the first four arguments, because these are
   unlikely to change. You *could* extend that up to (and not including) the
   --newer= parameter, but here you'd need to use a wildcard anyway, and I
   don't see any benefit (there would be if your share was not '/', i.e. you
   had, e.g., a '-C /home' parameter; that would disable a potential attacker
   to create a tar file of secret data outside /home).
3. You *need* the wildcard at the end. Otherwise the line only applies to
   '/bin/tar -c -v -f -' without further parameters, again triggering a
   password prompt if there are any. "Password prompt" translates to your
   "no tty present" error message in the context of BackupPC (on the command
   line, you'd get a password prompt, without a tty, you get an error).
4. You can test on the command line. As the backuppc user (i.e. after
   something like 'su -s /bin/bash backuppc'), run a command and see if you
   are prompted for a password:

% sudo tar -c -v -f - -C / --totals /bin/sh > /dev/null

   If you are, something is still wrong, and backups will fail with the "no
   tty present" error.
5. If you also want to enable automatic restores (I believe you do), there
   is not much point in restricting tar command line parameters. As your
   setup seems to be (share name "/"), there is nothing a potential attacker
   *can't* do. Consider this: create /tmp/etc/passwd and /tmp/etc/shadow as
   any user with any content you like (your choice of password for root). Run
   'tar cvf /tmp/foo.tar -C /tmp etc/passwd etc/shadow'. Then, as backuppc
   user, run 'sudo tar -x -v -f - -C / etc < /tmp/foo.tar'. Add any --totals
   or --exclude options

Re: [BackupPC-users] Incremental Backup fail

2014-07-15 Thread Benjamin Redling
Holger was right (btw. I deleted all your postings upfront because of
their format)

Have a look at your mail at:
http://sourceforge.net/p/backuppc/mailman/message/32569459/

When not viewed as HTML it looks horrible. You can bet that the more
experienced users won't display any HTML in their MUA.

/B

Am 15.07.2014 10:40, schrieb raceface:
> Hello Holger,
> 
> thank you for being that kind to non professionals. I have only 3
> blank lines in my last posting and 21 non blank, don't know, why
> you get more blank 50 times more blank lines. Using this script is
> a suggestion of the backuppc FAQ and not my personal idea. This
> script helps me getting backuppc running full backups. Using
> $tarPath ends in error " sudo: no tty present and no askpass
> program specified". Root has also no rights to login via ssh, so
> ssh is no option. Giving the user backuppc sudo rights is no
> option, to prevent having too much users with to many rights.
> 
> Best, Andy.
> 
>> -Ursprüngliche Nachricht- Von: Holger Parplies
>> [mailto:wb...@parplies.de] Gesendet: Montag, 14. Juli 2014 18:14 
>> An: raceface Cc: backuppc-users@lists.sourceforge.net Betreff:
>> Re: [BackupPC-users] Incremental Backup fail
>> 
>> Hi,
>> 
>> thank you for sending us 175 blank lines. Unfortunately, the
>> content in your 28 non-blank lines doesn't make up for it, so
>> I'll quote sparingly.
>> 
>> raceface wrote on 2014-07-13 11:20:42 +0200 [[BackupPC-users] 
>> Incremental Backup fail]:
>>> [...] I have a problem [...]
>> 
>> Obviously.
>> 
>>> [...] /bin/tar: Option --after-date: Treating date `2014-07-10'
>>> as 2014-07-10 00:00:00
>> 
>> Obvious.
>> 
>>> [ skipped 10072 lines ]
>> 
>> That's what I feel like, too.
>> 
>>> My tarCreate is
>> 
>> Nonsense. I've said that before. If you don't understand shell
>> scripts, don't use them. In the very least, don't use them where
>> there's no point. If you do, don't waste our time with it. This
>> is the BackupPC users list, not a "my first steps with shell
>> scripting and quoting problems" forum.
>> 
>>> exec /bin/tar -c $*
>> 
>> That won't work. See bash(1).
>> 
>> Regards, Holger
>> 
>> P.S.: If you don't want to take advice, don't ask for any.
> 
> 
> --
>
> 
Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck 
> Code Sight - the same software that powers the world's largest
> code search on Ohloh, the Black Duck Open Hub! Try it now. 
> http://p.sf.net/sfu/bds 
> ___ BackupPC-users
> mailing list BackupPC-users@lists.sourceforge.net List:
> https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:
> http://backuppc.wiki.sourceforge.net Project:
> http://backuppc.sourceforge.net/
> 

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Incremental Backup fail

2014-07-15 Thread Les Mikesell
On Tue, Jul 15, 2014 at 3:40 AM, raceface  wrote:
>
> thank you for being that kind to non professionals. I have only 3 blank
> lines in my last posting and 21 non blank, don't know, why you get more
> blank 50 times more blank lines. Using this script is a suggestion of the
> backuppc FAQ and not my personal idea. This script helps me getting backuppc
> running full backups. Using $tarPath ends in error " sudo: no tty present
> and no askpass program specified". Root has also no rights to login via ssh,
> so ssh is no option. Giving the user backuppc sudo rights is no option, to
> prevent having too much users with to many rights.
>

Personally I use rsync with ssh keys for the local host so it is not a
special case - and I don't use sudo so I haven't had that problem.
But, $* is almost always the wrong thing to put in a shell script vs.
$@ because it won't keep parameters with embedded spaces together.

-- 
   Les Mikesell
 lesmikes...@gmail.com

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Incremental Backup fail

2014-07-15 Thread raceface
Hello Holger,

thank you for being that kind to non professionals. I have only 3 blank
lines in my last posting and 21 non blank, don't know, why you get more
blank 50 times more blank lines. Using this script is a suggestion of the
backuppc FAQ and not my personal idea. This script helps me getting backuppc
running full backups. Using $tarPath ends in error " sudo: no tty present
and no askpass program specified". Root has also no rights to login via ssh,
so ssh is no option. Giving the user backuppc sudo rights is no option, to
prevent having too much users with to many rights.

Best, Andy.

> -Ursprüngliche Nachricht-
> Von: Holger Parplies [mailto:wb...@parplies.de]
> Gesendet: Montag, 14. Juli 2014 18:14
> An: raceface
> Cc: backuppc-users@lists.sourceforge.net
> Betreff: Re: [BackupPC-users] Incremental Backup fail
> 
> Hi,
> 
> thank you for sending us 175 blank lines. Unfortunately, the content in
> your
> 28 non-blank lines doesn't make up for it, so I'll quote sparingly.
> 
> raceface wrote on 2014-07-13 11:20:42 +0200 [[BackupPC-users]
> Incremental Backup fail]:
> > [...] I have a problem [...]
> 
> Obviously.
> 
> > [...]
> > /bin/tar: Option --after-date: Treating date `2014-07-10' as
> > 2014-07-10 00:00:00
> 
> Obvious.
> 
> > [ skipped 10072 lines ]
> 
> That's what I feel like, too.
> 
> > My tarCreate is
> 
> Nonsense. I've said that before. If you don't understand shell scripts,
> don't use them. In the very least, don't use them where there's no
> point. If you do, don't waste our time with it. This is the BackupPC
> users list, not a "my first steps with shell scripting and quoting
> problems" forum.
> 
> > exec /bin/tar -c $*
> 
> That won't work. See bash(1).
> 
> Regards,
> Holger
> 
> P.S.: If you don't want to take advice, don't ask for any.


--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] Incremental Backup fail

2014-07-14 Thread Holger Parplies
Hi,

thank you for sending us 175 blank lines. Unfortunately, the content in your
28 non-blank lines doesn't make up for it, so I'll quote sparingly.

raceface wrote on 2014-07-13 11:20:42 +0200 [[BackupPC-users] Incremental 
Backup fail]:
> [...] I have a problem [...]

Obviously.

> [...]
> /bin/tar: Option --after-date: Treating date `2014-07-10' as 2014-07-10
> 00:00:00

Obvious.

> [ skipped 10072 lines ]

That's what I feel like, too.

> My tarCreate is 

Nonsense. I've said that before. If you don't understand shell scripts, don't
use them. In the very least, don't use them where there's no point. If you
do, don't waste our time with it. This is the BackupPC users list, not a
"my first steps with shell scripting and quoting problems" forum.

> exec /bin/tar -c $*

That won't work. See bash(1).

Regards,
Holger

P.S.: If you don't want to take advice, don't ask for any.

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck®
Code Sight™ - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/