Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-04-2009, 06:04 AM   #1
marcjacob
Confirmed User
 
marcjacob's Avatar
 
Join Date: Jun 2003
Location: England
Posts: 1,063
Need help backing up my server...

I wanted to create a back up of my server, so I found out how to use SSH to create a compressed file of the entire server and split that file into 200 mb pieces. Now I've downloaded it and want to join them together again to check that the the file unzips correctly and isn't corrupted. How would you do that? Can you use command prompt (on vista) and if so does anyone know the commands?

Also how do you backup mysql, is there a quicker way to back up all databases on the server, without using phpmyadmin to export every single table?

Thanks
marcjacob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-04-2009, 06:35 AM   #2
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Well i usually do tar operation for archiving/extracting,and export databases over ssh also by using mysql command since phpmyadmin not support export of databases with large size.
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-04-2009, 06:50 AM   #3
LoveSandra
So Fucking Banned
 
Join Date: Aug 2008
Location: Just Blow Me
Posts: 10,551
Quote:
Originally Posted by marcjacob View Post
Also how do you backup mysql, is there a quicker way to back up all databases on the server, without using phpmyadmin to export every single table?

Thanks
The new host may have other path than the older one and everything will be fucked up.
LoveSandra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-04-2009, 07:23 AM   #4
SweetT
Shank-A-Potamus
 
SweetT's Avatar
 
Join Date: Jan 2002
Location: Atlanta, Georgia USA
Posts: 1,756
I know that you are one of my customers but I also know that you host things other places as well so I will answer this as if you were not my customer. My suggestion is to contact your host and ask about options. I know that some hosts will allow you to send them a external hard drive and they will back up the entire thing on that hard drive and ship it back to you (although it may come at a minimal fee). Another option is to tar it up and download the entire thing (this of course will help the hosting company because it burns bandwidth). There are even more options than these two but they all have a common theme....contact your host and let the System Administrators help you. That is what they are there for ;)


--T
__________________
SweetT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-04-2009, 07:26 AM   #5
peeperpimp
Confirmed User
 
Join Date: Aug 2006
Location: Pimpin On The NET!!!
Posts: 5,105
The following is based on server to server move.
Linux / Unix system w/ file chunk sizes of 500MB each using SSH...

---------------------------

Moving a huge site....

tar the file with:
nohup nice tar -cf /foo.bu.tar /fooSource &

split the file into 500MB chunks with:
nohup nice split --line-bytes=500m foo.tar.gz foo_ &

command to move example: rsync -a -p -e ssh /home/temp1/#of-file-here easy1@INSERT-IP-ADDRESS-HERE:/home/easy1/temp

in new server go to /home/temp1/temp (files location) then you'll see # of folders.
move all files into one folder with FTP client or however u like.

rejoin the file with:
nohup nice cat foo_a* > foo_FULL.tar.gz &

THEN UNZIP / UNTAR / RESTORE
---------------------------

Good luck with it
__________________
ICQ: 377517467
peeperpimp (at) yahoo (dot) com

Last edited by peeperpimp; 08-04-2009 at 07:28 AM..
peeperpimp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-04-2009, 08:27 AM   #6
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
mysqldump is made for backing up and moving SQL databases.
The thing is, you really should be backing up daily, especially
your database is likely to change often, so doing this all manually
isn't ideal. Check out Clonebox, which takes daily backups
of the whole server for a very low price. The Clonebox clones can
actually be BOOTED, too, so if your drive fails or your host disappears
or whatever your site is still up, running from the clone.
http://bettercgi.com/clonebox/
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-04-2009, 08:29 AM   #7
marcjacob
Confirmed User
 
marcjacob's Avatar
 
Join Date: Jun 2003
Location: England
Posts: 1,063
Quote:
Originally Posted by SweetT View Post
I know that you are one of my customers but I also know that you host things other places as well so I will answer this as if you were not my customer. My suggestion is to contact your host and ask about options. I know that some hosts will allow you to send them a external hard drive and they will back up the entire thing on that hard drive and ship it back to you (although it may come at a minimal fee). Another option is to tar it up and download the entire thing (this of course will help the hosting company because it burns bandwidth). There are even more options than these two but they all have a common theme....contact your host and let the System Administrators help you. That is what they are there for ;)
Thanks for that, I know I could and probably should let them do it. I'm the type of person that likes to learn this stuff and do it for myself.

This isn't a move, just a back up.

So far I've learnt to tar the whole thing but the filesize was huge. So I figured out to split them and it downloaded by ftp alot quicker that way. I was going to bring it across to a virtual account once per week, but I noticed when they moved me onto this server I used 65mbps and I doubt any host will let me do that without my own server.

Now the only thing I need to learn is how to put those peaces together again.

Nat Net kindly gave me a root username and pass for mysql but the dump all databases option isn't dumping anything. I'm now reading various sites which all say that same thing!

Eventually I'll ask the tecks how to do it, but I like to try to learn as much as I can myself. I learnt PHP this way and it came in very usefull
marcjacob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-04-2009, 08:38 AM   #8
marcjacob
Confirmed User
 
marcjacob's Avatar
 
Join Date: Jun 2003
Location: England
Posts: 1,063
Oh I've done it! If anyone else needs this it's:

mysqldump -u root -pPASSWORDHERE --all-databases > alldb_backup.sql

(no space between -p and your root pass - that was the mistake I was making)
marcjacob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.