backup mediawiki to amazon s3

Jump to: navigation, search

This is for, you need to modify paths as per your mediawiki installation.

[email protected]:/home/ cat  /home/

# Author: <[email protected]>
# Cronjob = @weekly /home/
# AWS Setup =

cd /home/

tar cf /home/ public_html

mysqldump webhostingneeds > webhostingneeds.sql

# Append MySQL dump to backup.tar
tar rf /home/ webhostingneeds.sql

DATE_NOW=$(date +"%Y%m%d%H%M")

cd /home/
gzip -c backup.tar > webhostingneeds-com-$DATE_NOW.tar.gz

rm -f backup.tar

aws s3 cp webhostingneeds-com-$DATE_NOW.tar.gz s3://backup-whn/

[email protected]:/home/ 

awscli need to be configured as per aws configure