So I played around for a bit and got my first bashscript up and running :)
Had to go through a bit of tar and gzip, mysql and rsync - but nothing I couldn't do with a few minutes of duckduckgo and the man pages...
So here it is:
clear echo "Starting the backup-process" rsync --stats --update -a -r path-to/wpfiles/ backupfolder/files/ echo "Creating tarball" cd backup tar -cf "$(date +%y-%m-%d)_files.tar" files/* echo "Zipping tar" gzip "$(date +%y-%m-%d)_files.tar" echo "Generating MySQL Dump" mysqldump -u user -ppassword mysqldb >"$(date +%y-%m-%d)_db.sql" echo "Zipping dump" gzip "$(date +%y-%m-%d)_db.sql" echo "Moving files into position"
This script copies all files form the wordpress installation to a specific folder, tars and zips them. Then a sqldump is created - everything nice and tidy :D
Next up is automation of this whole process, but I guess running it from hand every time I changed something suits my needs pretty well for now - so this can be postponed until I get funky again xD
Subscribe to Ars Artificia
Get the latest posts delivered right to your inbox