[mythtv-users] 5 Db rotate

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Nov 23 01:44:56 UTC 2014


On Sat, 22 Nov 2014 17:57:27 -0500, you wrote:

>On Sat, Nov 22, 2014 at 12:02 PM, Bill Meek <keemllib at gmail.com> wrote:
>
>> On 11/22/2014 08:23 AM, Daryl McDonald wrote:
>>
>>> Greetings Mythizens, I remember in previous setups having the 5 latest Db
>>> backups kept in /var/lib/mythtv/db_backups. That's not happening now, I am
>>> getting mythbuntu backups as a result of MCC, but they don't rotate, I go
>>> in and cull once in a while. From looking at the wiki I have the backup
>>> and
>>> restore scripts in /usr/share/mythtv, and I echo'd the location I want the
>>> backups to land in, my question is how do I set the frequency to daily and
>>> select the time? IIRC this used to happen without a cron job.
>>> Sort of related the box doesn't wakeup for Db backups or MFDB's is this
>>> even possible?     TIA Daryl
>>>
>>
>> The only automatic backups done by the backend are when the schema changes,
>> or for most users, when they upgrade. (I'd like to know if I'm wrong about
>> that.)
>>
>> Like the other replies, I too use a cron script. So, I'd run it manually
>> and see what the output says. Probably like this:
>>
>>     sudo /etc/cron.weekly/mythtv-database
>>
>> but your path/name may be different, so if the above doesn't work, look
>> for the right answer in /etc/cron*/*myth* . Don't just run any file you
>> find, look at its contents to be sure it's doing a backup.
>>
>> --
>> Bill
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>>
>
>OK, so now I do find weekly mythconverg backups in
>/media/storage/mythtv/db_backups, I was certain that folder was empty last
>time I checked but there are five backups in there a week apart. How do I
>make these daily? And how do I make them go to
>/media/storage2/mythtv/Dropbox?

As I already posted, in Mythbuntu just copy (or move) the
/etc/cron.weekly/mythtv-database script from there to /etc/cron.daily
to make the backups daily.  And see my modified
/etc/cron.daily/mythtv-database script for how to add the --directory
option for changing the directory it stores to.  I have both the daily
and weekly backups, with the weekly ones going to the local hard
drives and the daily ones going to another PC on my network.  If you
have both daily and weekly backups, then they probably should be
stored in different directories.

I took a look at the source code of mythconverg_backup.pl, and if the
backup directory is not specified on the command line with the
--directory option, and is not specified in the ~/.mythtv/backuprc
file with the DBBackupDirectory option, then the script looks up the
database and takes the directory from the "DB Backups" entry in the
storagegroup table.  If there is no "DB Backups" entry in the
storagegroup table, it then looks up the "Default" entries in the
storagegroup table and uses the first of those which actually exists
as a directory as where the backups will go.  The "Default" entries
are the storagegroups where you have specified your recordings are to
be stored if you do not specify a specific storagegroup in your
recording rules.


More information about the mythtv-users mailing list