Friday, April 23, 2010

Shell Script to back Up database & Script Folders

#!/bin/bash
cd /backuppath/
NOW=$(date +”%m-%d-%Y”)
tar -cjf backupsite_$NOW.bz2 /pathtoscriptfolder
tar -cjf backupcms_$NOW.bz2 /opt/www/cms
tar -cjf mysqlbackup_$NOW.bz2 /opt/lib/mysql

No comments:

Post a Comment