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′);
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]);
useradd -G {group-name} username
Blackberry (RIM) data and email service confirmed down since 2:00AM Eastern 01/29/2011, with no ETA in sight. Looks like all carriers are affected, with AT&T and Verizon confirmed.
FreeBSD is great for certain tasks (such as firewalls and other embedded devices), but has some real shortcomings when it comes to booting from attached or remote storage. This severely complicates the installation process in some cases. In my case, I have a remote server in a rack with no CD-ROM. Pulling the server from […]
So I needed to shrink a C: partition of a Windows 7 (Server 2008 R2) machine. After shrinking with Gparted (my open-source partitioning tool of choice), Windows no longer booted, with the boot manager complaining of 0xc0000225 (awesome error message as usual, Microsoft). To get things working again, it was necessary to execute the following […]
Right here: /usr/lib/courier-imap/etc/…
This proved to be useful in cleaning up a compromised site. List all the files created or modified within a certain time frame — in this case we are looking 30 days in the past: find . -mtime -30 -type f -print If you want to delete all files created/modified n days ago, you can […]
When cloning a Debian system, be sure to remove everything in: /etc/udev/rules.d/*persistent-net.rules This will allow the new hardware to detect properly.