Results 1 to 3 of 3
Hi,
I have requirement on shell scripting. I require scripts for the following
1) Full backup(application and DB): tar all the files and database and copy them in the backup ...
- 08-25-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
Shell script for backup and restore
Hi,
I have requirement on shell scripting. I require scripts for the following
1) Full backup(application and DB): tar all the files and database and copy them in the backup server
2) incremental back up of files: backup of all the updated files after the last backup
3) restoring of backup files: restore the backup files from the backup server to the application server
Please help me in providing the scripts(.sh files) for the above backup and restore functionalities.
Thanks in advance
- 08-26-2010 #2
Take a look at:
http://www.linuxforums.org/forum/lin...up-script.html
- 08-27-2010 #3Just Joined!
- Join Date
- Aug 2010
- Posts
- 18
The simplest way to backup MySQL database is to use myqldump:
and then gzip it or compress it via pipe.Code:mysqldump --opt --quick -u $DBUSER -p$DBPASS $db > $BACKUP_DIR/mysql-$db-$DATEPREFIX.sql
I posted the example of incremental backup script to thread pointed above.
To upload backup to FTP server you can use:
Code:ncftpput -u $FTP_USER -p $FTP_PASSWORD $FTP_SERVER / $BACKUP_FILE


Reply With Quote