Backup SQL
Hi I have a query is i have taken backup from druapl due to timeout error in three backup files a-l.sql m-s.sql t-z.sql Now my understanding is if i do mysql -u kaushal -h example.com -p drupal /home/kaushal/drupal/new/a-l.sql and then do mysql -u kaushal -h example.com -p drupal /home/kaushal/drupal/new/m-s.sql will it overwrite a-l.sql command insertion in the database Please Let me know if you need more information on this Thanks and Regards Kaushal -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup SQL
On Friday 04 August 2006 04:04 am, Kaushal Shriyan wrote: mysql -u kaushal -h example.com -p drupal /home/kaushal/drupal/new/a-l.sql and then do mysql -u kaushal -h example.com -p drupal /home/kaushal/drupal/new/m-s.sql Better would be: mysql -u kaushal -h example.com -p drupal ~/drupal/new/a-l.sql mysql -u kaushal -h example.com -p drupal ~/drupal/new/m-s.sql Couple of things, first off ~/ expands to /home/kaushal assuming you're running this as the kaushal user. If root, you can do ~kaushal/ to achieve the same effect. Next is which means run the next command only if the first command finishes successfully. To answer what I think was your original question, no, m-s.sql wouldn't interfere with a-l.sql's insertions because they run in sequence, first a-l, then m-s. The only time I'd really see this as an issue is if you were trying to run both at once, which in my opinion is a Bad Idea(tm). -- Chris White PHP Programmer/DBeer Interfuel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup SQL
On 8/4/06, Chris White [EMAIL PROTECTED] wrote: On Friday 04 August 2006 04:04 am, Kaushal Shriyan wrote: mysql -u kaushal -h example.com -p drupal /home/kaushal/drupal/new/a-l.sql and then do mysql -u kaushal -h example.com -p drupal /home/kaushal/drupal/new/m-s.sql Better would be: mysql -u kaushal -h example.com -p drupal ~/drupal/new/a-l.sql mysql -u kaushal -h example.com -p drupal ~/drupal/new/m-s.sql Couple of things, first off ~/ expands to /home/kaushal assuming you're running this as the kaushal user. If root, you can do ~kaushal/ to achieve the same effect. Next is which means run the next command only if the first command finishes successfully. To answer what I think was your original question, no, m-s.sql wouldn't interfere with a-l.sql's insertions because they run in sequence, first a-l, then m-s. The only time I'd really see this as an issue is if you were trying to run both at once, which in my opinion is a Bad Idea(tm). What if each .sql contains a DROP TABLE IF EXISTS statement at the start? Something to be carefull if its the program that generated the backup likes to add this tags. -- Daniel da Veiga Computer Operator - RS - Brazil -BEGIN GEEK CODE BLOCK- Version: 3.1 GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V- PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++ --END GEEK CODE BLOCK-- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup SQL
On Friday 04 August 2006 10:35 am, Daniel da Veiga wrote: What if each .sql contains a DROP TABLE IF EXISTS statement at the start? Something to be carefull if its the program that generated the backup likes to add this tags. What if my website code breaks? This train of what if type questions can easily be answered by a quick skim through the sql before running it. If you believe that to be tiresome, think of how long it's going to take you to get order from chaos when things go down. -- Chris White PHP Programmer/DBirth Interfuel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup SQL
On 8/4/06, Chris White [EMAIL PROTECTED] wrote: On Friday 04 August 2006 10:35 am, Daniel da Veiga wrote: What if each .sql contains a DROP TABLE IF EXISTS statement at the start? Something to be carefull if its the program that generated the backup likes to add this tags. What if my website code breaks? This train of what if type questions can easily be answered by a quick skim through the sql before running it. If you believe that to be tiresome, think of how long it's going to take you to get order from chaos when things go down. I dont know exactly what's the purpose of your message. I was just warning the OP that he should take a look at the SQL before running it, not taking your advice blindly: To answer what I think was your original question, no, m-s.sql wouldn't interfere with a-l.sql's insertions because they run in sequence, first a-l, then m-s. You're wrong, they may run in sequence and still, m-s can interfer in what a-l has done, it all depends on the program used to generate the sql and the defaults it put (create tables, drop tables if exist or a simple sequence of the sql generated in a-l). Think better before you hit send. -- Daniel da Veiga Computer Operator - RS - Brazil -BEGIN GEEK CODE BLOCK- Version: 3.1 GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V- PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++ --END GEEK CODE BLOCK-- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Backup SQL
If you're using Myphpadmin, you can turn this option off when generating the dump file. -Original Message- From: Chris White [mailto:[EMAIL PROTECTED] Sent: Friday, August 04, 2006 12:14 PM To: mysql@lists.mysql.com Subject: Re: Backup SQL On Friday 04 August 2006 10:35 am, Daniel da Veiga wrote: What if each .sql contains a DROP TABLE IF EXISTS statement at the start? Something to be carefull if its the program that generated the backup likes to add this tags. What if my website code breaks? This train of what if type questions can easily be answered by a quick skim through the sql before running it. If you believe that to be tiresome, think of how long it's going to take you to get order from chaos when things go down. -- Chris White PHP Programmer/DBirth Interfuel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup SQL
On Friday 04 August 2006 11:26 am, Daniel da Veiga wrote: Think better before you hit send. Dude -- -- Chris White PHP Programmer/DBarn Interfuel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]