Thanks, i wondered while i was in bed do i really need to create a smaller version of the database on the development server before i upload or would it be better to just dump remotely from the live server. i want the upload to be smooth to reduce any downtime when i do the upload. So i came up with this (ignore the drop database i will change it when i reverse engineer your script)
If you see i added the tables to the dump like suggested. I will try to remove the dropping database from root now
---------- Post updated at 02:40 AM ---------- Previous update was at 01:33 AM ----------
Ok i get what your script does and have altered my script to drop the tables i want to drop rather than using show tables and dropping them all
Does that seem alright?
Last edited by timgolding; 12-12-2012 at 05:48 AM..
I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated.
Input:
test_data_1
1 2 90%
4 3 91%
5 4 90%
6 5 90%
9 6 90%
test_data_2
3 5 92%
5 4 92%
7 3 93%
9 2 92%
1 1 92%
...
Output:... (7 Replies)
OS: Linux ambglx02 2.6.16.60-0.21-default #1 Tue May 6 12:41:02 UTC 2008 i686 i686 i386 GNU/Linux
Shell: bash
Currently I have a mysqldump script to backup my mysql database, the command is as below:
/opt/novell/mysql/bin/mysqldump --add-drop-table -u root -p -h mydb > /home/john/mydb.sql
... (5 Replies)
hi,
I need to backup a database but I'm getting the error "bus error - core dumped" just after I run mysqldump command.
The server has installed solaris 9.
Any help would be appreciated (3 Replies)
Hi All,
I have a data calculation process-a perl script running each and every hour which will do some calculations on the data stored in a mysql server. Normally it tooks around 2minutes (max) to complete.
But in case if i did any actions on the linux box where the database is... (7 Replies)
I want to take a backup of a database and redirect the output of the whole process to a log file. I am using the below command:
mysqldump -A --add-drop-table > mysql-daily-backup.sql &> /tmp/backup_log/mysql.log
Is there anything wrong with the syntax?
---------- Post updated at 08:32 PM... (0 Replies)
My crontab file tells cron to run a certain shell script at 10:30 AM every day. The shell script backs up my database with mysqldump and then runs a sed script that does some editing of the backup file.
I have programmed the shell script to write an error message to a file I have in my home... (1 Reply)
I have a very simple script that uses a cron job to take a daily backup of our orders database.
echo "Dumping ORDERS database";
mysqldump -u root --password='mypassword' -h '1.1.1.1' --opt --compress ORDERS $tbl_names > /Volumes/Files_Backup_1/db_backups/orders.sql
echo "Copied database to... (2 Replies)
Hi @ all
I need a little bit help with a tricky problem ...
Here´s the situation:
We´ve 2 MySQL-Servers, one is productive, the other is Backup.
At the productive Server there runs every 2 hours a cron Job which does a Dump from MySQL-DB with script 'automysqlbackup.sh' and
copy it then... (7 Replies)
Discussion started by: jackcracker
7 Replies
LEARN ABOUT DEBIAN
mysql::diff::database
MySQL::Diff::Database(3pm) User Contributed Perl Documentation MySQL::Diff::Database(3pm)NAME
MySQL::Diff::Database - Database Definition Class
SYNOPSIS
use MySQL::Diff::Database;
my $db = MySQL::Diff::Database->new(%options);
my $source = $db->source_type();
my $summary = $db->summary();
my $name = $db->name();
my @tables = $db->tables();
my $table_def = $db->table_by_name($table);
my @dbs = MySQL::Diff::Database::available_dbs();
DESCRIPTION
Parses a database definition into component parts.
METHODS
Constructor
new( %options )
Instantiate the objects, providing the command line options for database access and process requirements.
Public Methods
o source_type()
Returns 'file' if the data source is a text file, and 'db' if connected directly to a database.
o summary()
Provides a summary of the database.
o name()
Returns the name of the database.
o tables()
Returns a list of tables for the current database.
o table_by_name( $name )
Returns the table definition (see MySQL::Diff::Table) for the given table.
FUNCTIONS
Public Functions
o available_dbs()
Returns a list of the available databases.
Note that is used as a function call, not a method call.
COPYRIGHT AND LICENSE
Copyright (c) 2000-2011 Adam Spiers. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
SEE ALSO
mysqldiff, MySQL::Diff, MySQL::Diff::Table, MySQL::Diff::Utils
AUTHOR
Adam Spiers <mysqldiff@adamspiers.org>
perl v5.14.2 2012-04-06 MySQL::Diff::Database(3pm)