Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL
Author Message
JeRicHoOL
Worker
Worker



Joined: Jul 20, 2008
Posts: 126
Location: Germany

PostPosted: Sun Aug 10, 2008 9:21 am Reply with quote

What is the best way to backup my website? I came across 2 programmes named "mySQLdumper" and "bigdump". What do you use or recommend?

I want a 100% backup of my site. This includes every single post and every single pixel.
 
View user's profile Send private message MSN Messenger
slackervaara
Worker
Worker



Joined: Aug 26, 2007
Posts: 236

PostPosted: Sun Aug 10, 2008 12:26 pm Reply with quote

I use MySQLDumper for backup and restores. It works very well. Bigdump can only be used to restore a backup and you can't backup with it.
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Sun Aug 10, 2008 1:47 pm Reply with quote

If you are using cPanel you can backup through there.
 
View user's profile Send private message
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sun Aug 10, 2008 3:07 pm Reply with quote

If you have shell access to your server, or access to cron, just write a cron job to run mysqldump and compress it.

Code:


#!/usr/bin/perl
# mysqlbackup.pl - Gremmie Feb 22, 2008
# For backing up my MySQL databases

@dbs = (
   {
     db => 'dbname1',
     user => 'dbuser1',
     password => 'dbpass1',
   },
   {
     db => 'dbname2',
     user => 'dbuser2',
     password => 'dbpass2',
   },
   {
     db => 'dbname3',
     user => 'dbuser3',
     password => 'dbpass3',
   },
);

chomp($date = `date +%Y%m%d`);

foreach $db (@dbs)
{
   $outFile = '/var/local/backups/' . $db->{'db'} . $date . '.sql';
   $cmd = "mysqldump --user=$db->{'user'} --password=$db->{'password'} $db->{'db'} " .
      " > $outFile";
   # print $cmd . "\n";
   print "Dumping $db->{'db'}...\n";
   `$cmd`;
   print "Compressing $db->{'db'}...\n";
   `bzip2 $outFile`;
}
print "Done.\n";

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
JeRicHoOL







PostPosted: Mon Aug 11, 2008 10:35 am Reply with quote

Can someone explain me how to do it with "mySQLdumber"? For a 100% backup I need the database tables and the files on my FTP, right?
 
slackervaara







PostPosted: Mon Aug 11, 2008 10:46 am Reply with quote

You install MySQLDumper on your website and it will backup your database, when you launch a backup with it. It makes the backup from your MySQL-database, that you absolutely not need to upload, because it will find it where it is.
 
JeRicHoOL







PostPosted: Mon Aug 11, 2008 6:30 pm Reply with quote

And do I have to download something or how will it save the backup or actually where will it save the backup?

I'll try this out soon. When I have updated my not finished site. Razz
 
slackervaara







PostPosted: Mon Aug 11, 2008 8:40 pm Reply with quote

MySQLDumper compresses the backup and saves it in a folder, where you installed it. I also download each day a copy of this backup to my PC.

The PHP-Nuke files of my site I never backup, but I keep a fresh copy always available on my PC in case a hacker will change the files of my web site, which can happen.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©