Re: [BackupPC-users] Fwd: After migration to V4, rsync backups not working

2017-03-16 Thread Craig Barratt
>
> So, I guess that's "bye sourceforge" ...


Yes, I'm moving everything off sourceforge to Github, most recently
including the project web site (new URL is
http://backuppc.github.io/backuppc/index.html, and configure.pl updates
that link in config.pl).

Craig
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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] Fwd: After migration to V4, rsync backups not working

2017-03-16 Thread Holger Parplies
Hi,

after downloading 4.0.0 from sourceforge (which has apparently been hacked
and/or turned to the dark side), I need to correct myself:

Holger Parplies wrote on 2017-03-16 17:09:53 +0100 [Re: [BackupPC-users] Fwd:  
After migration to V4, rsync backups not working]:
> [...]
> If I read Craig's answer correctly, a typical setting would be
> 
>   $Conf {RsyncSshArgs} = '-l root';

actually, the default setting from config.pl is:

$Conf{RsyncSshArgs} = [
'-e', '$sshPath -l root',
];

which you'd use if you *used to* have

$Conf{RsyncClientCmd} = '$sshPath -l root $host $rsyncPath $argList+'

whereas something like the more complex

$Conf {RsyncClientCmd} = '$sshPath -l backupuser -i 
/var/lib/backuppc/.ssh/id_backuppc_rsa -q -x $host /usr/bin/sudo $rsyncPath 
$argList+';

would translate to

$Conf{RsyncSshArgs} = [
'-e', '$sshPath -l backupuser -i 
/var/lib/backuppc/.ssh/id_backuppc_rsa -q -x',
];
$Conf{RsyncClientPath} = '/usr/bin/sudo /usr/bin/rsync';


This translation is fairly easy for a human, but coding it for a computer
is dreadful (and it gets worse if I find creative names for my ssh identities
like /.../id/usr/bin/rsync or something ;-).


[OT]
Speaking of "getting worse" - is it normal that the sourceforge web page is
completely littered with ads and forces you with a popup to accept cookie
settings which it takes "several minutes" to save? They don't seem to have
any visible effect, and keeping my browser busy without plausible reason is 
fishy in any case. So, I guess that's "bye sourceforge" ...
[/OT]

Regards,
Holger

---
git clone https://github.com/backuppc/backuppc

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
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] Fwd: After migration to V4, rsync backups not working

2017-03-16 Thread Holger Parplies
Hi,

ads wrote on 2017-03-16 08:58:20 + [[BackupPC-users] Fwd:  After migration 
to V4, rsync backups not working]:
> [...]
> I use Arch Linux, and installed (upgraded) backuppc using the provided
> package in pacman format. I already suspected configure.pl hadn't been run,
> because I had to manually adjust RsyncBackupPCPath (it was empty)
> and PoolV3Enabled (it was off).
> 
> I couldn't find a copy of configure.pl on my system. I guess the package
> gets expanded in some temporary location which is cleaned after install. I
> will have a more thorough search.

this is a misunderstanding. When installing the *upstream* package, you run
configure.pl. For a packaged version as you are using, the package's pre-/
postinstall/configure/whatever_may_apply scripts are responsible for doing
whatever needs to be done for an upgrade. The package maintainer may or may
not have used parts of (or ideas from) the upstream configure.pl for
implementing that.

The correct thing to do is:

> I think my choices now are:
> 
> 1) [...] I would also report the issue to the package maintainer.

and update the setting(s) yourself. (*)

Updating user configuration as in this specific case is in itself a problem.
BackupPC V3 gave you the flexibility to specify an arbitrary command which
ends up with a connection to a remote piece of software that speaks the
rsync protocol - however the individual BackupPC user might choose to
implement that. For V4, the mechanism is slightly different, as the command
is ultimately called by rsync (rsync_bpc, specifically), which, I believe,
makes different assumptions than BackupPC used to. So, it might not always
be possible to convert one form to the other without further manual steps.
For many common cases, it *is* possible, and I assume that is what
configure.pl attempts to do as a convenience (I haven't looked at the code).
Your package maintainer may have chosen not to attempt that, and he may have
valid reasons. Ultimately, you always have to check the results of the
conversion anyway and possibly correct them. Remember, this is one of the
settings where there is, upon *initial* installation of BackupPC, no generic
works-automatically-for-everyone default value. Even for the very common
case "rsync over ssh as root" you always need to set up passwordless ssh
access.

If I read Craig's answer correctly, a typical setting would be

$Conf {RsyncSshArgs} = '-l root';

but if you could quote the setting from your V3 configuration for
$Conf{RsyncClientCmd}, I'm sure we'll be able to figure out what you need
to set and whether you might need to change anything else. Hint: if you
can't find the configuration value, an appropriate extract from a V3 log
file would help, but my guess is that if it wasn't converted, it's still
in config.pl or the respective host.pl file.

Regards,
Holger

(*) Note: even if the maintainer decides to "fix" this issue, conversion
might only happen when upgrading from a 3.x version to the new package,
not from one 4.x version to the next.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
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/


[BackupPC-users] Fwd: After migration to V4, rsync backups not working

2017-03-16 Thread ads
Thank you Holger and Craig, that is most useful.

I use Arch Linux, and installed (upgraded) backuppc using the provided
package in pacman format. I already suspected configure.pl hadn't been run,
because I had to manually adjust RsyncBackupPCPath (it was empty)
and PoolV3Enabled (it was off).

I couldn't find a copy of configure.pl on my system. I guess the package
gets expanded in some temporary location which is cleaned after install. I
will have a more thorough search.

I think my choices now are:

1) Get a copy of configure.pl and run it. I haven't looked at it, and I
don't know perl. Is it something that needs to be run from a particular
location? I would also report the issue to the package maintainer.

2) Uninstall the packaged version and get the tar.gz file and install
myself manually.

I think I'd like to try 1 first.

Once again, thanks for your help.

On 15 March 2017 at 21:16, Craig Barratt 
wrote:

> Holger asked the right questions.  Yes, it's an ssh problem, as you note.
> You've come across what is one of the more likely upgrade issues.
>
> In looking at your rsync_bpc command, it doesn't look like
> $Conf{RsyncArgs} was updated when you installed 4.0, or you have a per-host
> override.
>
> Here's what a typical rsync_bpc command should look like:
>
> /usr/local/bin/rsync_bpc --bpc-top-dir /data/BackupPC4 --bpc-host-name
> HOSTNAME --bpc-share-name /LOCALPATH --bpc-bkup-num 0 --bpc-bkup-comp 3
> --bpc-bkup-prevnum -1 --bpc-bkup-prevcomp -1 --bpc-bkup-inode0 1
> --bpc-attrib-new --bpc-log-level 1 -e /usr/bin/ssh -l root
> --rsync-path=/usr/local/bin/rsync --super --recursive --numeric-ids
> --perms --owner --group -D --times --links --hard-links --delete --partial
> --log-format=log: %o %i %B %8U,%8G %9l %f%L --stats --checksum
> HOSTNAME:/LOCALPATH/ /
>
> The "-e" option is built from $Conf{SshPath} and $Conf{RsyncSshArgs}.  The
> rest of the configurable arguments (after -e) come from $Conf{RsyncArgs}.
> As Holger mentions, either the main config.pl didn't get updated for some
> reason (did you install by running configure.pl?) or you have per-client
> overrides that the upgrade doesn't automatically update for you.
>
> The default settings in 4.0 for these config variables are:
>
> $Conf{RsyncArgs} = [
> '--super',
> '--recursive',
> '--protect-args',
> '--numeric-ids',
> '--perms',
> '--owner',
> '--group',
> '-D',
> '--times',
> '--links',
> '--hard-links',
> '--delete',
> '--partial',
> '--log-format=log: %o %i %B %8U,%8G %9l %f%L',
> '--stats',
>
> $Conf{RsyncSshArgs} = [
> '-e', '$sshPath -l root',
> ];
>
>
> Craig
>
> On Wed, Mar 15, 2017 at 8:46 AM, Holger Parplies 
> wrote:
>
>> Hi,
>>
>> ads wrote on 2017-03-15 11:46:39 + [[BackupPC-users] After migration
>> to V4, rsync backups not working]:
>> > I have migrated from V3 to V4,
>>
>> how did you do that? By running configure.pl?
>>
>> > and now my rsync backups are not working. [...] The 3 'Permission
>> denied'
>> > lines look as if they might be ssh permission problems.
>>
>> I agree with that conclusion.
>>
>> Craig recently wrote on [backuppc-devel]:
>> > The configure.pl script updates the relevant rsync settings in the main
>> > config.pl file.  In particular, it updates $Conf{RsyncArgs}
>> > and $Conf{RsyncRestoreArgs} with the 4.0 settings.
>> >
>> > $Conf{RsyncSshArgs} is a new 4.0 setting, and $Conf{RsyncClientCmd}
>> > and $Conf{RsyncClientRestoreCmd} are no longer used.  configure.pl
>> tries to
>> > extract a sensible default setting for $Conf{RsyncSshArgs} from
>> > $Conf{RsyncClientCmd}.
>> >
>> > The potential problems are that there are per-client overrides for these
>> > settings (which is not checked by configure.pl), and the computed
>> value for
>> > $Conf{RsyncSshArgs} isn't correct.
>>
>> I'm guessing something went wrong. Either you have per-client overrides or
>> the value of RsyncSshArgs is computed incorrectly. What was your (V3)
>> RsyncClientCmd, what is your (V4) RsyncSshArgs?
>>
>> Regards,
>> Holger
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> 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/
>>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___