BackupPC-users

Re: [BackupPC-users] Need run-time variable substitution for SSH username

2014-02-27 13:56:06
Subject: Re: [BackupPC-users] Need run-time variable substitution for SSH username
From: "Bhaskar S. Manda" <bhaskarsmanda AT gmail DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Thu, 27 Feb 2014 12:54:29 -0600
On Mon, Feb 17, 2014 at 6:57 PM, Holger Parplies <wbppc AT parplies DOT de> wrote:
Bhaskar S. Manda wrote on 2014-02-17 15:56:59 -0600 [[BackupPC-users] Need run-time variable substitution for SSH username]:

> Instead, the suggested RsyncClientCmd and RsyncClientRestoreCmd
> use the username 'root' , as follows.
>    $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath
> $argList+';

.... If you change the user
name, it generally will not work, because you either need to add (and
configure!) a 'sudo' invocation or something similar for privilege escalation,
or define your backup set to be completely readable by the user of choice.

My use case is to backup production machines, on which we are generally working as a production user (like 'prod'), so it makes sense to run the backups as that user, without having to define additional users (like backuppc). There are also some Windows machines which are backed up using the ssh+rsync+tsched+vshadow recipe, where the more natural user name is Administrator and not root. Whereas I was conflating  the backup user's name on the client with the users to notify, there is still the issue that there is a 3rd piece of information that is currently custom-configured in the RsyncClient* commands. 

All of that said, you *can* configure the user name to be used in
~backuppc/.ssh/config (on the BackupPC server), e.g.
Host backup-client-1
        User backup-user-name-1

I didn't know you could do this, and this seems to be an ideal solution! There is special set-up needed to use SSH anyway (such as authorized_users for password-less logins) , so the client username becomes another thing to configure in that step.

 
> I request that things be simplified by doing a variable substitution for
> $sshLogin [...]

If at all this is considered, it should *not* be called $sshLogin, because
that's not what the value means. It's $emailUserName or perhaps $backupOwner.

Perhaps the variable names should be more explicit :) 

--
Bhaskar S. Manda
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
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/
<Prev in Thread] Current Thread [Next in Thread>