Database Optimize/Backup Order

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
jamoody
Junior
Posts: 81
Joined: Mon Aug 18, 2014 4:19 pm
United States of America

Database Optimize/Backup Order

Post by jamoody » Mon May 13, 2019 4:21 pm

I optimize (optimize_mythdb) and backup (mythconverg_backup) my Mythtv database nightly. The question is, which should I do first? Does optimizing potentially corrupt the database (implying backup should be first)? Thanks.

Gribnif
Junior
Posts: 52
Joined: Wed May 14, 2014 12:46 pm
United States of America

Re: Database Optimize/Backup Order

Post by Gribnif » Mon May 13, 2019 8:05 pm

It's perfectly safe to do it in either order. About the only reason I can think of to optimize before backing up is to potentially make the backup a little smaller.

jamoody
Junior
Posts: 81
Joined: Mon Aug 18, 2014 4:19 pm
United States of America

Re: Database Optimize/Backup Order

Post by jamoody » Tue May 14, 2019 1:02 pm

OK, thanks.

User avatar
paulh
Developer
Posts: 412
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Database Optimize/Backup Order

Post by paulh » Wed May 15, 2019 11:54 am

I would do the backup first just in case something should go wrong with optimize_mythdb like it being interrupted with a power cut potentially corrupting the db. At least then you have a clean backup to fall back to.

Post Reply