[mythtv] Ticket #4760: Use a script for the database backup
Nigel Pearson
nigel at ind.tansu.com.au
Mon Mar 10 01:15:42 UTC 2008
> So, you mean leave the current code in place and add code to run the
> backup through a script?
Yep.
...
> I'm not sure what you mean by "requiring an installed script
> to circumvent an accidental upgrade". If there is no script,
> the upgrade is allowed to continue
Sure, but at the moment it _also_ generates a backup.
Even if I run ./programs/mythfrontend/mythfrontend
without having done make install first.
...
> (And, funny you're concerned over a
> backup not occurring as most of the feedback I've gotten on the backup
> patch has been, "We really need a setting to disable these
> backups." :)
Heh. Yes, I was originally of the
"What's this extra crap?" mindset,
but lately, knowing there are some
extra backup files has had a calming
effect every time I run a new client
against an old backend :-)
I'm not strongly against having a script.
It is only one extra file somewhere
in the Mac OS Myth*.app bundles.
It just seems to be a lot of work
for little gain?
> this brings me to something I was thinking about the other day.
> We currently enable automatic schema upgrades for the backend or
> mythtv-setup when we determine the user is running myth* in an
> non-interactive shell. If the idea is to prevent accidental upgrade,
> this could easily fail. If, however, we included a "-u" argument,
> as in
> mythfrontend, then the user can choose to put it in start scripts (and
> bear all responsibility for accidental upgrades) rather than our
> assuming they want to upgrade since the shell is non-interactive.
1) Agree that non-int.-auto.upgrade is bad.
I only coded the to keep the current behaviour.
2) Running mythtv-setup in a non-interactive shell
shouldn't matter. If there is no GUI, MythContext
will never get created, and the upgrade will not happe,
3) Having mythbackend -u seems reasonable.
(but in the interests of reducing
un-necessary command-line args,
why not just set DBSchemaAutoUpgrade=1)
> BTW, you can find a copy of the current backup script at
> http://misc.thirdcontact.com/MythTV/database_mythconverg_backup.pl
% perl ~/Desktop/database_mythconverg_backup.pl
Unquoted string "gzip" may clash with future reserved word at /Users/
nigel/Desktop/database_mythconverg_backup.pl line 689.
String found where operator expected at /Users/nigel/Desktop/
database_mythconverg_backup.pl line 689, near "gzip
"$backup_conf{'directory'}/$backup_conf
{'filename'}""
(Do you need to predeclare gzip?)
syntax error at /Users/nigel/Desktop/database_mythconverg_backup.pl
line 689, near "gzip
"$backup_conf{'directory'}/$backup_conf
{'filename'}""
Execution of /Users/nigel/Desktop/database_mythconverg_backup.pl
aborted due to compilation errors.
Changing the line to:
$result = new IO::Compress::Gzip
gets past it, but I don't know what it does
on machines with that module installed.
(OO-perl is still an un-natural beast to me)
--
Nigel Pearson, nigel at ind.tansu.com.au|Well, I own the hotel
Telstra Net. Eng., Sydney, Australia | and I also live in it.
Office: 9202 3900 Fax: 9261 3912 |My life is very much
Mobile: 0408 664435 Home: 9792 6998 | like Monopoly
More information about the mythtv-dev
mailing list