• info@manhtu.com.vn
  • (083) 9350079 - Hotline: 0912 78 79 38
  • cuu du lieu cuu du lieu
Howto backup mysql databases web server files to a ftp server automatically - HowTo: Backup MySQL Databases, Web server Files to a FTP Server Automatically | CứuDữLiệu.com

HDD Server

HowTo: Backup MySQL Databases, Web server Files to a FTP Server Automatically
HowTo: Backup MySQL Databases, Web server Files to a FTP Server Automatically

This is a simple backup solution for people who run their own web server and MySQL database server on a dedicated or VPS server. Most dedicated hosting provider provides backup service using NAS or FTP servers. These service providers will hook you to their redundant centralized storage array over private VLAN. Since, I manage couple of boxes, http://bash.cyberciti.biz/backup/wizard-ftp-script.php is my own automated solution. If you just want a shell script, go here (you just need to provided appropriate input and it will generate FTP backup script for you on fly, you can also grab my php script generator code).

Making Incremental Backups With tar

You can make tape backups. However, sometime tape is not an option. GNU tar allows you to make incremental backups with -g option. In this example, tar command will make incremental backup of /var/www/html, /home, and /etc directories, run:
 

Mã:
	# tar -g /var/log/tar-incremental.log -zcvf /backup/today.tar.gz /var/www/html /home /etc

Where,

-g: Create/list/extract new GNU-format incremental backup and store information to /var/log/tar-incremental.log file.

Making MySQL Databases Backup

mysqldump is a client program for dumping or backing up mysql databases, tables and data. For example, the following command displays the list of databases:

 


Các bài viết khác