Simple Apache / MySql Backup Script

Here is a simple script for backing up your local server settings and databases.  Replace "/media/storage/_backup" with your destination directory.

 

cp /etc/hosts /media/storage/_backup/hosts
cp -r /etc/apache2/sites-available /media/storage/_backup/sites-avialable
mysqldump -u root -psecret --all-databases > /media/storage/_backup/backup.sql
comments powered by Disqus

© Balanced Scale Media, LLC. All right reserved.