You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 68 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Looking for help backing up MySQL database!! [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
cutieerica
Nuke Cadet
Nuke Cadet


Joined: Aug 16, 2003
Posts: 1


PostPosted: Sat Aug 16, 2003 3:51 pm Reply with quoteBack to top

Looking for someone who has indepth knowledge of backing up data via mysql. At this time I can not back up data via the admin section of the site and wondering how to successfully save the data. Willing to pay 100 dollars. thanks.
email me at cutieerica@hotmail.com
Find all posts by cutieericaView user's profileSend private message
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sat Aug 16, 2003 4:08 pm Reply with quoteBack to top

All you need to do is install phpMyAdmin in your web space and use it to backup your MySQL DB. It's no harder to setup phpMyAdmin than it is PHP-Nuke. Then, you don't have to depend on your control panel or arcane MySQL commands.

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
XtremeMotocross
Lieutenant
Lieutenant


Joined: Aug 06, 2003
Posts: 217

Location: USA

PostPosted: Sat Aug 16, 2003 4:17 pm Reply with quoteBack to top

Here is a PHP script that will backup your MySQL database, creating a different file each day for a month (then start over) so you have 30 days of backups. It will email you with a backup confirmation. Run it every night using cron to kick it off. Replace the X's with your information.


Code:
<?php

$emailaddress = "XXXXXX@yourdomain.com";
$host="XXX.XXX.com"; // database host address
$dbuser="XXXXXX"; // database user name
$dbpswd="XXXXXX"; // database password
$mysqldb="XXXXXX"; // name of database
$day = (date("d"));
$filename="/www/X/XXXXXX/backup$day.sql";

if( file_exists($filename) ) {
unlink("$filename");
}

system( "/usr/local/bin/mysqldump --opt --no-create-db --user=$dbuser --password=$dbpswd --host=$host $mysqldb > $filename",$result);

$size = filesize("$filename");

$runtime = (date(" F d h:ia"));

$message .= "The backup has been run.\n\n";
$message .= "Size of the backup: $size bytes\n\n";
$message .= "Server time of the backup: $runtime\n\n";

mail($emailaddress, "Backup Message" , $message, "From: Website <>");

?>
Find all posts by XtremeMotocrossView user's profileSend private messageVisit poster's websiteAIM Address
Lateron
Lieutenant
Lieutenant


Joined: Feb 23, 2003
Posts: 219

Location: Australia

PostPosted: Sat Aug 16, 2003 5:55 pm Reply with quoteBack to top

cutieerica wrote:
....... At this time I can not back up data via the admin section of the site........


Hi cutieerica,

If you don't mind me asking, why can't you backup via the admin section?

I am only asking because I can no longer backup via admin or forums admin. This happened on my 6.5 site after I upgraded the forums to 2.0.6 although I don't know if this is related.

(I know I can backup via phpMyadmin but it means I having to logon onto my host site and the dump is way slooower than by via phpnuke admin so I would like to get it working again if I can.)

Ron....
Find all posts by LateronView user's profileSend private messageVisit poster's website
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sat Aug 16, 2003 9:08 pm Reply with quoteBack to top

Lateron wrote:
...(I know I can backup via phpMyadmin but it means I having to logon onto my host site and the dump is way slooower than by via phpnuke admin so I would like to get it working again if I can.)...

phpMyAdmin 2.5.> allows you to store dumps directly on the server, without having to immediately download it to your client. Later you can transfer the dump file via FTP if you wish, or just leave it there. Ppl that don't have a local installation of phpMyAdmin usually aren't aware of this option.

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
Lateron
Lieutenant
Lieutenant


Joined: Feb 23, 2003
Posts: 219

Location: Australia

PostPosted: Sat Aug 16, 2003 10:14 pm Reply with quoteBack to top

Thanks for the info, VinDSL.

I have downloaded phpMyAdmin 2.5 to have a look at it as my host still has 2.2 or 2.3 on the server.

Ron...
Find all posts by LateronView user's profileSend private messageVisit poster's website
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sat Aug 16, 2003 11:34 pm Reply with quoteBack to top

Lateron wrote:
Thanks for the info, VinDSL.

I have downloaded phpMyAdmin 2.5 to have a look at it as my host still has 2.2 or 2.3 on the server.

Ron...

I love phpMyAdmin! It's sucky on those mass webhoster control panels. They disable practically everything. It blew me away when I started 'rolling my own.'

I forgot to tell you, you can also setup an upload directory on your server with phpMyAdmin. From there you can execute/upload pre-stored files. No more of that stupid segmented 1MB upload BS. Just upload your dump file via FTP and run it from your server. Bada bing, bada boom! Timeout issues are a thing of the past.

I suppose it goes without saying, but make sure you password protect your phpMyAdmin directory. Otherwise anybody can get into it. A lot of ppl make this mistake...

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sat Aug 16, 2003 11:58 pm Reply with quoteBack to top

As long as I'm doing this, I might as well tell you how to setup those directories. It's a little confusing reading the docs, just like PHP-Nuke. The ppl that write those things think you've been fiddling with phpMyAdmin/PHP-Nuke 24/7 for the last 2 years just like they have...

You'll live 'n' die by the config.inc.php file. This is where you make all your changes. I'm running phpMyAdmin 2.5.2 pl-1. Starting on line #494 you will see:

Code:

/**
 * web-server upload directory
 */

$cfg['UploadDir']             = '';

$cfg['SaveDir']               = '';


(I've stripped most of the comments out so it displays better here.)

What you do is fill in the empty space[s] with a path your server can get at. In my case, I just created these directories inside the phpMyAdmin directory so they would be easy to find. I called them 'upload' and 'save'. Here's what it looks like in my config file now...

Code:

/**
 * web-server upload directory
 */

$cfg['UploadDir']             = './upload/';

$cfg['SaveDir']               = './save/';



The only other thing you have to do is CHMOD those two directories to '777' so phpMyAdmin can use them. Otherwise you'll get errors when you do a dump.

Hrm... what else am I forgetting? Cool

I'll point you to some nice configuration tweaks when you get it running, if you want, like the cool looking left frame light, getting rid of the text area auto select, displaying the columns vertically instead of horizontally, yada, yada, yada...

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sun Aug 17, 2003 12:17 am Reply with quoteBack to top

LoL! I feel like a drug pusher. This guy is never going to be the same!

Remember the first time you got Nuke working? It's the same feeling all over again...

Hey, cutieerica, have I earned my 100 bucks yet? Hahahahahaha...

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
msimonds
Premium
Premium


Joined: Jul 11, 2003
Posts: 240

Location: Dallas, Texas

PostPosted: Sat Aug 23, 2003 9:47 pm Reply with quoteBack to top

the best way for this is to have and use the cron job, works like a charm. And it has saved my Rainbow Brite on a couple of occasions

_________________
Founder
SportsRant.com
Find all posts by msimondsView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
XtremeMotocross
Lieutenant
Lieutenant


Joined: Aug 06, 2003
Posts: 217

Location: USA

PostPosted: Sat Aug 23, 2003 11:09 pm Reply with quoteBack to top

thats exactly what i have and i use the script i posted above. It runs a backup every morning at 7 Very Happy

_________________
XM
Find all posts by XtremeMotocrossView user's profileSend private messageVisit poster's websiteAIM Address
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sun Aug 24, 2003 4:00 am Reply with quoteBack to top

That only works if you have access to the raw files and/or shell access which most hosts do not allow.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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 vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 1.160 Seconds - 307 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::