[mythtv-users] running mythconverg_backup.pl as non-mythtv user

Joey Morris rjmorris at nc.rr.com
Mon Aug 20 02:34:21 UTC 2012


"Michael T. Dean" <mtdean at thirdcontact.com> wrote on Sun, Aug 19, 2012 at 08:33:22PM -0400:
> On 08/19/2012 12:11 PM, Joey Morris wrote:
> >Is it recommended to run the backup script as the mythtv user? If I do
> >run it as a non-mythtv user, is there a better way to make it work
> >than the workarounds I used?
> 
> It can be run as any system user, as long as a valid
> $HOME/.mythtv/config.xml is provided.  Generally, the idea is that
> you wouldn't have a username/password specified in your MySQL
> options file.
> 
> I'm using --defaults-extra-file so that a) we don't pass
> username/password on the command line, and b) users can specify
> other options in MySQL options file (or, more likely, pick up the
> appropriate ones from their system install).  Using --defaults-file,
> it will use only the specified file to pick up all configuration
> (which could break mysqldump on many systems).
> 
> If you really want/need the password in your MySQL options file, the
> approaches I can think of are to a) change the backup script, b)
> change your MySQL options file (i.e. have a script rename the
> with-password options file, then put a without-password options file
> in place, run the backup, then put the options file back how it
> should be for other stuff), or c) use a different user that can be
> configured without the password in the options file.

Thanks for the explanation and suggestions, Mike. This all makes
sense. I'm not exactly sure which direction I'm going to go, but I
think running it as my mythtv user (who doesn't have the password in
~/.my.cnf) will be the most straightforward approach.


More information about the mythtv-users mailing list