[mythtv-users] mythbuntu db backups
Mark Perkins
perkins1724 at hotmail.com
Fri Oct 30 03:55:02 UTC 2015
> On 30 Oct 2015, at 11:42 am, Daryl McDonald <darylangela at gmail.com> wrote:
>
>
>
>> On Thu, Oct 29, 2015 at 8:35 PM, Stephen Worthington <stephen_agent at jsw.gen.nz> wrote:
>> On Thu, 29 Oct 2015 18:48:22 -0400, you wrote:
>>
>> >Greetings Mythizens, in a manual housekeeping effort I've discovered a file
>> >with ten recent mythbuntu db backups in it, I don't use Mythbuntu Control
>> >Center any more so these are dead weight. Can anyone offer a suggestion on
>> >stopping this log rotate process cleanly, I imagine deleting the target
>> >file would cause subterranean problems at some point. I'm quite happy with
>> >the Mythconverg backups and I'm running mythtv 0.27 fixes in a Ubuntu 14.04
>> >desktop environment. Grazie.
>>
>> As far as I know, the only backup rotation is done by the backup
>> script:
>>
>> /usr/share/mythtv/mythconverg_backup.pl
>>
>> which is called from:
>>
>> /etc/cron.weekly/mythtv-database
>
> Yes I have Mythconverg running with a five backup logrotate
>>
>> All it does is to do individual backups to files with the date in the
>> name, and then delete the oldest when it does a new backup and there
>> are too many backups already present in the destination directory.
>>
>> There is no software I know of in Mythbuntu 14.04 that will create a
>> file that has multiple backups in it.
>
> Previously I used MCC to generate "Mythbuntu backups, not Mythconverg backups
>>
>> The standard place the backups are put is:
>>
>> /var/lib/mythtv/db_backups/
>
> and they are translocated, my bad
>>
>> If they are anywhere else, it is something you have done. I have set
>> up daily backups to a network drive, and moved my normal weekly
>> backups to a different drive on my backend.
>>
>> Exactly how are the multiple backups stored in the file you found? Are
>> they compressed in some form of archive file? What is the timestamp
>> on the file? Making backups, or archiving them, takes a while, so you
>> may be able to find out what is doing it by being around at the time
>> that file is altered, and getting a full process list, and seeing what
>> is actually creating the file:
>
> Yes compressed and one for each of the last ten days
>>
>> ps -ef >processes.txt
>>
>> If it is happening at a bad time of day, you can schedule that command
>> to happen.
>
> Timing is not the issue I just want to eradicate the process creating them because the Mythconverg backups are sufficient and the Mythbuntu unnecessary.
>
>
>> To do that, I use a little script called sleepuntil that I
>> found on the net. I have it in /usr/local/bin:
>>
>> #!/bin/bash
>> set -o nounset
>>
>> ### // Sleep until some date/time.
>> # // Example: sleepuntil 15:57; kdialog --msgbox "Backup needs to be
>> done."
>>
>>
>> error() {
>> echo "$@" >&2
>> exit 1;
>> }
>>
>> NAME_PROGRAM=$(basename "$0")
>>
>> if [[ $# != 1 ]]; then
>> error "ERROR: program \"$NAME_PROGRAM\" needs 1 parameter and it
>> has received: $#."
>> fi
>>
>>
>> CURRENT=$(date +%s)
>> TARGET=$(date -d "$1" +%s)
>>
>> SECONDS=$(($TARGET - $CURRENT))
>>
>> if [[ $SECONDS < 0 ]]; then
>> error "You need to specify in a different way the moment in which
>> this program has to finish, probably indicating the day and the hour
>> like in this example: $NAME_PROGRAM \"2009/12/30 10:57\"."
>> fi
>>
>> sleep "$SECONDS"
>>
>> # // End of file
>>
>>
>> So you would do a command like:
>>
>> sleepuntil 03:00; ps -ef >processes.txt
>> _______________________________________________
>> 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
>
> I'd rather not reinstall MCC just to stop that process if there is a command line solution.
>
> _______________________________________________
Daryl I assume you mean 10 backups in a *folder* not *file*?
What is the location of that folder (containing the backups)?
What is the output of:
ls -al /etc/cron*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20151030/c67abfce/attachment.html>
-------------- next part --------------
_______________________________________________
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
More information about the mythtv-users
mailing list