[mythtvnz] How to increase the number of DB backups rotated

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Nov 10 01:53:20 GMT 2013


On Sun, 10 Nov 2013 11:40:24 +1300, you wrote:

>Nick Rout suggests in this thread to institute daily DB backups and change  
>the  number of copies saved to a larger number (21)
>
>I have moved the mythtv-database to /etc/cron.daily and it is creating a  
>backup each day.I also created a backuprc file with this command: echo  
>"DBBackupDirectory=/var/lib/mythtv/db_backups" > ~/.mythtv/backuprc and  
>added rotate=21 to it. -i.e.
>
>DBBackupDirectory=/var/lib/mythtv/db_backups
>rotate=21
>
>
>But it is still only saving 5 backups.What have I done wrong?
>
>-Paul

When things are run from cron.daily, I believe they will be run as
root.  So you need to create the backuprc file in /root/.mythtv, not
under your mythtv user.

I took an alternative approach.  I kept the original mythtv-database
entry in cron.weekly, backing up to /var/lib/mythtv/db_backups.  But I
added a modified copy of mythtv-database to my cron.daily directory
that was changed to backup to a CIFS mounted directory on my Windows
box, and still does the default 5 backups there.  So I get 5 weekly
backups on the MythTV box and 5 daily bakups on my Windows box.  I
think it is a really good idea to have backups of my database on a
different drive from the one doing all the hard work on my MythTV box,
so that if it fails suddenly, I still will have a copy of the
database.



More information about the mythtvnz mailing list