DJBot Rsync Copy
rsync –progress -av –delete -e ssh root@x.x.x.x:/ root –exclude=/dev –exclude=/proc –exclude=/sys –exclude=/tmp –exclude=’*.mp3′ –exclude=’*.MP3′ — exclude=’*.sql.gz’ –exclude=djbot/logs
rsync –progress -av –delete -e ssh root@x.x.x.x:/ root –exclude=/dev –exclude=/proc –exclude=/sys –exclude=/tmp –exclude=’*.mp3′ –exclude=’*.MP3′ — exclude=’*.sql.gz’ –exclude=djbot/logs
Nested select with an insert to create multiple rows — used this to add admin privileges for a client in Maia for all their domains: INSERT INTO maia_domain_admins (SELECT t2.domain_id,1013 from postfix_transport t2 WHERE t2.mta_host=’1.2.3.4′);
On multiple XenServer 5.x setups I’ve been experiencing dropped packets evident as light to medium packet loss on a busy DomU. It only affects heavy network loads on DomU’s and not Dom0. It also doesn’t seem to care about what OS is running; I’m seeing it in Debian, CentOS, and Windows. Since I manage streaming […]
Search and replace update [table_name] set [field_name] = replace([field_name],'[string_to_find]’,'[string_to_replace]’); Append update [table_name] set [field_name] = concat([field_name],'[string_to_append]’); Prepend update [table_name] set [field_name] = concat(‘[string_to_prepend]’,[field_name]);
The original hardware did all kinds of strange things, stuff like SSH not working and RPM checksums failing, random rebooting, ect. I ended up swapping the chassis, mainboard and RAM but kept the HDD’s to avoid an OS reinstall. Now, I’ve gotten this twice on the new box followed by a hard freeze about 2 […]
cd /usr/src && wget http://www.xiphicecast.webspace.virginmedia.com/icecast-2.3.2-kh29.tar.gz tar -zxf icecast-2.3.2-kh29.tar.gz && cd icecast-2.3.2-kh29 ./configure;make CFLAGS=”-D_XOPEN_SOURCE=600″ && make install
Make and install Subversion: mkdir -p /usr/local/src/ wget http://subversion.tigris.org/downloads/subversion-1.5.2.tar.bz2 tar xfj subversion-1.5.2.tar.bz2 && cd subversion-1.5.2 ./configure –with-apxs=/usr/local/apache/bin/apxs –with-apr=/usr/local/apache/bin/apr-1-config –with-apr-util=/home/cpeasyapache/src/httpd-2.2.17/srclib/apr-util make && make install Add to pre-main include in Apache Configuration (WHM): LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so Set up EasyApache’s per-user virtualhost config directories (if not present): mkdir /etc/httpd/conf/userdata mkdir /etc/httpd/conf/userdata/std mkdir /etc/httpd/conf/userdata/std/2 Add a […]
Use sysvconfig: apt-get install sysvconfig
When setting up a new server or finishing a migration, it’s a good idea to force a backup run: /scripts/cpbackup –force
In the PFsense docs it tells you to use the ‘alias’ option in the web interface… but this won’t work for routed (non-NAT) interfaces that require more than 1 subnet attached to them. To overcome this, I utilized this article: http://doc.pfsense.org/multiple-subnets-one-interface-pfsense.pdf In summary: Log into the webGUI, and click Diagnostics -> Backup/Restore. Click the “Download […]