« Archives in August, 2006

scp – Copy files to another server in SSH

Say you need to replicate a huge MySQL database to another machine and dumping and import the database might take hours, copy the binary files (/var/lib/mysql/DB_NAME) might be a quicker method. To do that, we can use scp:

s1# scp -P SSH_PORT /var/lib/mysql/DB_NAME/ user@s2:/var/lib/mysql/DB_NAME/

You would also need to chmod (644) & chown (mysql:mysql) the files on the destination server so MySQL server can read them properly.

California Tax Cheats

Examples of abusive tax shelter schemes identified:

Basis Shifting: This tax scheme uses foreign corporations (in tax haven countries) and instruments to artificially increase and shift the basis of foreign shareholder stock (not subject to U.S. taxation) to stock owned by U.S. shareholders. By applying tax laws in a manner inconsistent with legislative intent, U.S. taxpayers ultimately sell their stock and report an inflated loss, despite incurring no economic loss.

Inflated Basis: These schemes use transactions that are “contingent” (not completed) to inflate an owner’s basis (ownership interest/true economic risk) in a pass-through entity investment. The taxpayer contributes cash or securities and a “contingent” liability or obligation to the pass-through entity. The taxpayer does not reduce his basis in the pass-through entity for the contingent liability under the contention that the liability item is “contingent” for tax purposes. Thus, the taxpayer creates an artificially inflated basis for the pass through entity interest, which is then used to deduct losses received from the pass through entity (losses are only deductible against the owner’s basis in a pass-through entity).

Commercial Domicile: This scheme promises taxpayers that if they incorporate in non-income taxing states, such as Nevada or Delaware, they can avoid California income taxes. This scheme requires an S corporation doing business in California to reincorporate in Nevada. Promoters of this reincorporation scheme argue that the source of the S corporation income is Nevada regardless of its business activity in California. However, a corporation doing business in California remains subject to California franchise tax, and a California resident is taxable on income from all sources, including sources in Nevada. In this situation, neither the S corporation has terminated its business activity in California, nor has the individual taxpayer terminated his or her California residency.

Source: California FTB

Remote kernel upgrade

If for some/many reasons after a kernel upgrade, the system does not reboot. Some hosting control panels can reboot the server into rescue mode. In this mode, you can edit the lilo.conf to go back to the previous working kernel. Make sure you backup the file first.

Also, if you use “yum update” to upgrade the kernel, the default kernel might have too many extra/redundant modules that might cause the system hang while booting up. If it is the case, use a modified kernel (compile your own) with some minimal modules enabled (can see the modules in /lib/modules/, change the version if needed).

The files in /boot

powercfg – Save power when using battery

A not-very-popular tool to adjust power configurations in command mode. Run “powercfg /?”

C:\Documents and Settings\mathie>powercfg /?