Backups
Backing up the wiki
- Export SQL into a file, tar it all up: mysqldump \ -u trmmnet_wiki \ -p \ --default-character-set=binary trmmnet_wiki \ > public_html/trmmnet-DATE.sql tar -zcvf trmmnet-DATE.tar.gz ./public_html
Restoring
-
AWS needs to have
mod_rewriteenabled: ln -s ../mods-available/rewrite.load /etc/apache2/mods-enabled/ -
Create database and user: mysql -p mysql <<END grant all privileges on trmmnet_wiki.* to trmmnet_wiki@localhost identified by 'XXXX' with grant option; END
-
Restore from tar file and SQL backup: tar zxvf trmmnet-DATE.tar.gz mysql -p -u trmmnet_wiki trmmnet_wiki < pubic_html/trmmnet-DATE.sql
-
Fixup cache dir: chmod 777 public_html/cache/