[mythtv-users] mythbuntu db backups
Thomas Mashos
thomas at mashos.com
Fri Oct 30 13:49:29 UTC 2015
On Fri, Oct 30, 2015, 6:40 AM Daryl McDonald <darylangela at gmail.com> wrote:
> On Thu, Oct 29, 2015 at 11:55 PM, Mark Perkins <perkins1724 at hotmail.com>
> wrote:
>
>>
>>
>>
>>
>> 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*?
>>
>
> Yes, or more properly a directory.
>
>>
>> What is the location of that folder (containing the backups)?
>>
>
> /media/storage/Dropbox, I caused this through MCC quite some time ago, and
> now that I see eleven ".tar.gz's" in there I bet they're not rotating, but
> accumulating as a result of a "rsync restore" I did, I'd guess eleven days
> ago.
>
>>
>> What is the output of:
>> ls -al /etc/cron*
>>
>
> trieli at mythtv:~$ ls -al /etc/cron*
> -rw-r--r-- 1 root root 722 Feb 9 2013 /etc/crontab
>
> /etc/cron.d:
> total 32
> drwxr-xr-x 2 root root 4096 Apr 16 2014 .
> drwxr-xr-x 142 root root 12288 Oct 30 09:30 ..
> -rw-r--r-- 1 root root 188 Feb 19 2014 anacron
> -rw-r--r-- 1 root root 139 Oct 20 2014 mythbuntu-bare
> -rw-r--r-- 1 root root 510 Jul 7 2014 php5
> -rw-r--r-- 1 root root 102 Feb 9 2013 .placeholder
>
> /etc/cron.daily:
> total 112
> drwxr-xr-x 2 root root 4096 Oct 28 13:15 .
> drwxr-xr-x 142 root root 12288 Oct 30 09:30 ..
> -rwxr-xr-x 1 root root 311 Feb 19 2014 0anacron
> -rwxr-xr-x 1 root root 625 Jul 22 2014 apache2
> -rwxr-xr-x 1 root root 376 Apr 4 2014 apport
> -rwxr-xr-x 1 root root 15481 Apr 10 2014 apt
> -rwxr-xr-x 1 root root 355 Jun 4 2013 bsdmainutils
> -rwxr-xr-x 1 root root 384 Mar 23 2014 cracklib-runtime
> -rwxr-xr-x 1 root root 256 Mar 7 2014 dpkg
> -rwxr-xr-x 1 root root 2211 Jan 6 2014 locate
> -rwxr-xr-x 1 root root 372 Jan 22 2014 logrotate
> -rwxr-xr-x 1 root root 1261 Apr 10 2014 man-db
> -rwxr-xr-x 1 root root 435 Jun 20 2013 mlocate
> -rwxr-xr-x 1 root root 2069 Feb 3 2014 mythexport
> -rwxr-xr-x 1 root root 448 Mar 25 2015 mythtv-database
> -rwxr-xr-x 1 root root 1110 Feb 6 2015 ntp
> -rwxr-xr-x 1 root root 831 Nov 22 2014 optimize_mythdb
> -rwxr-xr-x 1 root root 831 Feb 17 2015 optimize_mythdb.pl
> -rwxr-xr-x 1 root root 249 Feb 16 2014 passwd
> -rw-r--r-- 1 root root 102 Feb 9 2013 .placeholder
> -rwxr-xr-x 1 root root 2417 May 13 2013 popularity-contest
> -rwxr-xr-x 1 root root 214 Apr 9 2014 update-notifier-common
> -rwxr-xr-x 1 root root 328 Jul 18 2014 upstart
>
> /etc/cron.hourly:
> total 20
> drwxr-xr-x 2 root root 4096 Apr 16 2014 .
> drwxr-xr-x 142 root root 12288 Oct 30 09:30 ..
> -rw-r--r-- 1 root root 102 Feb 9 2013 .placeholder
>
> /etc/cron.monthly:
> total 24
> drwxr-xr-x 2 root root 4096 Apr 16 2014 .
> drwxr-xr-x 142 root root 12288 Oct 30 09:30 ..
> -rwxr-xr-x 1 root root 313 Feb 19 2014 0anacron
> -rw-r--r-- 1 root root 102 Feb 9 2013 .placeholder
>
> /etc/cron.weekly:
> total 48
> drwxr-xr-x 2 root root 4096 Oct 26 13:15 .
> drwxr-xr-x 142 root root 12288 Oct 30 09:30 ..
> -rwxr-xr-x 1 root root 312 Feb 19 2014 0anacron
> -rwxr-xr-x 1 root root 730 Feb 23 2014 apt-xapian-index
> -rwxr-xr-x 1 root root 427 Apr 16 2014 fstrim
> -rwxr-xr-x 1 root root 771 Apr 10 2014 man-db
> -rwxr-xr-x 1 root root 448 Apr 17 2014 mythtv-database
> -rwxr-xr-x 1 root root 448 Apr 17 2014 mythtv-database~
> -rw-r--r-- 1 root root 102 Feb 9 2013 .placeholder
> -rwxr-xr-x 1 root root 211 Apr 9 2014 update-notifier-common
> trieli at mythtv:~$
>
>
>> _______________________________________________
>> 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
>>
>> _______________________________________________
> 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
>
/etc/cron.d/mythbuntu-bare is the file. You can delete that
--
Thomas Mashos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20151030/b5e125d2/attachment.html>
More information about the mythtv-users
mailing list