View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 5 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Jul 10, 2005 7:07 pm 
Offline
Joined: Sat Apr 10, 2004 8:00 am
Posts: 25
I have a suggestion I'd like to toss around. I think it might be a good idea to consider adding a "-c" parameter to the mysqldump statement in /usr/local/bin/mythbackup.

The -c parameter will cause mysqldump to dump with complete inserts, meaning it will specify the name of the field to insert the data into in each statement. Without it, if the structure of the database changes in field positions or number of fields, the backed up sql will not reimport smoothly. If we use the -c switch, the inserts will be written out so that if any fields are added or moved around in future versions, there is a much better chance of being able to re-use the backed up sql. The only down side is the sql backup file gets somewhat larger, but it might be worth it in this case.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 10, 2005 11:07 pm 
Offline
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location: Sydney, Australia
It is very unlikely that fields would be deleted by a schema update, but this is a good idea. Cesman, can we add this into your "to do" list?

_________________
| Nigel Pearson, nigel.pearson.au@gmail.com
| "Things you own end up owning you" - Tyler, Fight Club


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 11, 2005 4:25 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
This could be a mixed blessing. For example it would cause a problem if they changed a column name (say to correct a mispelling) without changing it's meaning... Kind of six to one, half dozen to the other territory...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 13, 2005 7:13 pm 
Offline
Joined: Sat Apr 10, 2004 8:00 am
Posts: 25
It would seem that it would be more likely that a new field might be added. And sometimes new fields are added in the middle of a table structure to keep similar fields neatly grouped together. But I just wanted to throw it out there anyway...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 13, 2005 8:00 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
My initial thought is 'the backup/restore scripts have worked fine as is', however I'll investigate the -c option.

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 20 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