you rack to a secondary just like you do a keg or bottling bucket. nothing special. if your worried about the air in the head space purge it with the CO2 from your keging system. let the CO2 tank run for a few seconds with the tube in the carboy then begin racking. when done make sure you fill the head space with CO2 and cap with an airlock.
When racking, immerse the hose - minimal air exposure. Then after your keg is full, cap it, pressurize and pull the pressure relief valve. This essentially pushes the air out of the headspace and replaces it with CO2.