FORUM HOME | WHUK BLOG   
WEB HOSTING UK AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM
PHP LINUX SHARED HOSTING WINDOWS ASP.NET HOSTING PACKAGES
ECOMMERCE HOSTING ASP MSSQL MS ACCESS ODBC FRONTPAGE HOSTING
CPANEL WHM FANTASTICO RESELLER DEDICATED SERVER WEB HOSTING
CHEAP PLESK CPANEL HTML MYSQL BEST UK VPS HOSTING COMPANY
CHEAP RELIABLE UK HOSTING PROVIDER SINCE 2001
MANAGED WEB HOSTING SERVICE
AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM

Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum » Web Hosting and Domains » FAQ's / Tutorials.

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 31-08-09, 01:54 AM
Dan's Avatar
Dan Dan is offline
Got root?
 
Join Date: Aug 2007
Location: England, UK.
Posts: 1,340
Send a message via ICQ to Dan Send a message via AIM to Dan Send a message via MSN to Dan Send a message via Yahoo to Dan Send a message via Skype™ to Dan
Default Advanced MYSQL Backups [Windows]

--------------------------------------------------------------------------------------------------------------------------------------------------------
ANY ISSUES? FEEL FREE TO POST BELOW OR EMAIL ME ( ) AND I WILL DO MY BEST TO ASSIST YOU.
--------------------------------------------------------------------------------------------------------------------------------------------------------

In this tutorial, I'm going to give you an easy way to take a database backup from the databases of your choice and automatically zip them up using Winrar, even sending them to another FTP server - perfect for backing up those all-important databases.

Firstly you will need to ensure the latest Winrar is installed to C:\Program Files\Winrar. You will also need MYSQL installed.

1. Create a folder at the following location: C:\Database Backups

2. Create a folder inside C:\Database Backups called RAW

3. Navigate to C:\Program Files\Mysql (version)\bin and inside create a batch file called Backups.bat - inside that batch file, copy and paste the following code...

Quote:
Originally Posted by BACKUPS.BAT

mysqldump.exe -uroot -pDATABASEPASSWORD DATABASE_NAME > "C:\Database Backups\DATABASE_NAME.sql"
echo "-----MYSQL BACKUP OF DATABASE_NAME COMPLETED SUCCESSFULLY-----"

c:
cd \
cd "Program Files\Winrar
del "C:\Database Backups\Databases.rar"
rar a "C:\Database Backups\Databases.rar" "C:\Database Backups\RAW\*.sql" > "C:\Database Backups" > "C:\Database Backups\Databasebackuplog.txt"
del "C:\Database Backups\RAW\*.sql"
C:
cd \
cd "Database Backups"
ftp -s:ftprules.txt > ftplog.txt
quit
You must edit the parts in bold to your servers information / database name.

NOTE: Ensure that you do not have a space between "-pDATABASEPASSWORD", also the same with the database username. Also take note of the underlinings as this is separating two different parameters in the command line.


-------IF YOU DO NOT WANT TO TRANSFER THE BACKUPS TO ANOTHER SERVER, IGNORE THE FOLLOWING-------

4. Now that we have the primary batch file setup and placed in C:\Program Files\Mysql (version)\bin we will need to adjust the FTP rules.

Navigate to C:\Database Backups and create a new TXT file called FTPRULES.TXT. Inside this file should be the following...

Quote:
Originally Posted by FTPRULES.TXT
open FTP_IP_OR_URL
FTP_USERNAME
FTP_PASSWORD

lcd "C:\database backups"
del databases.rar
binary
mput *.rar
y
y
byebye
y
Once again, editing the parts in bold above.

You should now have a fully working system which should

1. Create database backups.
2. Compress the backups into a highly compressible format.
3. Transfer the much precious backups to an additional server (if required)
__________________
Webhosting.UK.com || cPanel VPS Hosting || Reseller Hosting

Sales: 0808-262-0855
Support: 0800-612-8725
International: +44 191 303 8191
Reply With Quote

Reply

Tags
advanced, backups, batch file, dan miller, ftp transfer, mysql, mysqldump.exe

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 02:23 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright 2001-2010 Web Hosting UK. All rights reserved.
Web Hosting UK Forum





Site Map

Shared Cloud
Shared Cloud From £1

Affiliate Program
Earn up to £300 Per Sale

Dedicated Servers
Dedicated Server Hosting

Cloud Hosting
Cloud Server Hosting

Load Balanced Server
Load Balancing Server

VPS Hosting
Linux VPS Hosting

Windows VPS
Windows 2003 VPS

Zimbra Hosting
Zimbra Email Hosting

cPanel Hosting
Shared Linux Hosting

Windows Hosting
Shared Windows Hosting

Coldfusion Hosting
Windows Coldfusion Hosting

cPanel Reseller Hosting
Shared Windows Hosting

Windows Reseller
Windows Reseller Hosting

Email Web Hosting
Email Hosting

Semi-Dedicated Server
Semi-Dedicated Hosting

Remote Backup Plans
Offsite Backup Service


cpanel hosting
Knowledgebase Articles

Pre-Sales Question
Web Hosting FAQ's

Dedicated Hosting
Dedicated Server FAQ's

Virtual Private Servers
VPS Hosting

PHP MySQL Hosting
cPanel Hosting

Windows Hosting
ASP MSSQL Hosting

Domain Name
Domain registration FAQ's

CMS Hosting
CMS Hosting FAQ's

Payment Gateways
Payment FAQ's


Support Tutorials

cPanel Tutorials
cPanel Flash Tutorials

Wordpress Tutorials
Wordpress Flash Tutorials

Plesk Tutorials
Plesk Flash Tutorials

PhpMyadmin Tutorials
PhpMyadmin Flash Tutorials

Drupal Tutorials
Drupal Flash Tutorials

Mambo Tutorials
Mambo Flash Tutorials

Joomla Tutorials
Joomla Flash Tutorials

More Hosting Tutorials