NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Splitting SQL File?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 12-26-2005, 12:03 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
action012's Avatar
Join Date: Feb 2005
Posts: 347
action012 is just really niceaction012 is just really niceaction012 is just really niceaction012 is just really nice
 



Splitting SQL File?


Is there any good why to split up my backup database .sql file into smaller size.

I backup all of my MySQL Databases to .sql files every night. The problem that I currently see is that some of these backup are now becoming large 5 to 10 megs so if I did need to restore them I would not be able to use phpMyAdmin to restore the backup.

Is there an easy way to split these files into a smaller size that would allow me to restore the database back by just uploading several smaller files?

Maybe a low cost program or script?

Thanks for nay help you can provide.

Steve
__________________
Easy Testimonial Learn more here. || azsoldit.com
action012 is offline  
Old 12-26-2005, 12:39 PM   #2 (permalink)
Eating Pie
 
iNod's Avatar
Join Date: Nov 2004
Location: Canada
Posts: 2,267
iNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud of
 


Special Olympics AIDS/HIV Cystic Fibrosis Save The Children Baby Health Cystic Fibrosis
You could always move seperate backups of each table.. (The big ones) and than make another one of the smaller ones.

iNod.
__________________
I feel old.
iNod is offline  
Old 12-26-2005, 12:51 PM THREAD STARTER               #3 (permalink)
NamePros Regular
 
action012's Avatar
Join Date: Feb 2005
Posts: 347
action012 is just really niceaction012 is just really niceaction012 is just really niceaction012 is just really nice
 



Originally Posted by iNod
You could always move seperate backups of each table.. (The big ones) and than make another one of the smaller ones.

iNod.

Thanks, but the script that I'm using to do the auto backups just backup the whole database. That's why I was hoping to find away to just split the backup file.

Thanks,
????: NamePros.com http://www.namepros.com/programming/151379-splitting-sql-file.html

Steve
__________________
Easy Testimonial Learn more here. || azsoldit.com
action012 is offline  
Old 12-26-2005, 01:00 PM   #4 (permalink)
Eating Pie
 
iNod's Avatar
Join Date: Nov 2004
Location: Canada
Posts: 2,267
iNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud of
 


Special Olympics AIDS/HIV Cystic Fibrosis Save The Children Baby Health Cystic Fibrosis
Originally Posted by action012
Thanks, but the script that I'm using to do the auto backups just backup the whole database. That's why I was hoping to find away to just split the backup file.
????: NamePros.com http://www.namepros.com/showthread.php?t=151379

Thanks,

Steve
Well what script as you using? Do you have PHPMyAdmin? If not I would install or put on PHPMyAdmin.

iNod.
__________________
I feel old.
iNod is offline  
Old 12-26-2005, 01:11 PM THREAD STARTER               #5 (permalink)
NamePros Regular
 
action012's Avatar
Join Date: Feb 2005
Posts: 347
action012 is just really niceaction012 is just really niceaction012 is just really niceaction012 is just really nice
 



Originally Posted by iNod
Well what script as you using? Do you have PHPMyAdmin? If not I would install or put on PHPMyAdmin.

iNod.
Yes I have PHPMYADMIN but as far as I known you have to go in and manually do your backups. With the script I currently have it just emails them to my Gmail account once every day, running of a cron job I setup.
????: NamePros.com http://www.namepros.com/showthread.php?t=151379


Thanks,

Stve
__________________
Easy Testimonial Learn more here. || azsoldit.com
action012 is offline  
Old 12-26-2005, 03:32 PM   #6 (permalink)
Eating Pie
 
iNod's Avatar
Join Date: Nov 2004
Location: Canada
Posts: 2,267
iNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud of
 


Special Olympics AIDS/HIV Cystic Fibrosis Save The Children Baby Health Cystic Fibrosis
Hello,

If you post the script or PM me I can make it generate and email you split backups.. OR you can put it into a ZIP or TAR file and greatly reduce the size.

iNod.
__________________
I feel old.
iNod is offline  
Old 12-26-2005, 05:24 PM THREAD STARTER               #7 (permalink)
NamePros Regular
 
action012's Avatar
Join Date: Feb 2005
Posts: 347
action012 is just really niceaction012 is just really niceaction012 is just really niceaction012 is just really nice
 



Originally Posted by iNod
Hello,

If you post the script or PM me I can make it generate and email you split backups.. OR you can put it into a ZIP or TAR file and greatly reduce the size.

iNod.
PHP Code:
<?php

// Visit DigiWire.org For More Cool Scripts Like This
// Feel free to use this script however you like
// For cPanel Use ONLY !!! You must also be able to set cron jobs in your cPanel

// Email address to send the backups to (recommended to be Gmail) However any account with a high limit of space will do.
// ------------------------------------------------------
$email_address "myaddress@gmail.com";

// cPanel authentication information: the username and pass you use to logon to cPanel at your host
????: NamePros.com http://www.namepros.com/showthread.php?t=151379
// ------------------------------------------------------
$cpanel_username "database_user_name";
$cpanel_password "database_password";

// The address of your webhost (or the location of the cPanel)
// ------------------------------------------------------
$host "hostname.com";

// The database to be backed up... NOT INCLUDING THE ACCOUNT NAME BIT...
// For example...
// 'fayte_forums' would become just 'forums'
// 'dave_mydatabase' would become just 'mydatabase'
// ------------------------------------------------------
$database_name "mydata";

// All Done -> Now upload this file and make sure it can be excuted, set CMOD to 777 if you wish.
// DO NOT edit below this line

function gmail_send_file($email$from$file) {
         
$mime_boundary "gmail" md5(uniqid(mt_rand(), 1));
         
$header  "From: ".$from."\nMIME-Version: 1.0\nContent-Type: multipart/mixed;\n boundary=\"".$mime_boundary."\"\n";
         
$dateandtime gmdate("d-m-y @ h:i:s A");
         
$content  "--".$mime_boundary."\n";
         
$content .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
         
$content .= "Content-Transfer-Encoding: 7bit\n\n";
       
$content .= "The database had been backed up and is ready for download below!\n";
         
$content .= "The backup was excuted at: ".$dateandtime." GMT Time\n\n";
         
$content .= "--".$mime_boundary."\n";
         
$content .= "Content-Disposition: attachment;\n";
         
$content .= "Content-Type: Application/Octet-Stream;";
????: NamePros.com http://www.namepros.com/showthread.php?t=151379
         
$content .= " name=\"".basename($file)."\"\n";
         
$content .= "Content-Transfer-Encoding: base64\n\n";
         
$content .= chunk_split(base64_encode(file_get_contents($file)))."\n";
         
$content .= "--".$mime_boundary."\n";
         
mail($email"Repricing Ezlx DB backup"$content$header);
}

gmail_send_file($email_address"Backup <DBBackup@".$host."""http://".$cpanel_username.":".$cpanel_password."@".$host.":2082/getsqlbackup/".$database_name.".gz");

?>
I'm using this script that I believe I found at hotscripts been working good. just need to over come the size problem.

Thanks,


Steve
__________________
Easy Testimonial Learn more here. || azsoldit.com
action012 is offline  
Old 12-26-2005, 06:05 PM   #8 (permalink)
jdk
Senior Member
 
jdk's Avatar
Join Date: Jul 2004
Location: Florida
Posts: 1,496
jdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond repute
 



The easiest and best script
http://www.ozerov.de/bigdump.php
__________________
All offers are valid for 12 hours unless otherwise stated.
jdk is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
****HUGE List of FREE File/Image/Video Hosts!**** thetzfreak Free Resources 31 02-12-2006 06:06 AM
Connecting to your SQL Database using Enterprise Manager priyanka[imported] Web Hosting Discussion 1 12-07-2004 03:21 PM
Connecting to your SQL Database using Enterprise Manager priyanka[imported] Webmaster Tutorials 0 12-06-2004 08:58 PM
2 Huge Name Forsale Vegas Entertainment Domains For Sale - Make Offer 9 09-21-2004 02:37 PM

 
All times are GMT -7. The time now is 02:04 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger