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!
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:mkdir 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.Code:cd sql
For this step, you'll have to know either A. The root password (unlikely) or B. your database password (found in includes/config.php).
Repeat this process 2 more times, replace the 1 after date with 2 and 3.Code:mysqldump -u accountname_user -p -h localhost accountname_databasename > databasename_date1.sql
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.
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!Code:../
Lets package them up:
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!Code:tar cvf sitename_backup1.tar *
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.
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!Code:mv sitename_backup1.tar public_html
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
This will download your backup to your remote backup site.Code:wget http://sitename.com/sitename_backup1.tar
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



LinkBack URL
About LinkBacks





Reply With Quote

