This Server: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 42: | Line 42: | ||
state "No backup exists" as State0 <<Done>> | state "No backup exists" as State0 <<Done>> | ||
State0 : Status: Done | State0 : Status: Done | ||
state "Strategy: Simple ZIP" as StrategyA { | state "Strategy A: Simple ZIP" as StrategyA { | ||
state "Have a ZIP file with backup data" as StateA1 <<Done>> | state "Have a ZIP file with backup data" as StateA1 <<Done>> | ||
StateA1 : Status: Done | StateA1 : Status: Done | ||
| Line 49: | Line 49: | ||
StateA1 --> StateA2 | StateA1 --> StateA2 | ||
} | } | ||
state "Strategy: Better backup strategy using GIT" as StrategyB <<New>> { | state "Strategy B: Better backup strategy using GIT" as StrategyB <<New>> { | ||
state "Step1 ?" as StateB1 <<New>> | state "Step1 ?" as StateB1 <<New>> | ||
StateB1 : Status: Not started | StateB1 : Status: Not started | ||
| Line 66: | Line 66: | ||
</uml> | </uml> | ||
=== Strategy | === Strategy A: Simple ZIP === | ||
Using ssh: | Using ssh: | ||
# backup changes of files and folders | # backup changes of files and folders | ||
| Line 77: | Line 77: | ||
pushd /backup/; zip -r $zipfile mediawiki/*; popd | pushd /backup/; zip -r $zipfile mediawiki/*; popd | ||
echo "The latest backup is in /backup/$zipfile" | echo "The latest backup is in /backup/$zipfile" | ||
=== Strategy B: ... === | |||
Revision as of 08:26, 4 January 2016
Installed Components
Backup strategy
Postulates
- More important than having a very fancy backup mechanism is to have some backup mechanism
States and Status
Strategy A: Simple ZIP
Using ssh:
# backup changes of files and folders #mkdir /backup rsync -av --relative /var/www/html/wiki/LocalSettings.php /var/www/html/wiki/extensions/ /var/www/html/wiki/htmlets/ /backup/mediawiki/ # export the wikimedia database mysqldump -h localhost -u root -p --xml mediawiki >/backup/mediawiki/wiki_mysql_database.xml # zip it zipfile="mediawiki_$(date +'%Y%m%d-%H%M%S').zip" pushd /backup/; zip -r $zipfile mediawiki/*; popd echo "The latest backup is in /backup/$zipfile"