| Author |
Message |
cutieerica
Nuke Cadet


Joined: Aug 16, 2003
Posts: 1
|
Posted:
Sat Aug 16, 2003 3:51 pm |
  |
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 |
|
|
   |
 |
VinDSL
Site Admin


Joined: Jul 08, 2003
Posts: 1193
Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs
|
Posted:
Sat Aug 16, 2003 4:08 pm |
  |
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 ::. |
|
     |
 |
XtremeMotocross
Lieutenant


Joined: Aug 06, 2003
Posts: 217
Location: USA
|
Posted:
Sat Aug 16, 2003 4:17 pm |
  |
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 <>");
?>
|
|
|
|
     |
 |
Lateron
Lieutenant


Joined: Feb 23, 2003
Posts: 219
Location: Australia
|
Posted:
Sat Aug 16, 2003 5:55 pm |
  |
| 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.... |
|
|
    |
 |
VinDSL
Site Admin


Joined: Jul 08, 2003
Posts: 1193
Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs
|
Posted:
Sat Aug 16, 2003 9:08 pm |
  |
| 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 ::. |
|
     |
 |
Lateron
Lieutenant


Joined: Feb 23, 2003
Posts: 219
Location: Australia
|
Posted:
Sat Aug 16, 2003 10:14 pm |
  |
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... |
|
|
    |
 |
VinDSL
Site Admin


Joined: Jul 08, 2003
Posts: 1193
Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs
|
Posted:
Sat Aug 16, 2003 11:34 pm |
  |
| 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 ::. |
|
     |
 |
VinDSL
Site Admin


Joined: Jul 08, 2003
Posts: 1193
Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs
|
Posted:
Sat Aug 16, 2003 11:58 pm |
  |
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?
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 ::. |
|
     |
 |
VinDSL
Site Admin


Joined: Jul 08, 2003
Posts: 1193
Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs
|
Posted:
Sun Aug 17, 2003 12:17 am |
  |
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 ::. |
|
     |
 |
msimonds
Premium


Joined: Jul 11, 2003
Posts: 240
Location: Dallas, Texas
|
Posted:
Sat Aug 23, 2003 9:47 pm |
  |
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 |
|
        |
 |
XtremeMotocross
Lieutenant


Joined: Aug 06, 2003
Posts: 217
Location: USA
|
Posted:
Sat Aug 23, 2003 11:09 pm |
  |
thats exactly what i have and i use the script i posted above. It runs a backup every morning at 7  |
_________________ XM
|
|
     |
 |
Raven
General


Joined: Mar 22, 2003
Posts: 5233
Location: USA
|
Posted:
Sun Aug 24, 2003 4:00 am |
  |
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 |
|
    |
 |
|
|