vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
vBSEO Total Support Team Launches DeskPro New vBSEO Discount Level for Network Builders vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! Crawlability Inc. Files for SEO Technology Patent
se sw

Making full site backups

This is a discussion on Making full site backups within the Member Articles forums, part of the Focus on Members category; Requirements: SSH Access, Hosting Account, Linux, Backup Solution, 30 minutes! What you're about to learn: How to backup your site ...

Go Back   vBulletin SEO Forums > Focus on Members > Member Articles

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack Thread Tools
  #1  
Old 11-15-2006, 05:01 AM
Senior Member
 
Real Name: dave
Join Date: Jun 2006
Posts: 346
Blog Entries: 1
Making full site backups

Requirements: SSH Access, Hosting Account, Linux, Backup Solution, 30 minutes!
What you're about to learn: How to backup your site with a reliable, tried and true method that will provide a fail safe solution in case of a emergency!
Definitions: Off Site Backup - moving data off the current server, to a backup solution.
SSH: A way to issue command your server from home.


Do you have a forum full of data, all your images, attachments, users, posts everything is only one mistake away from being completely lost for ever. Everyone should know how to fully backup their site, and move the backup off their servers to another location in case the unthinkable happens, trust me it happens the only question is when will it happen.

Do you make cPanel backups and then simply leave them sitting on your hosting account/server? Do you make your own backups and just place them in a different folder? Well those methods are only good if you're hard drive never fails, which would be naive of you to think it cant happen to you! What if your hosting company runs off with from their data center and doesn't pay the bill? What if hard drives crash and there are no backups besides on the server? Now i'm sure you are starting to see the problem with simply backing up your data and calling it a day.

Not only will you sleep at night after reading this, you'll also get be getting better sleep! Here is a quick tutorial to get you on your way to backing up all your data. This method is a general method, I wont show or go into detail about cPanel backups, as I personally wouldnt rely on them.

First you must login to your server via the SSH access. Usually the same information as your FTP info. Most hosts only enable this if you ask. Its a free service! A good windows SSH program is PuTTY Download Page .

Next lets create a folder for the database backup we're going to be performing first. Backing up the database is a important part!

Code:
mkdir sql
See how simple that was, this guide is pretty much that simple the whole way through, its only this long to look impressive for the ladies. After you have your database folder created, lets enter the folder.

Code:
cd sql
Boom, look at that, you've done two things, and haven't even messed up anything yet (hopefully not!). Now we're going to create a couple database backups! You may wonder why a couple backups since this is such a tried and proven method? Well todays whole lesson is about data protection, and a good policy to practice is you can never be to safe.

For this step, you'll have to know either A. The root password (unlikely) or B. your database password (found in includes/config.php).

Code:
mysqldump -u accountname_user -p -h localhost accountname_databasename > databasename_date1.sql
Repeat this process 2 more times, replace the 1 after date with 2 and 3.

It will prompt you for your database password, if you forget or do not know, look in the config.php file!

Look, now you have your database backups! 32.7% done!

Next we get out of the sql folder, its good to go as they say.

Code:
../
Now you should be back into the highest level of access you have. You should see folders such as www or public_html, mail, public_ftp and so on. Your actual folders will vary!

Lets package them up:
Code:
tar cvf sitename_backup1.tar *
Boom, you should see all the files 1 by 1 flying by on the screen, that simple, all your data is backed up. So now we are at the steps that set this tutorial apart from the rest. We are going to prepare this for a off site move. The whole entire point of this long thread. If you've stopped reading by now, you youldn't be reading this anyway, so might as well keep trucking now!

85.87% complete!

Now you have this backup, but nothing to do with it. Some people may download their entire public_html folder via FTP, after doing this one, you'll have enough as it takes f o o o o r e v e e e e r r r. So we need to move this backup, where we can access it via the web.

Code:
mv sitename_backup1.tar public_html
Now you're folder is accessible from the web, anyone can download this so do not make mention of the file name. If you place it in a folder, place a blank index.html file in there as well!

Now we need to move this off-site. You can download it to your home computer, burn it to a couple CD's and call it a night. But thats the easy way out, but should also work for most people following this guide so far. Another way is to move this file to another hosting provider, network attached storage, or even a place that offers remote backup services.

All you need to do is simply login to your new hosting provider via SSH and issue this one command
Code:
wget http://sitename.com/sitename_backup1.tar
This will download your backup to your remote backup site.

100% complete! I do this for all my sites once a week! Database backups are performed nightly as they are a vital part of vBulletin. You're users may return after a crash, but they are never the same or stick around long after!

You should now be able to rest easier, and after you get good at this, it should take maybe 30minutes top to complete!



//Source: Top vBulletin - Powered by vBulletin
//Written by: Top vBulletin - View Profile: Dave
//
This tutorial may not be reproduced on other sites without a link back to vBulletin Top Site. No parts maybe reproduced, copied, stolen, screen shot // or other methods of transfe rof information. Copyright 2006 Top-vB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #2  
Old 07-01-2007, 06:45 PM
Junior Member
 
Real Name: Josh
Join Date: Jul 2007
Posts: 18
Thanks for posting this, I've been looking for something like this for a while.

One question,

when you say to type this in:
Quote:
mysqldump -u accountname_user -p -h localhost accountname_databasename > databasename_date1.sql
Should I type that in exactly or should I replace the "accountname" and stuff with my own information? and if so what should I put there?

Sorry if this is a dumb question but I'm really trying to get this figured out and keep trying different things in that text string and nothing is working.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #3  
Old 07-02-2007, 01:31 AM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
that is command-line mysql.
This assumes you have root access.

SSH into your server, and get to the mysql prompt (usually by typing in mysql) then run that command.

and yes, replace accountname with your info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #4  
Old 07-02-2007, 02:04 AM
Junior Member
 
Real Name: Josh
Join Date: Jul 2007
Posts: 18
Quote:
Originally Posted by briansol View Post
that is command-line mysql.
This assumes you have root access.

SSH into your server, and get to the mysql prompt (usually by typing in mysql) then run that command.

and yes, replace accountname with your info
Thank you for your reply.

I'm afraid I'm still confused though.
In the part that says to type this in:
Quote:
mysqldump -u accountname_user -p -h localhost accountname_databasename > databasename_date1.sql
I'm having a hard time knowing what exactly to type in.
where it says "accountname_user" what would that be? and where it says "accountname_databasename" what would that be?

thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #5  
Old 07-02-2007, 02:27 AM
sportsmedjosh's Avatar
Senior Member
 
Real Name: Josh
Join Date: Jan 2007
Posts: 395
what do us mac users do?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #6  
Old 07-02-2007, 02:28 AM
Junior Member
 
Real Name: Josh
Join Date: Jul 2007
Posts: 18
Quote:
Originally Posted by sportsmedjosh View Post
what do us mac users do?
Come on, I'm being serious here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #7  
Old 07-02-2007, 02:33 AM
sportsmedjosh's Avatar
Senior Member
 
Real Name: Josh
Join Date: Jan 2007
Posts: 395
I was being serious too, the link in the first post for putty was a .exe file. mac runs .dmg. But that besides the point. Is there anything wrong using the back up databases option from Vbulletin and combining that with a download of the files via FTP?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #8  
Old 07-02-2007, 03:04 AM
Junior Member
 
Real Name: Josh
Join Date: Jul 2007
Posts: 18
Quote:
Originally Posted by sportsmedjosh View Post
I was being serious too, the link in the first post for putty was a .exe file. mac runs .dmg. But that besides the point. Is there anything wrong using the back up databases option from Vbulletin and combining that with a download of the files via FTP?
Sorry then. LOL

ya, thats what I had been wondering also. I've been trying to do a back up all day. I did a VB back up and started downloading files via FTP but I dont know how complete of a backup it is.

I also just did a back up in my cPanel. It said "full site backup to be used when moving site to a different server" so I figured that would be a pretty complete back up. It saved the backup to the home dir and then I FTP'd it to my desktops hard drive.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #9  
Old 07-02-2007, 03:14 AM
sportsmedjosh's Avatar
Senior Member
 
Real Name: Josh
Join Date: Jan 2007
Posts: 395
I've been putting my backups on my laptop, external HD and an old G4 that I have in CA just in case. But now i'm also worried about how complete these back ups are.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #10  
Old 07-02-2007, 03:25 AM
Junior Member
 
Real Name: Josh
Join Date: Jul 2007
Posts: 18
Quote:
Originally Posted by sportsmedjosh View Post
I've been putting my backups on my laptop, external HD and an old G4 that I have in CA just in case. But now i'm also worried about how complete these back ups are.
Ya, My site got hacked today so I'm super paranoid. Luckily they havn't done anything yet but I dont know how they are getting in so I want to back everything up externally before they do start to make changes.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #11  
Old 07-02-2007, 09:00 AM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
accountname_databasename
would relate to the cpanel setup name and the mysql database


A Mysql dump is just that--- the sql database. it is NOT a full site dump. it is only your database. you will still need to ftp your files down or some other method.

If you have the means, i HIGHLY recommend getting a NAS on your datacenter. i have one for 20 bucks a month for 20gb.
through WHM, i run a nightly task that runs through cpanel and does a full SERVER backup to the nas, deleting anything older than 10 days

Last edited by briansol; 09-10-2008 at 08:29 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #12  
Old 07-02-2007, 11:27 PM
Junior Member
 
Real Name: Josh
Join Date: Jul 2007
Posts: 18
Thanks agian.

So if I do a full server backup from cPanel then do I still need to do something like what this thread discribes? Or would a full cPanel backup be just as good if not better?

I'd rather just do the cPanel backup since I already know how to do them and they seem to back up everything.
They do back up everything right? If my site got hacked or the server blew up, I'd be able to restore everything to the way it was with a cPanel full backup right?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #13  
Old 07-03-2007, 12:49 AM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
assuming you can ACCESS the back up, yes.

that's why i suggest getting a NAS which is not on your server and is able to access it from its own IP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #14  
Old 07-03-2007, 12:51 AM
Junior Member
 
Real Name: Josh
Join Date: Jul 2007
Posts: 18
Quote:
Originally Posted by briansol View Post
assuming you can ACCESS the back up, yes.

that's why i suggest getting a NAS which is not on your server and is able to access it from its own IP
I'll definitly look into that NAS thing. That sounds good.

As far as accessing it from my server, couldn't I just download the .rar file via FTP once it finishes backing up?
Thats what I did last night and it seemed to work ok. The file was 500 megs though so it took about 10 min. to download. :(
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #15  
Old 07-03-2007, 01:06 AM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
you could... but its extra work, and you have to remember to do it every day....

with it set up on your server's local network, its so much easier, and 100mbs if not a gbs link between the two makes it easy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Development site on different url GrantHorizons General Discussion 2 05-30-2006 09:02 AM


All times are GMT -4. The time now is 09:03 PM.


Powered by vBulletin Version 3.8.0 Beta 4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.5 ©2008, Crawlability, Inc.