Results 1 to 4 of 4

Thread: Database Backup - changing the number of backups saved

  1. #1
    Join Date
    Nov 2009
    Location
    Auckland New Zealand
    Beans
    215
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Database Backup - changing the number of backups saved

    I would like to change the number of backups saved from the default 5.
    I have already moved the mythtv-database script to /etc/cron.daily and it is creating a backup each day.
    I also created a backuprc file with this command:
    Code:
    echo "DBBackupDirectory=/home/mythtv" > ~/.mythtv/backuprc
    and added rotate=21 to it. - i.e.

    DBBackupDirectory=/var/lib/mythtv/db_backups
    rotate=21

    It is still only saving 5 backups.I don't really know if /.mythtv/backuprc is being used.
    14.10 amd64

  2. #2
    Join Date
    Aug 2013
    Location
    West London, UK
    Beans
    181
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Database Backup - changing the number of backups saved

    A stab in the dark.

    Do you know which user the backup is run from?
    Would it be mythtv in which case you may need to put that file under /home/mythtv/.mythtv ?

    Phil

  3. #3
    Join Date
    Aug 2013
    Location
    West London, UK
    Beans
    181
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Database Backup - changing the number of backups saved

    Paul,

    Have you resolved your problem? If not then a few points:

    1. In version 12.04, Mythbuntu was already configured to do backups. Has this been removed in your version, or is that job still being run?

    2. In your posting the code does not match the comment about the edit. If this is making your cron job fail then you may still be seeing the results of the original cron job with its backup parameters, or looking in the wrong place.

    3. I suspect that backuprc also needs to be in the /home/<user running the job>/.mythtv directory. Is that user mythtv?

    4. you may also need a config.xml file or link in that directory. Copy it from ~/.mythtv

    I have chosen to do these backups at closedown with my dedicated FE/BE system. It’s a personal view that these are best done when the database is idle – see autobackup.sh in the wiki if interested.

    Regards
    Phil

  4. #4
    Join Date
    Nov 2009
    Location
    Auckland New Zealand
    Beans
    215
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Database Backup - changing the number of backups saved

    Quote Originally Posted by khPWXxF View Post




    Paul,

    Have you resolved your problem? If not then a few points:

    1. In version 12.04, Mythbuntu was already configured to do backups. Has this been removed in your version, or is that job still being run?

    It was doing backups weekly.I was wanting to increase the frequency from weekly to daily.I moved the mythtv-database script from /etc/cron.weekly to /etc/cron.daily.It is now backingup daily.That part is working.I also wanted to increase the number of db backups saved from the default 5 to 21.I followed the directions in the Mythtv.org wiki ( http://www.mythtv.org/wiki/Database_Backup_and_Restore#Quick_Start ) to create a backuprc file in /home/user(myth)/.mythtv and added the line rotate=21 to it. - I am beginning to think that the context of this line is the problem.

    2. In your posting the code does not match the comment about the edit. If this is making your cron job fail then you may still be seeing the results of the original cron job with its backup parameters, or looking in the wrong place.

    It is doing backups daily which is my intention.

    3. I suspect that backuprc also needs to be in the /home/<user running the job>/.mythtv directory. Is that user mythtv?

    It is in /home/user(myth)/.mythtv is this the user running cron daily jobs?



    4. you may also need a config.xml file or link in that directory. Copy it from ~/.mythtv

    I have chosen to do these backups at closedown with my dedicated FE/BE system. It’s a personal view that these are best done when the database is idle – see autobackup.sh in the wiki if interested.

    Regards
    Phil
    Thanks for your reply - see my comments added to your quote.
    14.10 amd64

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •