Ticket #4613: mythtv-database_backups_on_master_backend_startup.patch

File mythtv-database_backups_on_master_backend_startup.patch, 630 bytes (added by sphery <mtdean@…>, 16 years ago)

Though it could corrupt recordings if the master backend is restarted when a slave backend is recording, this makes it easy to test the DB backup functionality and might be useful for some users.

  • libs/libmythtv/dbcheck.cpp

    old new  
    448448    }
    449449
    450450    if (dbver == currentDatabaseVersion)
     451    {
     452        if (gContext->IsMasterBackend())
     453        {
     454            if (!dbutil.BackupDB())
     455                VERBOSE(VB_IMPORTANT, "Unable to backup database.");
     456        }
    451457        return true;
     458    }
    452459
    453460    if (!dbutil.BackupDB())
    454461        VERBOSE(VB_IMPORTANT, "Unable to backup your database.  If you have "