Post Reply
Posts: 279
Joined: Sun May 11, 2014 6:23 pm
Great Britain


Post by PhilB » Thu Dec 02, 2021 4:42 pm

I' would appreciate help with the api call to get time of last backup:

~/.mythtv/backuprc has this:

I did a backup like this:
/usr/share/mythtv/ --directory /var/lib/mythtv/db_backups --rotate 10
That generated the Dec 2nd database backup.

ls -l /var/lib/mythtv/db_backups/
total 403584
-rw-r--r-- 1 root mythtv 82090017 Nov 1 09:43 mythconverg-1317-20211029014033.sql.gz
-rw-r--r-- 1 root mythtv 82065320 Nov 1 09:43 mythconverg-1317-20211030001033.sql.gz
-rw-r--r-- 1 root mythtv 82234983 Nov 1 09:43 mythconverg-1317-20211030210033.sql.gz
-rw-r--r-- 1 root mythtv 81651918 Nov 1 09:43 mythconverg-1317-20211031224139.sql.gz
-rw-rw-r-- 1 mythtv mythtv 3801844 Nov 6 15:48 mythconverg-1361-20211106154847.sql.gz
-rw-rw-r-- 1 phil mythtv 81411878 Dec 2 15:37 mythconverg-1361-20211202153648.sql.gz

The 1st Nov entries were disk copied from a 'seed' backend and are not relevant; that on 6 Nov I assume was created by the backend installation.

If I invoke api calls I get this: ... LastRunEnd returns an empty string: <String/>

and ... me=_GLOBAL_ returns <String>2021-11-06 16:48:44</String>
GetSettingList shows the same 6 November value.

Can anyone clarify please:
Why is the hostname of _GLOBAL_ required?
Why isn't the new backup recognised?


User avatar
Posts: 1983
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Myth/GetSetting?Key=BackupDBLastRunEnd

Post by bill6502 » Fri Dec 03, 2021 3:22 pm

_GLOBAL_ is used where the hostname in the DB is NULL (not specific to any host,
thus a global setting.)

I see no reference to BackupDBLastRunEnd in the script.
So it appears that it's only used when the backend runs a backup.

Post Reply