Loading

Thursday, July 23, 2009

Linux Shell Script backup web apache httpd content

# THE FOLLOWING DIRECTORIES MUST EXIST
# /var/backup
# /var/backup/www

# GATHER WEB FILES
tar -cvf /var/backup/www/html.tar /var/www/html/

# COMPRESS ALL INFO
gzip -f /var/backup/www/html.tar

# TO AUTOMATE, COPY TO WEEKLY CRONTAB (without # sign)
# cp /root/bin/wwwbak.sh /etc/cron.weekly/

No comments:

Post a Comment