How To Create and Restore an SVN Backup Dump File (.dmp)

Author: , February 1st, 2018

Backup Compressed: svnadmin dump /volumes/data/svn/yourRepo | gzip -9 > /volumes/data/backup/yourRepo.dmp.gz Backup Uncompressed: svnadmin dump /volumes/data/svn/yourRepo > /volumes/data/backup/yourRepo.dmp Restore the Repo Create a new SVN repository: svnadmin create /volumes/data/svn/newRepo Restore the dump file to the new repository: svnadmin load /volumes/data/svn/newRepo < /volumes/data/backup/yourRepo.dmp Just for good measure, here is how to checkout from a local repo: svn […]

How To Allow Cross-Site Javascript Using Apache

Author: , September 24th, 2015

The key is to send a response header like this: Access-Control-Allow-Origin: * In the Apache web server, one enables this via the following directive: Header set Access-Control-Allow-Origin * This requires the use of mod_headers, which is enabled by default in Apache. For example: 1 2 3 4 5 6 7 8 9 LoadModule headers_module modules/mod_headers.so […]

How To Auto-Restart Apache If the Load Gets Too High

Author: , September 15th, 2015

The script to check and restart apache…works on CentOS – YMMV! 1 2 3 4 5 6 7 8 9 10 11 #!/bin/bash MAXLOAD=6 check=$(uptime | awk -F’average: ‘ ‘{print $2}’ | awk ‘{print $1}’ | tr -d ‘,’) if [[ $check > $MAXLOAD ]]; then     /sbin/service httpd stop     HOST=`hostname`   […]