<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 11/24/2019 9:55 PM, Don Brett wrote:<br>
</div>
<blockquote type="cite"
cite="mid:68c5876e-c18b-0877-a178-f2839cd58c5b@zoominternet.net">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">On 11/24/2019 2:36 PM, Mike Bibbings
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:5860ec7e-2ea6-203f-817f-7c6b20e07f25@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<div class="moz-cite-prefix">On 24/11/2019 18:47, Don Brett
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f4c87b2d-0b23-8345-37d5-46a7ee1164f7@zoominternet.net">On
11/24/2019 10:08 AM, Mike Bibbings wrote: <br>
<blockquote type="cite">On 24/11/2019 14:30, Don Brett wrote:
<br>
<blockquote type="cite">Does Mythtv do automatic database
backups, or do I need to setup my own cron job? Years
ago, I thought it did it by itself. <br>
<br>
Don <br>
<br>
</blockquote>
The packaged versions of mythtv e.g. on Ubuntu should
automatically do a backup weekly, keeping the last 5
backups. <br>
<br>
Note there is a bug in mythtv 30 in that the backup fails. <br>
<br>
This has been fixed in mythtv master (31pre). <br>
<br>
If you want a weekly backup, replace the contents of file
/etc/cron.weekly/mythtv-database <br>
<br>
with the contents from <a class="moz-txt-link-freetext"
href="https://github.com/MythTV/packaging/blob/master/deb/debian/mythtv-database.cron.weekly"
moz-do-not-send="true">https://github.com/MythTV/packaging/blob/master/deb/debian/mythtv-database.cron.weekly</a><br>
<br>
Personally, I put the corrected mythtv-database file in
/etc/cron.daily/ for a daily backup. <br>
<br>
<br>
Mike <br>
<br>
<br>
_______________________________________________ <br>
mythtv-users mailing list <br>
<a class="moz-txt-link-abbreviated"
href="mailto:mythtv-users@mythtv.org"
moz-do-not-send="true">mythtv-users@mythtv.org</a> <br>
<a class="moz-txt-link-freetext"
href="http://lists.mythtv.org/mailman/listinfo/mythtv-users"
moz-do-not-send="true">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a>
<br>
<a class="moz-txt-link-freetext"
href="http://wiki.mythtv.org/Mailing_List_etiquette"
moz-do-not-send="true">http://wiki.mythtv.org/Mailing_List_etiquette</a>
<br>
MythTV Forums: <a class="moz-txt-link-freetext"
href="https://forum.mythtv.org" moz-do-not-send="true">https://forum.mythtv.org</a>
<br>
</blockquote>
<br>
I added the updated script to /etc/cron.daily. It runs
manually, but not sure how to get cron to run it on demand for
a test. I'm happy to wait until tomorrow to see the results.
By the way, it doesn't look like the script does the rotate
feature, it that done somewhere else, or do I need to add
something? <br>
<br>
Don <br>
</blockquote>
<p><br>
</p>
<p>The mythtv-database script calls
/usr/share/mythtv/mythconverg_backup.pl which has a built-in
default of 5 for backups to keep.</p>
<p>To test manually, this will force all cron.daily jobs to be
run:</p>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana,
Arial, Helvetica, sans-serif; font-size: 13.3333px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(230, 230, 230); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">sudo run-parts /etc/cron.daily</span></p>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana,
Arial, Helvetica, sans-serif; font-size: 13.3333px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(230, 230, 230); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">and check that a new database
backup has been created.</span></p>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana,
Arial, Helvetica, sans-serif; font-size: 13.3333px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(230, 230, 230); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;"><br>
</span></p>
<p><span style="color: rgb(0, 0, 0); font-family: Verdana,
Arial, Helvetica, sans-serif; font-size: 13.3333px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(230, 230, 230); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">Mike<br>
</span></p>
<p>sudo anacron -n -d -f<br>
<br>
</p>
</blockquote>
Hmmm, when running "sudo run-parts /etc/cron.daily", but prompt
goes away for a few seconds and comes right back; nothing new
created. Backup on this box usually takes about 30 + seconds. I
assumed cron's schedule was satisfied for the day, so wouldn't run
it again.<br>
<br>
Running anacron also returns pretty quickly (under 5 seconds):<br>
<br>
don@johnny:~$ sudo anacron -n -d -f<br>
Anacron 2.3 started on 2019-11-24<br>
Will run job `cron.daily'<br>
Will run job `cron.weekly'<br>
Will run job `cron.monthly'<br>
Jobs will be executed sequentially<br>
Job `cron.daily' started<br>
Job `cron.daily' terminated<br>
Job `cron.weekly' started<br>
Job `cron.weekly' terminated<br>
Job `cron.monthly' started<br>
Job `cron.monthly' terminated<br>
Normal exit (3 jobs run)<br>
don@johnny:~$<br>
<br>
I'll let you know if it creates one overnight,<br>
<br>
Don<br>
<br>
</blockquote>
<br>
Apparently, cron doesn't like script file names that have periods.
I had simply dropped "mythtv-database.cron.weekly" into
/etc/cron.daily, but it wouldn't run until I changed it to
mythtv-database-cron-daily. Also added rotate into the command,
directly in the script:<br>
<br>
$CMDPREFIX /usr/share/mythtv/mythconverg_backup.pl --rotate 10<br>
<br>
Looks like it works now. Stephen's script also looks pretty
interesting, but backups aren't going to a network drive at the
moment (they probably should), so I'll circle back when I get to
it. Thanks for all the help,<br>
<br>
Don<br>
<br>
</body>
</html>