View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: R5E50 Backup Failure
PostPosted: Fri Sep 14, 2007 5:16 pm 
Offline
Joined: Sun Mar 19, 2006 10:42 am
Posts: 89
Hi all,

Trying to get onto R5F27 before my schedule runs out and I'm having backup failures. First issue was that upon manual checkbackup.sh, the script couldn't find the backup files. New format (for R5E50) should be gzip right? My box makes gzips, then the backup script checks for bzips?? Do I have this backwards? One of my scripts must be old right?

Anyway, whether I convert to the right compression, or modify the check script to check the right types, I then end up with major errors:

Checking for the existance of the backup files...
Both files exist.
Checking the integrity of the tar file compression...
Compression looks OK.

Generating a list of the backup contents...
Generating a list of the directory contents...
Comparing directory versus backup contents...
Live and saved file lists match.

Checking DB dump
Generating a list of tables and record counts in the DB dump...
Generating a list of tables and record counts in the live DB...
Comparing live versus saved tables...
1,79d0
< archiveitems 19
< callsignnetworkmap 0
< capturecard 3
< cardinput 3
< channel 75
< codecparams 240
< credits 12024
< customexample 0
< diseqc_config 0
< diseqc_tree 0
< dtv_multiplex 7
< dtv_privatetypes 49
< dvdinput 8
< dvdtranscode 11
< eit_cache 0
< favorites 0
< filemarkup 4
< gallerymetadata 1
< gamemetadata 2
< gameplayers 5
< housekeeping 5
< inuseprograms 0
< jobqueue 23
< jumppoints 48
< keybindings 417
< keyword 5
< music_albums 377
< music_artists 242
< music_genres 38
< music_playlists 2
< music_smartplaylist_categories 3
< music_smartplaylist_items 8
< music_smartplaylists 8
< music_songs 1134
< music_stats 0
< musicmetadata 1134
< musicplaylist 2
< mythlog 0
< mythweb_sessions 2
< netflix 12
< networkiconmap 0
< newssites 9
< oldfind 52
< oldprogram 20725
< oldrecorded 4135
< people 63144
< phonecallhistory 0
< phonedirectory 1
< pidcache 262
< playgroup 1
< profilegroups 12
< program 7360
< programgenres 9658
< programrating 2263
< recgrouppassword 0
< record 58
< record_tmp 59
< recorded 148
< recordedcredits 1396
< recordedmarkup 1346
< recordedprogram 147
< recordedrating 83
< recordedseek 695860
< recordingprofiles 41
< recordmatch 172
< romdb 0
< schemalock 0
< settings 655
< streams 0
< tvchain 9
< videocategory 2
< videocountry 0
< videogenre 0
< videometadata 78
< videometadatacountry 0
< videometadatagenre 0
< videosource 2
< videotypes 15
< websites 4

Warning, table lists are not identical!

The backup is bad or already out of date!


I have cleared all backup files from the myth/backup directory and still have the same behavior.

Any advice would be much appreciated!

Tks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 5:47 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
Look at the contents of /myth/backup. Make sure you do not have both .bz2 and .gz versions of the backupfiles.

When you run the backup, the script stops the mythtv-backend and mysql. At the end of the script, it restarts the mythtv-backend and mysql. I'm guessing that between the time you run the backup and run the checkbackup scripts, records are being written to the db. After you run the backup script, but before you run the checkbackup script, stop the mythtv-backend and mysql as soon as possible. Then run the checkbackup script.

Code:
# mythbackup && /etc/init.d/mythtv-backend stop && /etc/init.d/mysql stop && checkbackup.sh && /etc/init.d/mysql restart && /etc/init.d/mythtv-backend restart


Copy and paste the above. That should all be on one line. Let us know if that works.

_________________
Mike
My Hardware Profile


Last edited by mihanson on Fri Sep 14, 2007 6:25 pm, edited 2 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 6:09 pm 
Offline
Joined: Sun Mar 19, 2006 10:42 am
Posts: 89
Thanks,

I read about the problems with dual backup types ... and deleted all backup files. Would an unrelated " etc.tar" file cause problems - I did leave that one.

Ran the script that you posted with no luck. This is the end of it:

./etc/phpmyadmin/htaccess
./etc/phpmyadmin/blowfish_secret.inc.php
./etc/phpmyadmin/htpasswd.setup
./etc/nuvexportrc.orig
./var/www/mythweb/.htaccess
Sanity checking your backup...

Checking for the existance of the backup tar file...
Backup tar file exists. Checking the compression...
Compression looks OK. Checking backup tar file contents...
Generating a list of the backup contents...
Generating a list of the directory contents...
Comparing directory versus backup contents...
Live and saved file lists match.

Checking for the existance of the DB dump file...
DB dump file exists. Checking the compression...
Compression looks OK. Checking DB dump contents...
Generating a list of tables and record counts in the DB dump...
Generating a list of tables and record counts in the live DB...
Comparing live versus saved tables...
58c58
< recorded 150
---
> recorded 149
63c63
< recordedseek 696962
---
> recordedseek 696816
Warning, table lists are not identical!

The backup is bad or already out of date!

I would assume that the MFE backup script does NOT starts the backend/mysql before the check ...and it is also failing ...

tks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 6:21 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
Something's accessing the db. Don't watch tv or record anything once you run the backup.

I just realized the code I posted above has a slight problem. At the end I start the backend before mysql. This is how it should look

Code:
# mythbackup && /etc/init.d/mythtv-backend stop && /etc/init.d/mysql stop && checkbackup.sh && /etc/init.d/mysql restart && /etc/init.d/mythtv-backend restart


I've fixed the original.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 6:35 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Mike is right. It looks like you've got something else running while you're trying to make the backup. Have you got multiple BE machines?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 6:55 pm 
Offline
Joined: Sun Mar 19, 2006 10:42 am
Posts: 89
running your command ends in:

./etc/nuvexportrc.orig
./var/www/mythweb/.htaccess
Sanity checking your backup...

Checking for the existance of the backup tar file...
Backup tar file exists. Checking the compression...
Compression looks OK. Checking backup tar file contents...
Generating a list of the backup contents...
Generating a list of the directory contents...
Comparing directory versus backup contents...
Live and saved file lists match.

Checking for the existance of the DB dump file...
DB dump file exists. Checking the compression...
Compression looks OK. Checking DB dump contents...
Generating a list of tables and record counts in the DB dump...
Generating a list of tables and record counts in the live DB...
Comparing live versus saved tables...
Live and saved table lists match.

Backup passes all checks.
Stopping MythTV server: mythbackend .
Stopping MySQL database server: mysqld.
-bash: checkbackup.sh: command not found

After which, trying my ./checkbackup.sh.2
results in:

root@myvcr:/myth/backup# ./checkbackup.sh.2
Checking for the existance of the backup files...
Both files exist.
Checking the integrity of the tar file compression...
Compression looks OK.

Generating a list of the backup contents...
Generating a list of the directory contents...
Comparing directory versus backup contents...
Live and saved file lists match.

Checking DB dump
Generating a list of tables and record counts in the DB dump...
Generating a list of tables and record counts in the live DB...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Comparing live versus saved tables...
Live and saved table lists match.

Backup passes all checks.


Seems like the command hits a problem before restarting mysql??

tks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 7:15 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
jmacmythtv wrote:
After which, trying my ./checkbackup.sh.2
results in:


What is checkbackup.sh.2 ?? :?

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 7:25 pm 
Offline
Joined: Sun Mar 19, 2006 10:42 am
Posts: 89
Sorry ... that is the checkbackup.sh that works without my having to bzip -d then re-gzip my files:

instead of lines 9,10:

BACKUP_TAR="$BACKUP_DIR/savedfiles.tar.bz2"
BACKUP_SQL="$BACKUP_DIR/$DATABASE.sql"

I have;

BACKUP_TAR="$BACKUP_DIR/savedfiles.tar.gz"
BACKUP_SQL="$BACKUP_DIR/$DATABASE.sql.gz"

and on line 31, I changed:

tar jtf /myth/backup/savedfiles.tar.bz2 $BACKUP_LIST | sed '/\/$/s///' |

to
tar ptf /myth/backup/savedfiles.tar.gz $BACKUP_LIST | sed '/\/$/s///' |

tks,
John


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 7:43 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
:roll: Alright I have a more recent backup script than the version in R5E50.... Run this (all on one line and assuming checkbackup.sh.2 is located in your $PATH):

Code:
# mythbackup && /etc/init.d/mythtv-backend stop && checkbackup.sh.2 && /etc/init.d/mysql restart && /etc/init.d/mythtv-backend restart

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 9:05 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Hang on are you grabbing an add on checkbackup.sh script from somewhere? :shock: R5E50 already has one built in called checkbackup which debuted with R5D1. You shouldn't even need to run is as a separate step since the checks should be built into the mythbackup script.

Do this:
Code:
grep check_files_and_tables /usr/local/bin/mythbackup

If it prints:
Code:
if check_files_and_tables $BACKUP_LIST ; then

You've already got it. See the update notes in the second page of the "Taking advantage of the enhanced backup and restore scripts" thread.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 15, 2007 3:59 pm 
Offline
Joined: Sun Mar 19, 2006 10:42 am
Posts: 89
Ahhh! I have been using an old checkbackup.sh that has been in my myth/backup. I thought that there might be a new one but searched for the file "checkbackup.sh" which clearly doesn't spot the "checkbackup" in usr/local/bin.

Interestingly, one claims the backup failed, the other passes ... anyway

Thank you both! I am on my way to an upgrade ...


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 40 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu