Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2003-08-27, 08:20 AM   #1
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Lightbulb Backing up…

Drives fail, mistakes are made, are you backing up all of your work?

For most webmasters backing up their web folder is enough, but for sites that use a MySQL database backing up their web folder does not back up their database.

Let's say you have a database named MYDATA and its password is 1234 that you would like to back up.

First FTP into your server and create an empty text file named MYDATA.sql and CHOMD this file 777.

Then log into your server useing telnet or SSH and at the prompt type: mysqldump -uMYDATA -p123456 --opt MYDATA > path_to_MYDATA.sql. You can then download this file to your local drive for safe keeping.

To restore your database this is what you would do. Log into your server useing telnet or SSH and at the prompt type mysql -u MYDATA -p MYDATA < path_to_MYDATA.sql and after entering your password your database will be restored.

It is very easy using crontab and a short script to have your server do daily dumps that you can download for self keeping.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT -4. The time now is 02:56 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc