[mythtv-users] Manual mythconverg_backup.pl run goes to dir in backuprc, cron run doesn't

Michael T. Dean mtdean at thirdcontact.com
Tue Jan 17 21:17:18 UTC 2012


On 01/17/2012 03:36 PM, Kris B. wrote:
> On Tue, Jan 17, 2012, at 02:55 PM, Ian Evans wrote:
>> Scratching my head here. Was looking at my files and noticed that my
>> database appeared not be be backed up in months despite there being a
>> daily run in my cron.
>>
>> I ran mythconverg_backup.pl manually and the new file did show up on
>> the drive specified in backuprc.
>>
>> I did a "locate" and found out that my backups were indeed happening
>> daily, but not at the location specified in backuprc which is
>> "DBBackupDirectory=/storage1/mythbackups".
>>
>> Instead they were going to: /var/lib/mythtv/db_backups
>>
>> Why would they be going there instead of the location I specified? And
>> why would they go to the backuprc location when I run manually and not
>> when cron runs it?
> I had this happen to me, and it was because I was running cron as root,
> while my backuprc was as my normal day to day user.  Also, specifying
> which user to run it in cron.daily folder didn't help - I had to make my
> cron using the cron command, which cleared it up.
>

Yeah, you likely need to ensure the HOME environment variable is set 
when running the command, such that $HOME/.mythtv/backuprc is valid (and 
accessible/readable by the user running the command).

Mike


More information about the mythtv-users mailing list