[mythtv-users] mythconverg_backup.pl --rotate 10

Richard Morton richard.e.morton at gmail.com
Sun Mar 27 13:06:58 UTC 2011


On 27 March 2011 13:43, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> On 03/27/2011 06:03 AM, Richard Morton wrote:
>> I use the example in the wiki (exact copy and paste from wiki is the
>> subject above) to increase the number of backups; afterall if you are
>> doing an upgrade it automatically creates a new backup and I got to a
>> position where I had forgotten to take a backup of the db backups
>> database before starting upgrades and nearly ran out of backups so I
>> would not have been able to restore to a pre-upgrade state...
>>
>> anyway... I have a cron job running with
>>
>> mythconverg_backup.pl --rotate 20
>>
>> but my directory has... only 9 files in it and of those 4 are from a
>> failed (and aborted) upgrade to 0.24 and 5 of the files are current
>> schema backups; this is dispite the cron job stating keep 20
>> backups...
>>
>> I am on 0.23.1 and mythconverg_backup.pl --help reports v1.0.9
>>
>> any ideas?
>
> mythconverg_backup.pl --rotate 20 --verbose 2>&1 | tee $HOME/backup.log
>
> Then, after capturing the above to find out what's happening, now, make
> sure someone else isn't running the script with conflicting arguments.
> The best way to do so is to ensure you (and all users of the script with
> the same DB backup directory) use a backuprc file with the appropriate
> configuration.
>
> echo "rotate=20" >> $HOME/.mythtv/backuprc
>
> Then, don't specify --rotate on the command line.
>

ok, I'll have a look at that.
As I would class the backup and restore routines as core MythTV maybe
the settings can migrate their way into the new MythSetup routines
that I heard were being developed as a web page??? I am sure people
would forget this setting if I/they ever have to rebuild the server
(again) although I will now copy your comments into my build notes in
any case...

> Also, when MythTV calls the backup script to create the automatic
> backups (when a schema version upgrade takes place), it uses the default
> 5-backup rotate value.  I'll change that so it disables rotate for
> automatic backups (later today).

that would be a nice safety measure.

> Perhaps the last automatic backup just
> deleted all but 5 and you've only done 4 backups since (your DB schema
> was last upgraded)?

nope... upgrade was in December...

myth at myth-server:~$ ls /var/lib/mythtv/backups
mythconverg-1254-20110324074451.sql.gz  mythconverg-1257-20101230215511.sql.gz
mythconverg-1254-20110325033801.sql.gz  mythconverg-1257-20101230220029.sql.gz
mythconverg-1254-20110326033802.sql.gz  mythconverg-1257-20101230222200.sql.gz
mythconverg-1254-20110327033802.sql     mythconverg-1257-20101231033801.sql.gz
mythconverg-1257-20101230214605.sql.gz
myth at myth-server:~$

R


More information about the mythtv-users mailing list