This Server
Jump to navigation
Jump to search
Installed Components
Click this link to get a SSL report of this server: https://www.ssllabs.com/ssltest/analyze.html?d=playfulexploration.com .
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 -uroot --single-transaction --databases mediawiki >/backup/mediawiki/wiki_mysql_database.sql
# 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"
Now navigate to https://www.playfulexploration.com/backup and download the zip file.
Cost Structure
| Product | Cost | Detail | |
|---|---|---|---|
| Virtual Private Server | $6.99 / month | OVH
| |
| > | Virtual Private Server | $13.49 / month | OVH
|
| > | .COM Domain Name | $12 / year | Google
|
| > | Software | $0 | all open source :] |
After the VPS upgrade the RAM automatically increased but the disk size needed manual fixing requiring two steps (source):
- Increase the partition to use the extra sectors added:
fdisk /dev/vda > u > p (this will print all of the partitions, we will refer to the data later) > d 1 (this will display "Selected partition 1" and delete the first partition) > n (select "p" for primary partition) (partition number should be 1, but make sure it matches the number displayed in print command) (first sector should be 2048, but make sure it matches the "Start" column displayed in print command) (and set last sector to the default value) > a (type "1" to make new first partition bootable) > w (this will write the new partitions and exit fdisk) shutdown -r 0
- Increase the filesystem size to use the extra partition space that's now available:
(connect to VM after it reboots, if it has resized partition but not filesystem then run resize2fs)
Free up disk space
Trim log file archives:
find /var/log/* -name *.gz -type f -mtime +100 -exec rm {} \;
Drop caches:
free && sync && echo 3 > /proc/sys/vm/drop_caches && free
See also: http://askubuntu.com/questions/5980/how-do-i-free-up-disk-space