I have a list of commands I need to run to sync my web servers.
I have a staging server that we stage our content changes on. when they are approved I then tar up a few directories and do a mysqldump in the web directry of staging.
I then delete the previously downloaded tar files and sql then I run wget from the live server grabbing the two tar files and the mysql database. I then un tar the files then restore the database.
what I need help with is taking the commands and putting them into a script that I could either add to a cron or fire off from the admin console of each server.
tar cvzf files.tar sites/default/files/
tar cvzf theme.tar sites/all/themes/site/
mysqldump -u root --password=PASSWRD! site> site.sql.txt;
tar -xvf files.tar
tar -xvf theme.tar
mysql -u root --password=PASSWORD! site< site.sql.txt