Mailing List Archive

Preventing automatic backup on schema upgrade
I am finally about to upgrade my main MythTV box from v30 to v31. But
I will have a problem if it automatically does a database backup when
the schema upgrade happens, as there is not enough room on the system
drive to do a backup there. And a backup takes around 18 minutes to
complete (the backup file is 2.8 Gbytes).

My backups are done by cron.daily and cron.weekly jobs, and use a copy
of mythconverg_backup.pl that I have modified to have an extra option
"--tempfile" which I use to put the temporary .sql file used for the
backup on a spare SSD partition where there is room for it, and where
it has the best possible read and write speed. From the temporary
location, it then gets compressed to the final location for the backup
files, which is on a drive on another PC on the network. So what I
want to be able to do is to run my normal database backup manually
before I do the v30 to v31 upgrade, then get mythtv-setup.real to do
the schema upgrade without doing another backup using the default
settings that would overflow the system partition. Is there a way to
do that?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Preventing automatic backup on schema upgrade [ In reply to ]
On Tue, Oct 6, 2020 at 1:15 AM Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

> I am finally about to upgrade my main MythTV box from v30 to v31. But
> I will have a problem if it automatically does a database backup when
> the schema upgrade happens, as there is not enough room on the system
> drive to do a backup there. And a backup takes around 18 minutes to
> complete (the backup file is 2.8 Gbytes).
>
...


> backup on a spare SSD partition where there is room for it, and where
> it has the best possible read and write speed.
>

My suggestion here would be to relocate your database files to the SSD
permanently, if you have 2.8 gigs to spare on it forever, and then symlink
the original mysql database storage location to the SSD.
https://www.digitalocean.com/community/tutorials/how-to-change-a-mysql-data-directory-to-a-new-location-using-a-symlink
provides
a good walk-through of this.

(As an aside, I don't quite understand why the backup script is so long and
verbose, or written in perl..isn't this process basically a mysqldump of
the appropriate tables?)


Mike
Re: Preventing automatic backup on schema upgrade [ In reply to ]
On Tue, Oct 6, 2020 at 9:35 AM Mike Hodson <mystica@gmail.com> wrote:

> On Tue, Oct 6, 2020 at 1:15 AM Stephen Worthington <
> stephen_agent@jsw.gen.nz> wrote:
>
>> I am finally about to upgrade my main MythTV box from v30 to v31. But
>> I will have a problem if it automatically does a database backup when
>> the schema upgrade happens, as there is not enough room on the system
>> drive to do a backup there. And a backup takes around 18 minutes to
>> complete (the backup file is 2.8 Gbytes).
>>
> ...
>
>
There exists a global setting ("DisableAutomaticBackup") with the help text:
"If enabled, MythTV will not backup the database before upgrades.
You should therefore have your own database backup strategy in place."

Roland
Re: Preventing automatic backup on schema upgrade [ In reply to ]
On Tue, 6 Oct 2020 11:21:44 +0200, you wrote:

>On Tue, Oct 6, 2020 at 9:35 AM Mike Hodson <mystica@gmail.com> wrote:
>
>> On Tue, Oct 6, 2020 at 1:15 AM Stephen Worthington <
>> stephen_agent@jsw.gen.nz> wrote:
>>
>>> I am finally about to upgrade my main MythTV box from v30 to v31. But
>>> I will have a problem if it automatically does a database backup when
>>> the schema upgrade happens, as there is not enough room on the system
>>> drive to do a backup there. And a backup takes around 18 minutes to
>>> complete (the backup file is 2.8 Gbytes).
>>>
>> ...
>>
>>
>There exists a global setting ("DisableAutomaticBackup") with the help text:
>"If enabled, MythTV will not backup the database before upgrades.
>You should therefore have your own database backup strategy in place."
>
>Roland

This looks like just what I need, thank you:

mythtv-setup > Miscellaneous Settings > Disable automatic database
backup

MariaDB [mythconverg]> select * from settings where value like
'%cbackup%';
+------------------------+------+----------+
| value | data | hostname |
+------------------------+------+----------+
| DisableAutomaticBackup | 0 | NULL |
+------------------------+------+----------+
1 row in set (0.00 sec)
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org